X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=stepmake%2Fstepmake%2Fmetafont-vars.make;h=73f35a53ed68cd0490ccaa367b5f58fe83739492;hb=25ca54b640c067e2286a1d7ba47f24a1b4dc070e;hp=95d25632752c47a0a40ad2811e9d8259d5f788ca;hpb=f5d88b8b3b09ac724d7f2234b25fcbde4bc1b072;p=lilypond.git diff --git a/stepmake/stepmake/metafont-vars.make b/stepmake/stepmake/metafont-vars.make index 95d2563275..73f35a53ed 100644 --- a/stepmake/stepmake/metafont-vars.make +++ b/stepmake/stepmake/metafont-vars.make @@ -1,12 +1,38 @@ - -MF_FILES := $(wildcard *.mf) -FONT_FILES = $(wildcard *[0-9].mf) -EXTRA_DIST_FILES += $(MF_FILES) +MF_FILES := $(call src-wildcard,*.mf) MF_TFM_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.tfm)) MF_DVI_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.dvi)) MF_LOG_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.log)) DVI_FILES += $(MF_DVI_FILES) TFM_FILES += $(MF_TFM_FILES) +MF2PT1_OPTIONS=--rounding=0.0001 \ + --family=$(notdir $(<:%.mf=%)) \ + --fullname=$(notdir $(<:%.mf=%)) \ + --name=$(notdir $(<:%.mf=%)) + +ifdef QUIET_BUILD +METAFONT_QUIET = >/dev/null +else +METAFONT_QUIET = +endif + +# Find the metafont file $(1) within the source dirs and return its path. +# If not found, return $(outdir)/$(1) assuming that it is a generated file. +find-mf = \ +$(firstword \ + $(wildcard $(src-dir)/$(1)) \ + $(wildcard $(top-src-dir)/mf/$(1)) \ + $(outdir)/$(1) \ +) +# Recursively scan the metafont .mf file $(1) for "input X;" +# and return all dependencies. +scan-mf = \ +$(foreach f, $(shell test -f $(1) && sed -ne "/^[[:space:]]*input[[:space:]]/s/^[[:space:]]*input\([^.;]*\)\(.mf;\|;\)/\1.mf/p" $(1)), \ + $(call find-mf,$(f)) \ + $(call scan-mf,$(call find-mf,$(f))) \ +) +# Find dependencies for the target $@, based on the metafont source file $<, +# and write the dependencies to a .dep file. +DO_MF_DEP = ( echo ./$@: $(call scan-mf,$<) > $(basename $@).dep ) &&