X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=mf%2FGNUmakefile;h=8082c40058a6b264b456425ed685ec8a1fc4b5ac;hb=0e433931d31d0dd88cb8a127f72ef55303ff5b2c;hp=02522a3ca4ee9b01b5a17e0295ef4a98c621ea4a;hpb=0e5db119272d2611fe42de94657e66390ead5018;p=lilypond.git diff --git a/mf/GNUmakefile b/mf/GNUmakefile index 02522a3ca4..8082c40058 100644 --- a/mf/GNUmakefile +++ b/mf/GNUmakefile @@ -1,6 +1,7 @@ depth = .. STEPMAKE_TEMPLATES=metafont install install-out +LOCALSTEPMAKE_TEMPLATES=lilypond include $(depth)/make/stepmake.make @@ -17,14 +18,16 @@ FETA_MF_FILES = $(wildcard feta[0-9]*.mf)\ STAFF_SIZES = 11 13 14 16 18 20 23 26 BRACES = a b c d e f g h i -OTF_FILES = $(addsuffix .otf, $(addprefix $(outdir)/bigcheese, $(STAFF_SIZES)))\ +OTF_FILES = $(addsuffix .otf, $(addprefix $(outdir)/emmentaler-, $(STAFF_SIZES)))\ $(outdir)/aybabtu.otf -PE_SCRIPTS = $(addsuffix .pe, $(addprefix $(outdir)/bigcheese, $(STAFF_SIZES))) \ - $(addsuffix .dep, $(addprefix $(outdir)/bigcheese, $(STAFF_SIZES))) +PE_SCRIPTS = $(addsuffix .pe, $(addprefix $(outdir)/emmentaler-, $(STAFF_SIZES))) \ + $(addsuffix .dep, $(addprefix $(outdir)/emmentaler-, $(STAFF_SIZES))) OTF_TABLES = $(addsuffix .otf-table, $(addprefix $(outdir)/feta, $(STAFF_SIZES))) \ $(BRACES:%=$(outdir)/feta-braces-%.otf-table) FETA_FONTS = $(FETA_MF_FILES:.mf=) SVG_FILES = $(OTF_FILES:%.otf=%.svg) $(ALL_FONTS:%=$(outdir)/%.svg) +COMMONFF_FILES = $(OTF_FILES:%.otf=%.commonff) +CFF_PS_FILES = $(OTF_FILES:%.otf=%.cff.ps) $(outdir)/aybabtu.otf-table: $(BRACES:%=$(outdir)/feta-braces-%.otf-table) @@ -42,7 +45,7 @@ FETA_LIST_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%list.ly) ENCODING_FILE=$(findstring $(<:.mf=.enc), $(FETA_MF_FILES:.mf=.enc)) -MFTRACE_FLAGS=$(if $(ENCODING_FILE),--encoding $(ENCODING_FILE),) +MFTRACE_FLAGS=$(if $(ENCODING_FILE),--encoding $(ENCODING_FILE),) --no-afm # only for fonts which # @@ -56,68 +59,72 @@ foe: echo $(TEXMF) kpsewhich exbase.mf -$(outdir)/%.otf $(outdir)/%.svg: $(outdir)/%.pe - (cd $(outdir) && fontforge -script $(notdir $<)) +$(outdir)/%.commonff $(outdir)/%.otf $(outdir)/%.svg: $(outdir)/%.pe + (cd $(outdir) && fontforge -script $(notdir $<) \ + && mv $(notdir $(basename $<)).cff $(notdir $(basename $<)).commonff) -$(outdir)/%.otf-table: $(outdir)/%.lisp - cat $< $(wildcard $(subst feta,parmesan,$<)) $(wildcard $(subst feta,feta-alphabet,$<)) > $@ +$(CFF_PS_FILES): $(COMMONFF_FILES) + cd $(outdir) && $(builddir)/lily/$(outconfbase)/lilypond --verbose $(abs-srcdir)/ly/generate-embedded-cff + +$(outdir)/%.otf-table: $(outdir)/%.lisp $(if $(findstring brace,$<),,$(subst feta,parmesan,$<)) + cat $< \ + $(if $(findstring brace,$<),,$(subst feta,parmesan,$<)) \ + $(if $(findstring brace,$<),,$(subst feta,feta-alphabet,$<)) > $@ $(outdir)/aybabtu.otf: $(outdir)/aybabtu.subfonts $(outdir)/aybabtu.otf-table $(outdir)/aybabtu.otf-gtable $(outdir)/aybabtu.subfonts: echo $(subst .mf,,$(wildcard feta-braces-[a-z].mf)) > $@ -$(PE_SCRIPTS): $(buildscript-dir)/gen-bigcheese-scripts.py +$(PE_SCRIPTS): $(buildscript-dir)/gen-emmentaler-scripts.py $(PYTHON) $< --dir=$(outdir) -include $(outdir)/bigcheese20.dep - ALL_FONTS = $(FETA_FONTS) $(SAUTER_FONTS) PFA_FILES = $(ALL_FONTS:%=$(outdir)/%.pfa) # Make tfm files first, log files last, # so that normally log files aren't made twice -ALL_GEN_FILES= $(TFM_FILES) $(TEXTABLES) $(TFM_FILES) $(LOG_FILES) $(ENC_FILES) $(LISP_FILES) $(FETA_LIST_FILES) $(OTF_TABLES) $(PFA_FILES) $(outdir)/lilypond.map $(OTF_FILES) $(SVG_FILES) +ALL_GEN_FILES= $(TFM_FILES) $(TEXTABLES) $(TFM_FILES) $(LOG_FILES) $(ENC_FILES) $(LISP_FILES) $(FETA_LIST_FILES) $(OTF_TABLES) $(PFA_FILES) $(outdir)/lilypond.map $(OTF_FILES) $(SVG_FILES) $(CFF_PS_FILES) #PRE_INSTALL=$(MAKE) "$(ALL_GEN_FILES)" INSTALLATION_DIR=$(local_lilypond_datadir)/fonts/source INSTALLATION_FILES=$(MF_FILES) $(AF_FILES) -INSTALLATION_OUT_SUFFIXES=1 2 3 4 5 6 7 +INSTALLATION_OUT_SUFFIXES=1 2 3 4 5 6 7 9 INSTALLATION_OUT_DIR1=$(local_lilypond_datadir)/tex INSTALLATION_OUT_FILES1=$(TEXTABLES) +# must not be installed with .cff, pango/fontconfig does not like .cff fonts INSTALLATION_OUT_DIR2=$(local_lilypond_datadir)/otf INSTALLATION_OUT_FILES2=$(OTF_FILES) INSTALLATION_OUT_DIR3=$(local_lilypond_datadir)/fonts/tfm INSTALLATION_OUT_FILES3=$(TFM_FILES) -INSTALLATION_OUT_DIR4=$(local_lilypond_datadir)/ly -INSTALLATION_OUT_FILES4=$(FETA_LIST_FILES) +INSTALLATION_OUT_DIR4=$(local_lilypond_datadir)/ps +INSTALLATION_OUT_FILES4=$(CFF_PS_FILES) INSTALLATION_OUT_DIR5=$(local_lilypond_datadir)/fonts/type1 -INSTALLATION_OUT_FILES5=$(PFA_FILES) $(outdir)/Fontmap $(outdir)/Fontmap.lily +INSTALLATION_OUT_FILES5=$(PFA_FILES) -INSTALLATION_OUT_DIR6=$(local_lilypond_datadir)/dvips/ +INSTALLATION_OUT_DIR6=$(local_lilypond_datadir)/fonts/map INSTALLATION_OUT_FILES6=$(outdir)/lilypond.map INSTALLATION_OUT_DIR7=$(local_lilypond_datadir)/ps/ INSTALLATION_OUT_FILES7=$(ENC_FILES) -INSTALLATION_OUT_DIR8=$(local_lilypond_datadir)/svg -INSTALLATION_OUT_FILES8=$(OTF_FILES) +INSTALLATION_OUT_DIR9=$(local_lilypond_datadir)/svg +INSTALLATION_OUT_FILES9=$(SVG_FILES) export MFINPUTS:=.:$(MFINPUTS) -default: pfa_warning $(ALL_GEN_FILES) $(outdir)/bigcheese20.otf - +default: pfa_warning $(ALL_GEN_FILES) $(outdir)/emmentaler-20.otf pfa_warning: -ifneq ($(notdir $(MFTRACE)),mftrace) +ifneq ($(shell $(MFTRACE) --version | sed 's/ .*//'),mftrace) @echo "" @echo "ERROR: mftrace not found" @echo "" @@ -129,7 +136,7 @@ ifneq ($(notdir $(MFTRACE)),mftrace) @echo " make get-rpm-pfa " @echo " make get-deb-pfa " @echo "" - @echo "These commands will try to download the files from the internet." + @echo "These commands will try to download the files from internet." @false endif @@ -166,59 +173,34 @@ $(outdir)/%.lisp $(outdir)/%.otf-gtable $(outdir)/%.enc $(outdir)/%.tex $(outdi fontdir: $(addprefix $(outdir)/, lilypond.map lilypond.sfd private-fonts fonts.scale fonts.dir Fontmap.lily) -### Urg -#mapentry=$(1) $(shell fgrep FontName $(outdir)/$(1).afm | sed -e 's/FontName *//') <$(1).pfaX -# -#map = $(foreach a,$(2),$(call $(1),$(a))) -#$(outdir)/lilypond.xmap: $(AFM_FILES) -# echo '$(call map,mapentry,$(ALL_FONTS))' | \ -# tr 'X' '\n' | sed -e 's/^ *//'> $@ -# -## using shell for loop seems most robust -#$(outdir)/lilypond.map: $(AFM_FILES) -# for i in $(FETA_FONTS); do echo $$i $$(fgrep FontName $(outdir)/$$i.afm | sed -e 's/FontName *//') '<'$$i.pfa; done > $@ -# -#$(outdir)/Fontmap: -# echo '%!' > $@ -# echo '% Override default GS Fontmap' >> $@ -# echo '% To let gs load fonts from builddir, do:' >> $@ -# echo '% export GS_LIB=$$(pwd)/mf/out:' >> $@ -# echo '% See Fontmap.GS for the syntax of real Fontmap files.' >> $@ -# echo '(Fontmap.GS) .runlibfile' >> $@ -# echo '(Fontmap.lily) .runlibfile' >> $@ -# -#$(outdir)/Fontmap.lily: $(AFM_FILES) $(outdir)/Fontmap -# echo '%!' > $@ -# for i in $(FETA_FONTS); do echo "/$$(fgrep FontName $(outdir)/$$i.afm | sed -e 's/FontName *//') ($$i.pfa);"; done >> $@ -# -# -#$(outdir)/fonts.scale: $(PFA_FILES) -## cd $(outdir) && echo $(FETA_MF_FILES:.mf=.pfa) $(FETA_MF_FILES:.mf=.pfb) | $(PYTHON) $(topdir)/buildscripts/make-font-dir.py > $(@F) -# cd $(outdir) && echo *.pfa *.pfb | $(PYTHON) $(topdir)/buildscripts/make-font-dir.py > $(@F) -# -#$(outdir)/fonts.dir: $(outdir)/fonts.scale -# cd $(outdir) && mkfontdir -# - $(outdir)/lilypond.map: $(AFM_FILES) for i in $(FETA_FONTS); do echo $$i $$i '<'$$i.pfa; done > $@ + for i in $(STAFF_SIZES); \ + do echo "emmentaler-$$i emmentaler-$$i > $@ + echo "aybabtu aybabtu > $@ + +$(outdir)/Fontmap.lily: + for i in $(FETA_FONTS); do echo "/$$i ($$i.pfa);" ; done > $@ + for i in $(STAFF_SIZES); \ + do echo "/emmentaler-$$i (emmentaler-$$i.cff.ps);" ; done \ + >> $@ + echo "/aybabtu (aybabtu.cff.ps);" >> $@ local-clean: rm -f mfplain.mem mfplain.log rm -f *.tfm *.log -#afm: $(AFM_FILES) -#pfa: afm $(PFA_FILES) fontdir -#pfb: afm $(PFB_FILES) fontdir -# -# -# stupid trick to have separate rules for each PFA font ; -# otherwise building PFAs is all-or-nothing. - -#$(outdir)/%.pfa: $(outdir)/%.bla -# $(MFTRACE) -I $(outdir)/ --formats=pfa,pfb,svg --simplify --keep-trying $(notdir $(basename $@)) && mv $(notdir $@) $(outdir)/ - $(outdir)/%.enc.in: %.enc cp $< $@ + +# teTeX-2.0.x compatibility. +local-install: + -$(INSTALL) -d $(DESTDIR)$(local_lilypond_datadir)/dvips + (cd $(DESTDIR)$(local_lilypond_datadir)/dvips && ln -sf ../fonts/map .) + +local-uninstall: + -rm -f $(DESTDIR)$(local_lilypond_datadir)/dvips/map + -rmdir $(DESTDIR)$(local_lilypond_datadir)/dvips