From: Jan Nieuwenhuizen Date: Fri, 6 May 2005 08:23:23 +0000 (+0000) Subject: * mf/GNUmakefile (MFTRACE_FLAGS): X-Git-Tag: release/2.5.24~57 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=36ee66d266ca8cf85ff89f6d60393154467b0c71;p=lilypond.git * mf/GNUmakefile (MFTRACE_FLAGS): * buildscripts/substitute-encoding.py (outdir): Build fix: pass outdir as option (WAS: hardcoded). --- diff --git a/ChangeLog b/ChangeLog index 40d8308cd0..0468e3a252 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-05-06 Jan Nieuwenhuizen + + * mf/GNUmakefile (MFTRACE_FLAGS): + * buildscripts/substitute-encoding.py (outdir): Build fix: pass + outdir as option (WAS: hardcoded). + 2005-05-06 Han-Wen Nienhuys * THANKS: add Hans Forbrich. diff --git a/buildscripts/substitute-encoding.py b/buildscripts/substitute-encoding.py index c2fbeda6fd..b3b9fade8b 100644 --- a/buildscripts/substitute-encoding.py +++ b/buildscripts/substitute-encoding.py @@ -5,12 +5,21 @@ # # http://bugs.ghostscript.com/show_bug.cgi?id=688017 +import getopt +import os +import re import string import sys -import re -import os -filename = sys.argv[1] +outdir = 'out' +(options, files) = getopt.getopt (sys.argv[1:], 'o', ['outdir=']) +for opt in options: + o = opt[0] + a = opt[1] + if o == '--outdir' or o == '-o': + outdir = a + +filename = files[0] def get_glyph_names (enc_name): enc_str = open (enc_name).read () glyphs = [] @@ -26,9 +35,9 @@ def get_glyph_names (enc_name): return glyphs if re.search ('mmental', filename): - glyph_names = (get_glyph_names ('out/feta20.enc') + - get_glyph_names ('out/feta-alphabet20.enc') + - get_glyph_names ('out/parmesan20.enc')) + glyph_names = (get_glyph_names ('%(outdir)s/feta20.enc' % vars ()) + + get_glyph_names ('%(outdir)s/feta-alphabet20.enc' % vars ()) + + get_glyph_names ('%(outdir)s/parmesan20.enc' % vars ())) str = open (filename).read () os.rename (filename, filename + "~") @@ -46,6 +55,3 @@ if re.search ('mmental', filename): str) open (filename, 'w').write (str) - - - diff --git a/mf/GNUmakefile b/mf/GNUmakefile index bac6d6d7e1..a95518ff62 100644 --- a/mf/GNUmakefile +++ b/mf/GNUmakefile @@ -58,7 +58,7 @@ MFTRACE_FLAGS=$(if $(ENCODING_FILE),--encoding $(ENCODING_FILE),) --no-afm $(outdir)/$(PFA_PREFIX)%.pfa $(outdir)/%.otf $(outdir)/%.svg: $(outdir)/%.pe (cd $(outdir) && $(FONTFORGE) -script $(notdir $<)) - $(PYTHON) $(buildscript-dir)/substitute-encoding.py $@ + $(PYTHON) $(buildscript-dir)/substitute-encoding.py --outdir=$(outdir) $@ -rm $(outdir)/*.scale.pfa # ugh, this does not work