]> git.donarmstrong.com Git - lilypond.git/commitdiff
* mf/GNUmakefile (MFTRACE_FLAGS):
authorJan Nieuwenhuizen <janneke@gnu.org>
Fri, 6 May 2005 08:23:23 +0000 (08:23 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Fri, 6 May 2005 08:23:23 +0000 (08:23 +0000)
* buildscripts/substitute-encoding.py (outdir): Build fix: pass
outdir as option (WAS: hardcoded).

ChangeLog
buildscripts/substitute-encoding.py
mf/GNUmakefile

index 40d8308cd0dc16fde08f2509fabf199c4ccd6d84..0468e3a252b4e6aeccfc897a0a16ee025db5b3f9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-05-06  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+       * mf/GNUmakefile (MFTRACE_FLAGS):
+       * buildscripts/substitute-encoding.py (outdir): Build fix: pass
+       outdir as option (WAS: hardcoded).
+
 2005-05-06  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
        * THANKS: add Hans Forbrich.
index c2fbeda6fd684fc9a7a58e3f78fa2bbae149c702..b3b9fade8b06f209ac8897f50bff7be47110ec43 100644 (file)
@@ -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)
-
-
-
index bac6d6d7e107270e3bca803d640074fd05cbe2dc..a95518ff6265d15769001ac2aae179d9ad18621d 100644 (file)
@@ -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