7 telys = env['glob'] (env, '*.tely')
8 pngs = env['glob'] (env, '*.png')
10 env.Depends ('lilypond.texi', env['LILYPOND_BIN'])
11 env.Depends ('lilypond.texi', 'lilypond-internals.texi')
13 epss = map (env.Png2eps, pngs)
14 env.Depends ('lilypond.texi', epss)
17 LILYPOND_BOOK_FLAGS = '''--process="lilypond-bin -I$srcdir/input/test -e '(ly:set-option (quote internal-type-checking) \#t)'"''',
18 __verbose = ' --verbose',
21 e.Command ('lilypond-internals.texi', env['LILYPOND_BIN'],
23 && LILYPONDPREFIX=$LILYPONDPREFIX $LILYPOND_BIN $__verbose \
24 $srcdir/ly/generate-documentation')
26 texis = map (env.TEXI, telys)
27 dvis = map (env.Texi2dvi, telys)
28 pss = map (env.PostScript, map (lambda x: x + '.dvi', telys))
29 pdfs = map (env.Dvi2pdf, telys)
30 infos = map (env.INFO, telys)
32 def file_subst (file_name, find, subst):
33 s = open (file_name).read ()
34 t = string.replace (s, find, subst)
36 os.rename (file_name, file_name + '~')
37 h = open (file_name, "w")
41 e['usersrc'] = Dir ('.').srcnode ().abspath
42 def url_fixup (target, source, env):
43 file_subst (str (target[0]),
44 '../lilypond-internals', 'lilypond-internals/')
45 a = ['$MAKEINFO -I$srcdir/Documenation/user -I${SOURCE.dir} --html \
46 --css-include=$srcdir/Documentation/texinfo.css $__verbose \
47 --output=${TARGET.dir} $SOURCE',
48 '$MAKEINFO -I$srcdir/Documentation/user -I${SOURCE.dir} --html \
49 --no-split --no-headers \
50 --css-include=$srcdir/Documentation/../texinfo.css $__verbose \
51 --output=$TARGET $SOURCE',
53 'ln -f ${SOURCE.dir}/*.png ${SOURCE.dir}/*.ly ${TARGET.dir}/']
55 e.Command ('lilypond/lilypond.html', 'lilypond.texi', a)
56 e.Command ('lilypond-internals/lilypond-internals.html',
57 'lilypond-internals.texi', a)
59 #Hmm -- why not just mv ./Documentation/{*,*/*} ./doc :-)
60 env.Alias ('doc', texis)
61 env.Alias ('doc', dvis)
62 env.Alias ('doc', pss)
63 env.Alias ('doc', pdfs)
65 env.Alias ('doc', 'lilypond/lilypond.html')
66 env.Alias ('doc', 'lilypond-internals/lilypond-internals.html')