]> git.donarmstrong.com Git - lilypond.git/commitdiff
* mf/SConscript: Build map files.
authorjanneke <janneke>
Sun, 18 Jul 2004 10:42:45 +0000 (10:42 +0000)
committerjanneke <janneke>
Sun, 18 Jul 2004 10:42:45 +0000 (10:42 +0000)
* SConstruct: Rename $out to out-www in web.

ChangeLog
SConstruct
buildscripts/builder.py
mf/SConscript
python/SConscript [new file with mode: 0644]
scripts/lilypond-book.py

index a0f4a5a4b4394ba13189436ac60652a6221dec91..98ec448363a97d1ac295857792aaa3fbd567e2b2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-07-18  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+       * mf/SConscript: Build map files.
+
+       * SConstruct: Rename $out to out-www in web.
+
 2004-07-17  Jan Nieuwenhuizen  <janneke@gnu.org>
 
        * SConstruct (web_kluts): Have make web build in out-www.  Not.
index 55605d69775d9271561f1a00fa3aa11f0c1315a5..42b93c0a7297e551055fa450d15e30a9b7847655 100644 (file)
@@ -184,14 +184,6 @@ if env['checksums']:
        SetOption ('max_drift', 0)
        TargetSignatures ("content")
 
-# build web in out-www, so that scons is a drop-in replacement for make
-# we can revise the entire web building when web is built with scons.
-web_kluts = ''
-# Hmm:  scons: *** maximum recursion limit exceeded
-if 0 and 'web' in COMMAND_LINE_TARGETS:
-       web_kluts = 'out-scons' #env['out']
-       env['out'] = 'out-www'
-
 absbuild = Dir (env['build']).abspath
 outdir = os.path.join (Dir (env['build']).abspath, env['out'])
 run_prefix = os.path.join (absbuild, os.path.join (env['out'], 'usr'))
@@ -750,18 +742,24 @@ env.Command (web_list,
             '#/VERSION',
             ['$PYTHON buildscripts/mutopia-index.py -o examples.html ./',
              'cd $absbuild && $footify $$(find . -name "*.html" -print)',
-             # uhg?
              'cd $absbuild && rm -f $$(find . -name "*.html~" -print)',
              'cd $absbuild && find Documentation input $web_path \
              > $TARGET',
              '''echo '<META HTTP-EQUIV="refresh" content="0;URL=Documentation/out-www/index.html">' > $absbuild/index.html''',
              '''echo '<html><body>Redirecting to the documentation index...</body></html>' >> $absbuild/index.html''',
-             # UGHR?  all .html cruft in cwd goes into the web ball?
              'cd $absbuild && ls *.html >> $TARGET',])
 env.Command (web_ball, web_list,
             ['cat $SOURCE | tar -C $absbuild -czf $TARGET -T -',])
-env.Alias ('web', web_ball)
-env.Alias ('roll-web', web_ball)
+#env.Alias ('web', web_ball)
+www_base = os.path.join (outdir, 'www')
+www_ball = www_base + '.tar.gz'
+env.Command (www_ball, web_ball,
+            ['rm -rf $out/tmp',
+             'mkdir -p $absbuild/$out/tmp',
+             'tar -C $absbuild/$out/tmp -xzf $SOURCE',
+             'cd $absbuild/$out/tmp && for i in $$(find . -name "$out"; do mv $i out-www; done',
+             'tar -C $absbuild/$out/tmp -czf $TARGET .'])
+env.Alias ('web', www_ball)
 
 #### tags
 env.Append (
@@ -780,9 +778,5 @@ for d in subdirs:
                # and ./out build.
                if os.path.abspath (b) != os.path.abspath (d):
                        env.BuildDir (b, d, duplicate = 0)
-               if web_kluts:
-                       # look in out-scons 
-                       env.Repository (os.path.join (env['build'], d,
-                                                     web_kluts))
                        SConscript (os.path.join (b, 'SConscript'))
 
index 66336aaa2f128eab68501bb6bcfe0868e528a061..730a96674334f225bf7a43044c310f3207865109 100644 (file)
@@ -183,7 +183,7 @@ def add_enc_ly_tex_target (target, source, env):
        return (target + [base + '.enc', base + '.tex', base + 'list.ly'],
                source)
 a = 'cd ${TARGET.dir} && \
-MFINPUTS=.:${SOURCE.dir}:$srcdir/${SOURCE.dir} \
+MFINPUTS=.:${SOURCE.dir}:$srcdir/${SOURCE.dir}: \
 mf "\\mode:=$MFMODE; nonstopmode; input ${SOURCE.filebase};" \
 | grep -v "@\|>>"'
 tfm = Builder (action = a, suffix = '.tfm', src_suffix = '.mf',
index 817d5ca8e2ed52a2f3b5bb074d9ef1c0a78231d7..6073e8c660236377767b00d863ce7dbe57c8f341 100644 (file)
@@ -1,28 +1,61 @@
 # -*-python-*-
 
+import os
+import string
+
 Import ('env', 'base_glob', 'install')
-fonts = reduce (lambda x, y: x + y,
-               map (lambda x: base_glob (x),
-                    ('feta[0-9]*.mf',
-                     'feta-braces-[a-z].mf',
-                     'feta-din*[0-9].mf',
-                     'feta-nummer*[0-9].mf',
-                     'parmesan[0-9]*.mf',)))
+feta = reduce (lambda x, y: x + y,
+              map (lambda x: base_glob (x),
+                   ('feta[0-9]*.mf',
+                    'feta-braces-[a-z].mf',
+                    'feta-din*[0-9].mf',
+                    'feta-nummer*[0-9].mf',
+                    'parmesan[0-9]*.mf',)))
+
+# .pfa rules want an encoding file; ecb10.enc
+#sauter = ['ecb10']
+sauter = []
+fonts = feta + sauter
+env['feta'] = string.join (feta)
+env['sauter'] = ''
 
 t = map (env.TFM, fonts)
-a = map (env.AFM, fonts)
+a = map (env.AFM, feta)
 p = map (env.PFA, fonts)
 
-import os
-map (lambda x: env.Depends (x + '.pfa', x + '.enc'), fonts)
-#     map (lambda x: os.path.splitext (x)[0], fonts))
+map (lambda x: env.Depends (x + '.pfa', x + '.enc'), feta)
 
 mf_essential = ['feta16', 'feta20', 'parmesan16', ]
 pfa_essential = map (env.PFA, mf_essential)
-env.Command ('cmr.enc', 'cmr.enc.in', 'cp $SOURCE $TARGET')
 env.Alias ('mf-essential', pfa_essential)
+
+env.Command ('cmr.enc', 'cmr.enc.in', 'cp $SOURCE $TARGET')
 env.Alias ('mf', 'cmr.enc')
 
+env.Command ('lilypond.map', p,
+            ['for i in $feta; do echo $$i $$(fgrep FontName ${TARGET.dir}/$$i.afm | sed -e "s/FontName *//") "<"$$i.pfa; done > $TARGET',
+             'for i in $sauter; do echo "$$i $$i <$$i.pfa"; done >> $TARGET'])
+env.Alias ('mf', 'lilypond.map')
+
+env.Command ('fonts.scale', p,
+            'cd ${TARGET.dir} && echo *.pfa *.pfb | $PYTHON $srcdir/buildscripts/make-font-dir.py  > $TARGET.file')
+env.Alias ('mf', 'fonts.scale')
+
+env.Command ('Fontmap', p,
+            ["echo '%!' > $TARGET",
+             "echo '% Override default GS Fontmap' >> $TARGET",
+             "echo '% To let gs load fonts from builddir, do:' >> $TARGET",
+             "echo '% export GS_LIB=$$(pwd)/mf/out:' >> $TARGET",
+             "echo '% See Fontmap.GS for the syntax of real Fontmap files.' >> $TARGET",
+             "echo '(Fontmap.GS) .runlibfile' >> $TARGET",
+             "echo '(Fontmap.lily) .runlibfile' >> $TARGET"])
+
+env.Command ('Fontmap.lily', p + ['Fontmap'],
+            ['echo "%!" > $TARGET',
+             '''for i in $feta; do echo "/$$(fgrep FontName ${TARGET.dir}/$$i.afm | sed -e 's/FontName *//') ($$i.pfa);"; done >> $TARGET''',
+             '''for i in $sauter; do echo "$$i ($$i.pfa);"; done >> $TARGET'''])
+env.Alias ('mf', 'Fontmap.lily')
+
 # build essential stuff first, that's friendlier
 env.Alias ('mf', pfa_essential + p)
 
diff --git a/python/SConscript b/python/SConscript
new file mode 100644 (file)
index 0000000..065d203
--- /dev/null
@@ -0,0 +1,13 @@
+# -*-python-*-
+
+Import ('env', 'install', 'src_glob')
+py = src_glob ('*.py')
+c = src_glob ('*.c')
+
+pym = env.AT_COPY (py)
+cm = env.SharedObject (c)
+
+pym
+cm
+
+install ([cm, pym], env['sharedir_package_version'] + '/python')
index 75fe418591e457ca349a2248123269d3fbdb6621..42991681ad02a611121aa3fe0d7e8cadeeb6b6a1 100644 (file)
@@ -351,9 +351,7 @@ def compose_ly (code, options):
        if QUOTE in options and LINEWIDTH in options:
                options.remove (LINEWIDTH)
 
-       m = re.search (r'''\\(header|score)''', code)
-       if not m and (not options \
-                     or not NOFRAGMENT in options or FRAGMENT in options):
+       if FRAGMENT in options:
                if RAGGEDRIGHT not in options:
                        options.append (RAGGEDRIGHT)
                body = FRAGMENT_LY