7 reldir = str (Dir ('.').srcnode ())
9 ###sources = glob.glob ('*.tely') + glob.glob ('user/*.tely')
10 sources = ['user/lilypond.tely', 'user/music-glossary.tely']
11 pngs = glob.glob ('user/*.png')
16 outdir = os.path.join (env['build'], reldir, env['out'])
19 e.Append (LILYPOND_BOOK_PATH = [os.path.join (env['srcdir'], reldir, 'user')])
20 e['LILYPOND_BOOK_PATH'].append (os.path.join (env['srcdir'], reldir, 'user'))
24 def verbose_opt (env, opt):
29 LILYPOND_BIN = env['LILYPOND_BIN']
30 LILYPONDPREFIX = env['LILYPONDPREFIX']
33 mfbuild = os.path.join (env['absbuild'], 'mf', env['out'])
34 lilybuild = os.path.join (env['absbuild'], 'lily', env['out'])
35 userbuild = os.path.join (env['absbuild'], 'Documentation/user', env['out'])
36 e.Depends ('user/lilypond.texi', os.path.join (mfbuild, 'feta16list.ly'))
37 e.Depends ('user/lilypond.texi', os.path.join (mfbuild, 'parmesan16list.ly'))
38 e.Depends ('lilypond.texi', 'lilypond-internals.texi')
39 e.Depends ('lilypond.texi', os.path.join (lilybuild, 'lilypond-bin'))
41 png_stems = map (lambda x: os.path.splitext (x)[0], pngs)
42 epss = map (e.Png2eps, png_stems)
43 e.Depends ('lilypond.texi', epss)
45 e.Command ('lilypond-internals.texi', LILYPOND_BIN,
46 ('(cd $$(dirname $TARGET) && \
47 LILYPONDPREFIX=%(LILYPONDPREFIX)s %(LILYPOND_BIN)s ' \
48 + verbose_opt (env, ' --verbose') \
49 + ' ' + os.path.join (env['srcdir'], 'ly/generate-documentation')\
52 doc_stems = map (lambda x: os.path.splitext (x)[0], sources)
53 texis = map (e.Tely2texi, doc_stems)
54 dvis = map (e.Texi2dvi, doc_stems)
55 pss = map (e.PostScript, map (lambda x: x + '.dvi', doc_stems))
56 pdfs = map (e.Dvi2pdf, doc_stems)
58 docdir = os.path.join (env['srcdir'], 'Documentation')
60 # TODO: purl (ugh?), symlinks
61 a = ('makeinfo -I$$(dirname $SOURCE) \
62 --output=%(out)s/lilypond \
63 --css-include=%(docdir)s/texinfo.css \
65 + verbose_opt (env, ' --verbose') \
67 makeinfo -I$$(dirname $SOURCE) \
69 --css-include=%(docdir)s/texinfo.css \
70 --html --no-split --no-headers' \
71 + verbose_opt (env, ' --verbose') \
72 + ' $SOURCE') % vars ()
73 #e.Command ('lilypond/lilypond.html',
75 e.Command ('user/lilypond/lilypond.html',
77 # os.path.join (userbuild, 'lilypond.texi'),
80 # TODO: purl (ugh?), symlinks
81 a = ('makeinfo -I$$(dirname $SOURCE) \
82 --output=%(out)s/lilypond-internals \
83 --css-include=%(docdir)s/texinfo.css \
85 + verbose_opt (env, ' --verbose') \
87 makeinfo -I$$(dirname $SOURCE) \
89 --css-include=%(docdir)s/texinfo.css \
90 --html --no-split --no-headers' \
91 + verbose_opt (env, ' --verbose') \
92 + ' $SOURCE') % vars ()
93 #e.Command ('lilypond-internals/lilypond-internals.html',
94 # 'lilypond-internals.texi',
95 e.Command ('user/lilypond-internals/lilypond-internals.html',
96 'user/lilypond-internals.texi',
97 # os.path.join (userbuild, 'lilypond-internals.texi'),
100 e.Alias ('doc', texis)
101 e.Alias ('doc', dvis)
103 e.Alias ('doc', pdfs)
105 #e.Alias ('doc', 'user/lilypond-internals/lilypond.html')
106 #e.Alias ('doc', 'user/lilypond-internals/lilypond-internals.html')
109 all_sources = ['SConscript',] + sources
110 x = env.Tar (env['tarball'], all_sources)