* SConstruct: Rename $out to out-www in web.
+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.
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'))
'#/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 (
# 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'))
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',
# -*-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)
--- /dev/null
+# -*-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')
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