]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/user/SConscript
* SConstruct: Further development.
[lilypond.git] / Documentation / user / SConscript
index 3c1d1d5b9e1bb0956c1c6698be67dd3592535569..cc9c31808f3622ae9a5033b4291535bc0e32caf6 100644 (file)
@@ -13,7 +13,12 @@ env.Depends ('lilypond.texi', 'lilypond-internals.texi')
 epss = map (env.Png2eps, pngs)
 env.Depends ('lilypond.texi', epss)
 
-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 \
             $srcdir/ly/generate-documentation')
@@ -26,14 +31,13 @@ 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]),
@@ -52,6 +56,7 @@ e.Command ('lilypond/lilypond.html', 'lilypond.texi', a)
 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)