]> git.donarmstrong.com Git - lilypond.git/commitdiff
* input/mutopia-header.ly: Generate output.
authorJan Nieuwenhuizen <janneke@gnu.org>
Sun, 11 Jul 2004 13:53:07 +0000 (13:53 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sun, 11 Jul 2004 13:53:07 +0000 (13:53 +0000)
* SConstruct:
* buildscripts/builder.py:
* Documentation/user/SConscript: SCons fixes.

ChangeLog
Documentation/user/SConscript
buildscripts/builder.py
input/mutopia-header.ly

index cb6334504537c87dc1ebc4b66b92963938b3d4f5..9b4a5036541792f3b9195ec7d35231442eb20f63 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2004-07-11  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+       * input/mutopia-header.ly: Generate output.
+
+       * SConstruct:
+       * buildscripts/builder.py:
+       * Documentation/user/SConscript: SCons fixes.
+
 2004-07-11  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
        * lily/new-slur.cc (class New_slur): new file. Score based slur
index 8e6e137ac52f35c7594e51170c7038238a940d32..8db0723640cff22052350d082093b6f23a1e3d04 100644 (file)
@@ -2,6 +2,8 @@
 
 import glob
 import os
+import re
+import sys
 
 here = os.getcwd ()
 reldir = str (Dir ('.').srcnode ())
@@ -52,12 +54,20 @@ dvis = map (e.Texi2dvi, doc_stems)
 pss = map (e.PostScript, map (lambda x: x + '.dvi', doc_stems))
 pdfs = map (e.Dvi2pdf, doc_stems)
 
+
+def file_subst (file_name, find, subst):
+       find_re = re.compile (find, re.MULTILINE)
+       s = open (file_name).read ()
+       t = re.sub (find_re, subst, s)
+       if s != t:
+               os.rename (file_name, file_name + '~')
+               h = open (file_name, "w")
+               h.write (t)
+               h.close ()
+
 docdir = os.path.join (env['srcdir'], 'Documentation')
 out = env['out']
 srcdir = env['srcdir']
-##MAKEINFO_INCLUDES = join_path (env['MAKEINFO_PATH'], '', ' -I')
-##MAKEINFO = env['MAKEINFO']
-# TODO: purl (ugh?), symlinks
 verbose = verbose_opt (env, ' --verbose')
 a = ('makeinfo -I%(reldir)s -I${SOURCE.dir}'\
      + ' --output=${TARGET.dir}'\
@@ -69,7 +79,11 @@ a = ('makeinfo -I%(reldir)s -I${SOURCE.dir}'\
      + ' --css-include=%(docdir)s/texinfo.css' \
      + ' --html --no-split --no-headers %(verbose)s' \
      + ' $SOURCE') % vars ()
-e.Command ('lilypond/lilypond.html', 'lilypond.texi', a)
+def url_fixup (target, source, env):
+       file_subst (str (target[0]),
+                   '\.\./lilypond-internals', 'lilypond-internals/')
+c = 'pwd; ln -f %(userbuild)s/*.png %(userbuild)s/*.ly ${TARGET.dir}/' % vars ()
+e.Command ('lilypond/lilypond.html', 'lilypond.texi', [a, url_fixup, c])
 e.Command ('lilypond-internals/lilypond-internals.html',
           'lilypond-internals.texi', a)
 
index 16b3c0db20b2987feb5be91499f9679b8b384770..c815f59d632ff4446606fe44eaa82e4e3ff502ac 100644 (file)
@@ -97,10 +97,12 @@ lilypond = Builder (action = a, suffix = '.pdf', src_suffix = '.ly')
 ##                 emitter = add_ps_target)
 env.Append (BUILDERS = {'LilyPond': lilypond})
 
-verbose = verbose_opt (env, ' --verbose')
+#verbose = verbose_opt (env, ' --verbose')
+verbose = ''
 a = ('LILYPONDPREFIX=%(LILYPONDPREFIX)s '\
      + '%(PYTHON)s %(ABC2LY_PY)s%(verbose)s'\
-     + ' --include=${TARGET.dir}'\
+#     + ' --include=${TARGET.dir}'\
+     + ' --strict'\
      + ' --output=${TARGET.base}'\
      + ' $SOURCE') % vars ()
 abc2ly = Builder (action = a, suffix = '.ly', src_suffix = '.abc')
@@ -164,33 +166,37 @@ def encoding_opt (target):
        return ''
 
 # UGH, should fix --output option for mftrace
-xpfa = Builder (action = ('MFINPUTS=.:' + str (Dir ('#/mf')) \
-                        + ' mftrace -I %(outdir)s --pfa' \
-                        + ' --simplify --keep-trying' \
-                        + ' ${SOURCE.filebase} ' \
-                        + ' && mv ${TARGET.filebase} $TARGET') % vars (),
+verbose = verbose_opt (env, ' --verbose')
+a = ('(cd ${TARGET.dir} && '
+     + ' if test -e ${SOURCE.filebase}.enc; then encoding="--encoding=${SOURCE.filebase}.enc"; fi;' \
+#     + ' MFINPUTS=.:${TARGET.dir}:${SOURCE.dir}'\
+# ugrh
+     + ' MFINPUTS=%(srcdir)s/mf}:.:'\
+     + ' mftrace --pfa --simplify --keep-trying $$encoding%(verbose)s'\
+     + ' --include=${TARGET.dir}'\
+     + ' ${SOURCE.file})') % vars ()
+
+pfa = Builder (action = a,
               suffix = '.pfa',
               src_suffix = '.mf',
               emitter = add_enc_src)
 
-verbose = verbose_opt (env, ' --verbose')
 def run_mftrace (target, source, env):
        TARGET = target[0]
        SOURCE = source[0]
        mf = os.path.basename (str (source[0]))
        base = os.path.splitext (os.path.basename (str (target[0])))[0]
        enc = base + '.enc'
-       mfdir = os.path.join (here, reldir)
-       outdir = os.path.join (env['build'], reldir, env['out'])
        encoding = encoding_opt (target)
-       command = ('(cd ${TARGET.dir} && '
-                  + ' MFINPUTS=.:${TARGET.dir}:' + mfdir\
+       verbose = verbose_opt (env, ' --verbose')
+       command = ('(cd $$(dirname %(TARGET)s && '
+                  + ' MFINPUTS=.:$$(dirname %(TARGET)s):$$(dirname %(SOURCE)s'\
                   + ' mftrace --pfa --simplify --keep-trying%(verbose)s'\
                   + ' --include=${TARGET.dir}'\
                   + ' %(encoding)s %(mf)s)') % vars ()
        return os.system (command)
 
-pfa = Builder (action = run_mftrace, suffix = '.pfa', src_suffix = '.mf',
+xpfa = Builder (action = run_mftrace, suffix = '.pfa', src_suffix = '.mf',
               emitter = add_enc_src)
 env.Append (BUILDERS = {'PFA': pfa})
 
index 43b9945db96da93432770f05b0afd316c8ff3e9e..faa53c518106d5b371fb020aef2692efeb2147f9 100644 (file)
@@ -32,3 +32,6 @@
  tagline = \mutopiapublicdomain
  footer = "pre-Mutopia-2001/mm/dd-nn"
 }
+
+%% the music
+{ c'' }
\ No newline at end of file