7 reldir = str (Dir ('.').srcnode ())
9 sources = glob.glob ('*.tely')
10 pngs = glob.glob ('*.png')
15 outdir = os.path.join (env['build'], reldir, env['out'])
18 e.Append (LILYPOND_BOOK_PATH = [os.path.join (env['srcdir'], reldir, 'user')])
19 e['LILYPOND_BOOK_PATH'].append (os.path.join (env['srcdir'], reldir, 'user'))
21 def verbose_opt (env, opt):
26 LILYPOND_BIN = env['LILYPOND_BIN']
27 LILYPONDPREFIX = env['LILYPONDPREFIX']
29 mfbuild = os.path.join (env['absbuild'], 'mf', env['out'])
30 lilybuild = os.path.join (env['absbuild'], 'lily', env['out'])
31 userbuild = os.path.join (env['absbuild'], 'Documentation/user', env['out'])
32 e.Depends ('lilypond.texi', os.path.join (mfbuild, 'feta16list.ly'))
33 e.Depends ('lilypond.texi', os.path.join (mfbuild, 'parmesan16list.ly'))
34 e.Depends ('lilypond.texi', LILYPOND_BIN)
35 e.Depends ('lilypond.texi', 'lilypond-internals.texi')
36 #e.Depends ('lilypond.texi', os.path.join (lilybuild, 'lilypond-bin'))
38 png_stems = map (lambda x: os.path.splitext (x)[0], pngs)
39 epss = map (e.Png2eps, png_stems)
40 e.Depends ('lilypond.texi', epss)
42 e.Command ('lilypond-internals.texi', LILYPOND_BIN,
43 ('(cd $$(dirname $TARGET) && \
44 LILYPONDPREFIX=%(LILYPONDPREFIX)s %(LILYPOND_BIN)s ' \
45 + verbose_opt (env, ' --verbose') \
46 + ' ' + os.path.join (env['srcdir'], 'ly/generate-documentation')\
49 doc_stems = map (lambda x: os.path.splitext (x)[0], sources)
50 texis = map (e.Tely2texi, doc_stems)
51 dvis = map (e.Texi2dvi, doc_stems)
52 pss = map (e.PostScript, map (lambda x: x + '.dvi', doc_stems))
53 pdfs = map (e.Dvi2pdf, doc_stems)
55 docdir = os.path.join (env['srcdir'], 'Documentation')
57 srcdir = env['srcdir']
58 ##MAKEINFO_INCLUDES = join_path (env['MAKEINFO_PATH'], '', ' -I')
59 ##MAKEINFO = env['MAKEINFO']
60 # TODO: purl (ugh?), symlinks
61 verbose = verbose_opt (env, ' --verbose')
62 a = ('makeinfo -I%(srcdir)s/%(reldir)s -I$$(dirname $SOURCE)'\
63 + ' --output=%(out)s/lilypond'\
64 + ' --css-include=%(docdir)s/texinfo.css'\
65 + ' --html%(verbose)s'\
67 + ' makeinfo -I%(srcdir)s/%(reldir)s -I$$(dirname $SOURCE)' \
68 + ' --output=$TARGET' \
69 + ' --css-include=%(docdir)s/texinfo.css' \
70 + ' --html --no-split --no-headers %(verbose)s' \
71 + ' $SOURCE') % vars ()
72 e.Command ('lilypond/lilypond.html', 'lilypond.texi', a)
74 # TODO: purl (ugh?), symlinks
75 a = ('makeinfo -I%(srcdir)s/%(reldir)s -I$$(dirname $SOURCE)'\
76 + ' --output=%(out)s/lilypond-internals' \
77 + ' --css-include=%(docdir)s/texinfo.css' \
78 + ' --html%(verbose)s'\
80 + ' makeinfo -I%(srcdir)s/%(reldir)s -I$$(dirname $SOURCE)' \
81 + ' --output=$TARGET' \
82 + ' --css-include=%(docdir)s/texinfo.css' \
83 + ' --html --no-split --no-headers %(verbose)s' \
84 + ' $SOURCE') % vars ()
85 e.Command ('lilypond-internals/lilypond-internals.html',
86 'lilypond-internals.texi',
89 e.Alias ('doc', texis)
94 e.Alias ('doc', 'lilypond-internals/lilypond.html')
95 e.Alias ('doc', 'lilypond-internals/lilypond-internals.html')
98 all_sources = ['SConscript',] + sources + pngs
99 x = env.Tar (env['tarball'], all_sources)