]> git.donarmstrong.com Git - lilypond.git/commitdiff
Mf2pt1 fixes: run mf2pt1 in a temp dir to fix filesystem pollution.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 6 Jan 2008 18:10:32 +0000 (16:10 -0200)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 6 Jan 2008 18:10:32 +0000 (16:10 -0200)
stepmake/stepmake/metafont-rules.make
stepmake/stepmake/metafont-vars.make

index 2030f00158b206ea697e3ca389fc5f434f351a9c..71cd6f1bda8d7b47c13e7ca36f61d23f3c2b4aa7 100644 (file)
@@ -13,8 +13,15 @@ $(outdir)/%.tfm $(outdir)/%.log: %.mf
        mv $(basename $(@F)).log $(basename $(@F)).tfm $(outdir)
        rm -f $(basename $(@F)).*gf  $(basename $(@F)).*pk
 
+# ugh . mf2pt1 is extremely broken, it pollutes CWD iso. creating a
+# temp dir.
 $(outdir)/%.pfb: %.mf $(outdir)/mf2pt1.mem
-       cd $(outdir) && MFINPUTS=.. $(PERL) ../$(buildscript-dir)/mf2pt1.pl $(MF2PT1_OPTIONS) $<
+       TMP=`mktemp -d $(outdir)/pfbtemp.XXXXXXXXX` ; \
+               ( cd $$TMP ; \
+               ln -s ../mf2pt1.mem . ; \
+               MFINPUTS=../..:../:: $(PERL) ../../$(buildscript-dir)/mf2pt1.pl $(MF2PT1_OPTIONS) $< ) ; \
+               mv $$TMP/*pfb $(outdir) ; \
+               rm -rf $$TMP
 
 $(outdir)/mf2pt1.mem:
        cd $(outdir) && mpost -progname=mpost -ini ../mf2pt1 \\dump
index 49a755e6a3f688ff18e0c75a735970fb367cdeb8..25589e1f4db2ff24279ca5936106992137e6304a 100644 (file)
@@ -7,7 +7,7 @@ MF_LOG_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.log))
 DVI_FILES += $(MF_DVI_FILES)
 TFM_FILES += $(MF_TFM_FILES)
 
-MF2PT1_OPTIONS=--rounding=0.001 
+MF2PT1_OPTIONS=--rounding=0.000