7 telys = env['glob'] (env, '*.tely')
8 pngs = env['glob'] (env, '*.png')
10 # We need lily and mf to build these.
11 env.Depends ('lilypond.texi', ['#/lily', '#/mf'])
12 env.Depends ('music-glossary.texi', ['#/lily', '#/mf'])
14 env.Depends ('lilypond.texi', 'lilypond-internals.texi')
16 epss = map (env.Png2eps, pngs)
17 env.Depends ('lilypond.texi', epss)
20 LILYPOND_BOOK_FLAGS = '''--process="lilypond-bin -I$srcdir/input/test -e '(ly:set-option (quote internal-type-checking) \#t)'"''',
21 __verbose = ' --verbose',
24 e.Command ('lilypond-internals.texi', env['LILYPOND_BIN'],
26 && LILYPONDPREFIX=$LILYPONDPREFIX $LILYPOND_BIN $__verbose \
27 $srcdir/ly/generate-documentation')
29 texis = map (env.TEXI, telys)
30 dvis = map (env.Texi2dvi, telys)
31 pss = map (env.PostScript, map (lambda x: x + '.dvi', telys))
32 pdfs = map (env.Dvi2pdf, telys)
33 infos = map (env.INFO, telys)
35 def file_subst (file_name, find, subst):
36 s = open (file_name).read ()
37 t = string.replace (s, find, subst)
39 os.rename (file_name, file_name + '~')
40 h = open (file_name, "w")
44 e['usersrc'] = Dir ('.').srcnode ().abspath
45 e['userout'] = Dir ('.').abspath
46 def url_fixup (target, source, env):
47 file_subst (str (target[0]),
48 '../lilypond-internals', 'lilypond-internals/')
50 a = ['$MAKEINFO -I$usersrc -I${SOURCE.dir} --html \
51 --css-include=$srcdir/Documentation/texinfo.css $__verbose \
52 --output=${TARGET.dir} $SOURCE',
53 '$MAKEINFO -I$usersrc -I${SOURCE.dir} --html \
54 --no-split --no-headers \
55 --css-include=$srcdir/Documentation/texinfo.css $__verbose \
56 --output=$TARGET $SOURCE',
58 'ln -f ${SOURCE.dir}/*.png ${SOURCE.dir}/*.ly ${TARGET.dir}/',]
60 e.Command ('lilypond/lilypond.html', 'lilypond.texi', a)
61 e.Command ('lilypond-internals/lilypond-internals.html',
62 'lilypond-internals.texi', a)
64 #Hmm -- why not just mv ./Documentation/{*,*/*} ./doc :-)
65 env.Alias ('doc', texis)
66 env.Alias ('doc', dvis)
67 env.Alias ('doc', pss)
68 env.Alias ('doc', pdfs)
70 env.Alias ('doc', 'lilypond/lilypond.html')
71 env.Alias ('doc', 'lilypond-internals/lilypond-internals.html')