From: janneke Date: Sun, 18 Jul 2004 10:42:45 +0000 (+0000) Subject: * mf/SConscript: Build map files. X-Git-Tag: release/2.3.9~80 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a8936b75f4f5478c07c86535380a2202d532e5e1;p=lilypond.git * mf/SConscript: Build map files. * SConstruct: Rename $out to out-www in web. --- diff --git a/ChangeLog b/ChangeLog index a0f4a5a4b4..98ec448363 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-07-18 Jan Nieuwenhuizen + + * mf/SConscript: Build map files. + + * SConstruct: Rename $out to out-www in web. + 2004-07-17 Jan Nieuwenhuizen * SConstruct (web_kluts): Have make web build in out-www. Not. diff --git a/SConstruct b/SConstruct index 55605d6977..42b93c0a72 100644 --- a/SConstruct +++ b/SConstruct @@ -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 '' > $absbuild/index.html''', '''echo 'Redirecting to the documentation index...' >> $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')) diff --git a/buildscripts/builder.py b/buildscripts/builder.py index 66336aaa2f..730a966743 100644 --- a/buildscripts/builder.py +++ b/buildscripts/builder.py @@ -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', diff --git a/mf/SConscript b/mf/SConscript index 817d5ca8e2..6073e8c660 100644 --- a/mf/SConscript +++ b/mf/SConscript @@ -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 index 0000000000..065d2032f0 --- /dev/null +++ b/python/SConscript @@ -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') diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index 75fe418591..42991681ad 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -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