8 for i
in open (VERSION
).readlines ():
9 i
= re
.sub ('#.*','', i
)
10 m
= re
.search ('([^ =]*)[\t ]*=[ \t]*([^ \t]*)[ \t]*\n', i
)
12 defs
.append ((m
.group (1), m
.group (2)))
14 sys
.stdout
.write (r
'''
16 Automatically generated from %(VERSION)s
23 for name
, expansion
in defs
:
24 # GUILE leaks autoconf data into userspace.
25 sys
.stdout
.write (r
'''
29 #define %(name)s "%(expansion)s"
32 if ('MY_PATCH_LEVEL', '') in defs
:
33 sys
.stdout
.write (r
'''
34 #define NO_MY_PATCHLEVEL
35 #define TOPLEVEL_VERSION MAJOR_VERSION "." MINOR_VERSION "." PATCH_LEVEL
38 sys
.stdout
.write (r
'''
39 #define TOPLEVEL_VERSION MAJOR_VERSION "." MINOR_VERSION "." PATCH_LEVEL "." MY_PATCH_LEVEL
43 #endif /* VERSION_HH */