# ugh . mf2pt1 is extremely broken, it pollutes CWD iso. creating a
# temp dir.
+#
+# the soft link for mf2pt1.mp is for recent mpost versions
+# which no longer dump a .mem file
$(outdir)/%.pfb: %.mf $(outdir)/mf2pt1.mem
TMP=`mktemp -d $(outdir)/pfbtemp.XXXXXXXXX` \
&& ( cd $$TMP \
&& ln -s ../mf2pt1.mem . \
- && MFINPUTS=$(top-src-dir)/mf:..:: $(buildscript-dir)/mf2pt1 $(MF2PT1_OPTIONS) $< $(METAFONT_QUIET)) \
+ && ln -s ../../mf2pt1.mp . \
+ && MFINPUTS=$(abs-src-dir):..:: $(buildscript-dir)/mf2pt1 $(MF2PT1_OPTIONS) $< $(METAFONT_QUIET)) \
&& mv $$TMP/*pfb $(outdir); \
rm -rf $$TMP
+# since recent mpost versions no longer create a mem file, we create a dummy
+# file to satisfy the dependency (which gets overwritten in case an older
+# mpost creates a real mem file)
$(outdir)/mf2pt1.mem: mf2pt1.mp
- cd $(outdir) && mpost -progname=mpost -ini $(top-src-dir)/mf/mf2pt1.mp \\dump
+ cd $(outdir) \
+ && touch mf2pt1.mem \
+ && mpost -progname=mpost -ini $(top-src-dir)/mf/mf2pt1.mp \\dump