import string
Import ('env')
-sources = env['src_glob'] (env, '*.tely')
-pngs = env['src_glob'] (env, '*.png')
-
-mfbuild = os.path.join (env['absbuild'], 'mf', env['out'])
-lilybuild = os.path.join (env['absbuild'], 'lily', env['out'])
-userbuild = os.path.join (env['absbuild'], 'Documentation/user', env['out'])
+telys = env['glob'] (env, '*.tely')
+pngs = env['glob'] (env, '*.png')
env.Depends ('lilypond.texi', env['LILYPOND_BIN'])
env.Depends ('lilypond.texi', 'lilypond-internals.texi')
-png_stems = map (lambda x: os.path.splitext (x)[0], pngs)
-epss = map (env.Png2eps, png_stems)
+epss = map (env.Png2eps, pngs)
env.Depends ('lilypond.texi', epss)
-lydir = Dir ('.').srcnode ().abspath + '/../../ly'
-env.Command ('lilypond-internals.texi', env['LILYPOND_BIN'],
+e = env.Copy (
+ LILYPOND_BOOK_FLAGS = '''--process="lilypond-bin -I$srcdir/input/test -e '(ly:set-option (quote internal-type-checking) \#t)'"''',
+ __verbose = ' --verbose',
+ )
+
+e.Command ('lilypond-internals.texi', env['LILYPOND_BIN'],
'cd ${TARGET.dir} \
&& LILYPONDPREFIX=$LILYPONDPREFIX $LILYPOND_BIN $__verbose \
- $lydir/generate-documentation')
-
-doc_stems = map (lambda x: os.path.splitext (x)[0], sources)
-texis = map (env.TEXI, doc_stems)
-dvis = map (env.Texi2dvi, doc_stems)
-pss = map (env.PostScript, map (lambda x: x + '.dvi', doc_stems))
-pdfs = map (env.Dvi2pdf, doc_stems)
+ $srcdir/ly/generate-documentation')
+texis = map (env.TEXI, telys)
+dvis = map (env.Texi2dvi, telys)
+pss = map (env.PostScript, map (lambda x: x + '.dvi', telys))
+pdfs = map (env.Dvi2pdf, telys)
+infos = map (env.INFO, telys)
def file_subst (file_name, find, subst):
s = open (file_name).read ()
- t = string.replace (find, subst, s)
+ t = string.replace (s, find, subst)
if s != t:
os.rename (file_name, file_name + '~')
h = open (file_name, "w")
h.write (t)
h.close ()
-e = env.Copy ()
e['usersrc'] = Dir ('.').srcnode ().abspath
def url_fixup (target, source, env):
file_subst (str (target[0]),
- '\.\./lilypond-internals', 'lilypond-internals/')
-a = ['$MAKEINFO -I$usersrc -I${SOURCE.dir} --html \
---css-include=$usersrc/../texinfo.css $__verbose \
+ '../lilypond-internals', 'lilypond-internals/')
+a = ['$MAKEINFO -I$srcdir/Documenation/user -I${SOURCE.dir} --html \
+--css-include=$srcdir/Documentation/texinfo.css $__verbose \
--output=${TARGET.dir} $SOURCE',
- '$MAKEINFO -I$usersrc -I${SOURCE.dir} --html --no-split --no-headers \
- --css-include=$usersrc/../texinfo.css $__verbose \
+ '$MAKEINFO -I$srcdir/Documentation/user -I${SOURCE.dir} --html \
+ --no-split --no-headers \
+ --css-include=$srcdir/Documentation/../texinfo.css $__verbose \
--output=$TARGET $SOURCE',
url_fixup,
'ln -f ${SOURCE.dir}/*.png ${SOURCE.dir}/*.ly ${TARGET.dir}/']
e.Command ('lilypond-internals/lilypond-internals.html',
'lilypond-internals.texi', a)
+#Hmm -- why not just mv ./Documentation/{*,*/*} ./doc :-)
env.Alias ('doc', texis)
env.Alias ('doc', dvis)
env.Alias ('doc', pss)