]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/bin/make-version.py
(global_latex_preamble): only set
[lilypond.git] / stepmake / bin / make-version.py
1
2 import re
3 import sys
4 import getopt
5
6
7 mypatch = 0
8 defs = []
9 for a in sys.argv[1:]:
10         m  = re.search ('([^ =]+)=([^ \t]*)', a)
11         if m:
12                 defs.append ((m.group(1), m.group(2)))
13
14
15 sys.stdout.write (r'''
16 #ifndef VERSION_HH
17 #define VERSION_HH
18 /* automatically generated */
19
20
21 ''')
22 for d in defs:
23
24         # GUILE leaks autoconf data into userspace. 
25         sys.stdout.write ('#ifdef %s\n' % d[0])
26         sys.stdout.write ('#undef %s\n' % d[0])
27         sys.stdout.write ('#endif /* %s */\n' % d[0])           
28         
29         sys.stdout.write ('#define %s "%s"\n' % d)
30         
31 if ('MY_PATCH_LEVEL', '') in defs:
32         sys.stdout.write ('#define NO_MY_PATCHLEVEL')
33
34 sys.stdout.write(r'''
35 #endif
36 ''')
37