From: Jan Nieuwenhuizen Date: Sun, 11 Jul 2004 13:53:07 +0000 (+0000) Subject: * input/mutopia-header.ly: Generate output. X-Git-Tag: release/2.3.7~72 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=63a4c4c652ddce7338b9e0f47d0e0c7de4d7a705;p=lilypond.git * input/mutopia-header.ly: Generate output. * SConstruct: * buildscripts/builder.py: * Documentation/user/SConscript: SCons fixes. --- diff --git a/ChangeLog b/ChangeLog index cb63345045..9b4a503654 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-07-11 Jan Nieuwenhuizen + + * input/mutopia-header.ly: Generate output. + + * SConstruct: + * buildscripts/builder.py: + * Documentation/user/SConscript: SCons fixes. + 2004-07-11 Han-Wen Nienhuys * lily/new-slur.cc (class New_slur): new file. Score based slur diff --git a/Documentation/user/SConscript b/Documentation/user/SConscript index 8e6e137ac5..8db0723640 100644 --- a/Documentation/user/SConscript +++ b/Documentation/user/SConscript @@ -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) diff --git a/buildscripts/builder.py b/buildscripts/builder.py index 16b3c0db20..c815f59d63 100644 --- a/buildscripts/builder.py +++ b/buildscripts/builder.py @@ -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}) diff --git a/input/mutopia-header.ly b/input/mutopia-header.ly index 43b9945db9..faa53c5181 100644 --- a/input/mutopia-header.ly +++ b/input/mutopia-header.ly @@ -32,3 +32,6 @@ tagline = \mutopiapublicdomain footer = "pre-Mutopia-2001/mm/dd-nn" } + +%% the music +{ c'' } \ No newline at end of file