5 STEPMAKE_TEMPLATES = metafont \
8 LOCALSTEPMAKE_TEMPLATES = lilypond
10 include $(depth)/make/stepmake.make
13 EXTRA_DIST_FILES += README mf2pt1.mp
15 # We don't use $(MF_FILES), because there's more .mf cruft here
16 FETA_MF_FILES = $(call src-wildcard,feta[0-9]*.mf) \
17 $(call src-wildcard,feta-braces-[a-z].mf) \
18 $(call src-wildcard,feta-alphabet*[0-9].mf) \
19 $(call src-wildcard,parmesan[0-9]*.mf)
21 STAFF_SIZES = 11 13 14 16 18 20 23 26
22 BRACES = a b c d e f g h i
24 OTF_FILES = $(STAFF_SIZES:%=$(outdir)/emmentaler-%.otf) \
26 PE_SCRIPTS = $(STAFF_SIZES:%=$(outdir)/emmentaler-%.pe) \
27 $(STAFF_SIZES:%=$(outdir)/emmentaler-%.dep)
28 OTF_TABLES = $(STAFF_SIZES:%=$(outdir)/feta%.otf-table) \
29 $(BRACES:%=$(outdir)/feta-braces-%.otf-table)
30 FETA_FONTS = $(FETA_MF_FILES:.mf=)
31 SVG_FILES = $(OTF_FILES:%.otf=%.svg)
33 FC_FIND = $(shell $(FCMATCH) --verbose 'Century Schoolbook L:style=$(1)' \
35 | sed 's/.*"\([^"]*\)".*/\1/g')
37 NCSB_OTFS = $(addprefix $(outdir)/,CenturySchL-Ital.otf \
38 CenturySchL-BoldItal.otf \
39 CenturySchL-Roma.otf \
41 NCSB_INSTALL_DIR = $(local_lilypond_datadir)/fonts/otf
43 LOG_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.log)
44 LISP_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.lisp)
45 ENC_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.enc)
46 TFM_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.tfm)
48 $(outdir)/aybabtu.otf-table: $(BRACES:%=$(outdir)/feta-braces-%.otf-table)
51 $(outdir)/aybabtu.otf-gtable: $(BRACES:%=$(outdir)/feta-braces-%.otf-gtable)
52 echo '(design_size . 20)' > $@
55 # only for fonts which
57 # 1. are mentioned in font.scm
59 # 2. are not included with teTeX
62 $(outdir)/emmentaler-%.otf \
63 $(outdir)/emmentaler-%.svg: $(outdir)/emmentaler-%.pe \
65 $(outdir)/feta-alphabet%.pfb \
66 $(outdir)/parmesan%.pfb \
67 $(outdir)/feta%.otf-table \
68 $(outdir)/feta%.otf-gtable
69 cd $(outdir) && $(FONTFORGE) -script $(notdir $(basename ,$@).pe)
71 $(outdir)/aybabtu.otf \
72 $(outdir)/aybabtu.svg: $(outdir)/aybabtu.pe \
73 $(foreach s,$(BRACES),$(outdir)/feta-braces-$(s).pfb) \
74 $(outdir)/aybabtu.otf-table $(outdir)/aybabtu.otf-gtable
75 cd $(outdir) && $(FONTFORGE) -script aybabtu.pe
77 $(outdir)/%.pfb: $(outdir)/%.log
79 $(outdir)/%.otf-table: $(outdir)/%.lisp
80 cat $< $(if $(findstring brace,$<),,$(subst feta,parmesan,$<)) \
81 $(if $(findstring brace,$<),,$(subst feta,feta-alphabet,$<)) > $@
84 ## ugh -- we want this to prevent failing -j2 compiles.
85 $(outdir)/feta26.otf-table: $(outdir)/feta26.lisp \
86 $(outdir)/parmesan26.lisp \
87 $(outdir)/feta-alphabet26.lisp
88 $(outdir)/feta23.otf-table: $(outdir)/feta23.lisp \
89 $(outdir)/parmesan23.lisp \
90 $(outdir)/feta-alphabet23.lisp
91 $(outdir)/feta20.otf-table: $(outdir)/feta20.lisp \
92 $(outdir)/parmesan20.lisp \
93 $(outdir)/feta-alphabet20.lisp
94 $(outdir)/feta18.otf-table: $(outdir)/feta18.lisp \
95 $(outdir)/parmesan18.lisp \
96 $(outdir)/feta-alphabet18.lisp
97 $(outdir)/feta16.otf-table: $(outdir)/feta16.lisp \
98 $(outdir)/parmesan16.lisp \
99 $(outdir)/feta-alphabet16.lisp
100 $(outdir)/feta14.otf-table: $(outdir)/feta14.lisp \
101 $(outdir)/parmesan14.lisp \
102 $(outdir)/feta-alphabet14.lisp
103 $(outdir)/feta13.otf-table: $(outdir)/feta13.lisp \
104 $(outdir)/parmesan13.lisp \
105 $(outdir)/feta-alphabet13.lisp
106 $(outdir)/feta11.otf-table: $(outdir)/feta11.lisp \
107 $(outdir)/parmesan11.lisp \
108 $(outdir)/feta-alphabet11.lisp
110 $(outdir)/aybabtu.otf: $(outdir)/aybabtu.subfonts \
111 $(outdir)/aybabtu.fontname \
112 $(outdir)/aybabtu.otf-table \
113 $(outdir)/aybabtu.otf-gtable \
116 $(outdir)/aybabtu.otf \
117 $(outdir)/aybabtu.svg: $(BRACES:%=$(outdir)/feta-braces-%.pfb)
119 $(outdir)/aybabtu.fontname:
120 echo -n 'aybabtu' > $@
121 $(outdir)/aybabtu.subfonts:
122 echo $(subst .mf,,$(call src-wildcard,feta-braces-[a-z].mf)) > $@
124 $(PE_SCRIPTS): $(buildscript-dir)/out/gen-emmentaler-scripts
125 $(PYTHON) $< --dir=$(outdir)
127 ALL_FONTS = $(FETA_FONTS)
128 PFB_FILES = $(ALL_FONTS:%=$(outdir)/%.pfb)
130 # Make tfm files first, log files last,
131 # so that normally log files aren't made twice
132 ALL_GEN_FILES = $(LOG_FILES) \
141 # PRE_INSTALL=$(MAKE) "$(ALL_GEN_FILES)"
143 INSTALLATION_DIR = $(local_lilypond_datadir)/fonts/source
144 INSTALLATION_FILES = $(MF_FILES)
146 INSTALLATION_OUT_SUFFIXES = 1 2 3
148 INSTALLATION_OUT_DIR1 = $(local_lilypond_datadir)/fonts/otf
149 INSTALLATION_OUT_FILES1 = $(OTF_FILES) \
152 INSTALLATION_OUT_DIR2 = $(local_lilypond_datadir)/fonts/svg
153 INSTALLATION_OUT_FILES2 = $(SVG_FILES)
155 INSTALLATION_OUT_DIR3 = $(local_lilypond_datadir)/fonts/type1
156 INSTALLATION_OUT_FILES3 = $(PFB_FILES)
158 export MFINPUTS := .:$(MFINPUTS)
161 default: $(ALL_GEN_FILES) \
162 $(outdir)/emmentaler-20.otf \
168 # FIXME: temporary hack: must regenerate after building fonts
170 ${MAKE} -C $(top-build-dir) link-mf-tree
173 ## todo: this also depends on .tfm, FIXME.
175 $(outdir)/%.otf-gtable \
177 $(outdir)/%.dep: $(outdir)/%.log
178 $(PYTHON) $(buildscript-dir)/mf-to-table.py \
179 --global-lisp=$(outdir)/$(<F:.log=.otf-gtable) \
180 --lisp=$(outdir)/$(<F:.log=.lisp) \
182 --dep $(outdir)/$(<F:.log=.dep) \
183 --enc $(outdir)/$(<F:.log=.enc) \
187 rm -f mfplain.mem mfplain.log
191 $(outdir)/fonts.conf:
192 echo '<fontconfig><dir>'$(shell cd $(outdir); pwd)'</dir></fontconfig>' > $@
194 $(NCSB_OTFS): $(NCSB_SOURCE_FILES) \
195 $(buildscript-dir)/pfx2ttf.fontforge
196 $(foreach i, $(basename $(NCSB_SOURCE_FILES)), \
197 $(FONTFORGE) -script $(buildscript-dir)/pfx2ttf.fontforge \
198 $(i).pfb $(i).afm $(outdir)/ && ) true