5 STEPMAKE_TEMPLATES = metafont \
8 LOCALSTEPMAKE_TEMPLATES = lilypond
10 # These are the main .mf files. We don't use $(MF_FILES) here,
11 # because there are more .mf files, input'ed into the main files.
12 FETA_MF_FILES = $(call src-wildcard,feta[0-9]*.mf) \
13 $(call src-wildcard,feta-braces-[a-z].mf) \
14 $(call src-wildcard,feta-alphabet*[0-9].mf) \
15 $(call src-wildcard,feta-noteheads*[0-9].mf) \
16 $(call src-wildcard,feta-flags*[0-9].mf) \
17 $(call src-wildcard,parmesan[0-9]*.mf) \
18 $(call src-wildcard,parmesan-noteheads*[0-9].mf)
19 FETA_FONTS = $(FETA_MF_FILES:.mf=)
20 ALL_FONTS = $(FETA_FONTS)
21 PFB_FILES = $(ALL_FONTS:%=$(outdir)/%.pfb)
23 include $(depth)/make/stepmake.make
26 EXTRA_DIST_FILES += README mf2pt1.mp
28 STAFF_SIZES = 11 13 14 16 18 20 23 26
29 BRACES = a b c d e f g h i
31 OTF_FILES = $(STAFF_SIZES:%=$(outdir)/emmentaler-%.otf) \
32 $(outdir)/emmentaler-brace.otf
33 PE_SCRIPTS = $(STAFF_SIZES:%=$(outdir)/emmentaler-%.pe)
34 OTF_TABLES = $(STAFF_SIZES:%=$(outdir)/feta%.otf-table) \
35 $(BRACES:%=$(outdir)/feta-braces-%.otf-table)
36 SVG_FILES = $(OTF_FILES:%.otf=%.svg)
37 WOFF_FILES = $(OTF_FILES:%.otf=%.woff)
39 NCSB_OTFS = $(addprefix $(outdir)/,CenturySchL-Ital.otf \
40 CenturySchL-BoldItal.otf \
41 CenturySchL-Roma.otf \
44 LOG_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.log)
45 LISP_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.lisp)
46 ENC_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.enc)
47 TFM_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.tfm)
49 $(outdir)/emmentaler-brace.otf-table: $(BRACES:%=$(outdir)/feta-braces-%.otf-table)
52 $(outdir)/emmentaler-brace.otf-gtable: $(BRACES:%=$(outdir)/feta-braces-%.otf-gtable)
53 echo '(design_size . 20)' > $@
57 ## ugh -- we want this to prevent failing -j2 compiles.
58 define FETAxx-PREREQUISITES
61 $(outdir)/feta$(i).otf-table: $(outdir)/feta$(i).lisp \
62 $(outdir)/feta-noteheads$(i).lisp \
63 $(outdir)/feta-flags$(i).lisp \
64 $(outdir)/parmesan$(i).lisp \
65 $(outdir)/parmesan-noteheads$(i).lisp \
66 $(outdir)/feta-alphabet$(i).lisp
69 $(eval $(foreach i,$(STAFF_SIZES),$(FETAxx-PREREQUISITES)))
71 $(outdir)/%.otf-table: $(outdir)/%.lisp
72 cat $< $(if $(findstring brace,$<),,$(subst feta,parmesan,$<)) \
73 $(if $(findstring brace,$<),,$(subst feta,parmesan-noteheads,$<)) \
74 $(if $(findstring brace,$<),,$(subst feta,feta-noteheads,$<)) \
75 $(if $(findstring brace,$<),,$(subst feta,feta-flags,$<)) \
76 $(if $(findstring brace,$<),,$(subst feta,feta-alphabet,$<)) > $@
79 $(outdir)/emmentaler-brace.otf: $(outdir)/emmentaler-brace.subfonts \
80 $(outdir)/emmentaler-brace.fontname \
81 $(outdir)/emmentaler-brace.otf-table \
82 $(outdir)/emmentaler-brace.otf-gtable \
83 $(outdir)/emmentaler-brace.pe
85 $(outdir)/emmentaler-brace.otf\
86 $(outdir)/emmentaler-brace.svg\
87 $(outdir)/emmentaler-brace.woff: $(BRACES:%=$(outdir)/feta-braces-%.pfb)
89 $(outdir)/emmentaler-brace.fontname:
90 printf 'emmentaler-brace' > $@
91 $(outdir)/emmentaler-brace.subfonts:
92 echo $(subst .mf,,$(call src-wildcard,feta-braces-[a-z].mf)) > $@
94 $(PE_SCRIPTS): $(buildscript-dir)/gen-emmentaler-scripts
98 # Generate emmentaler-*.pe scripts first, and *.otf, *.svg, *.woff files last,
99 # so that normally these files aren't regenerated on a subsequent call to make.
100 ALL_GEN_FILES = $(PE_SCRIPTS) \
110 # PRE_INSTALL=$(MAKE) "$(ALL_GEN_FILES)"
112 INSTALLATION_DIR = $(local_lilypond_datadir)/fonts/source
113 INSTALLATION_FILES = $(MF_FILES)
115 INSTALLATION_OUT_SUFFIXES = 1 2
117 INSTALLATION_OUT_DIR1 = $(local_lilypond_datadir)/fonts/otf
118 INSTALLATION_OUT_FILES1 = $(OTF_FILES) \
121 INSTALLATION_OUT_DIR2 = $(local_lilypond_datadir)/fonts/svg
122 INSTALLATION_OUT_FILES2 = $(SVG_FILES) $(WOFF_FILES)
124 export MFINPUTS := .:$(MFINPUTS)
126 # only for fonts which
128 # 1. are mentioned in font.scm
130 # 2. are not included with teTeX
133 $(outdir)/%.otf-gtable \
135 $(outdir)/%.pe: $(outdir)/%.log $(outdir)/%.tfm
136 $(buildscript-dir)/mf-to-table \
137 --global-lisp=$(outdir)/$(<F:.log=.otf-gtable) \
138 --lisp=$(outdir)/$(<F:.log=.lisp) \
140 --enc $(outdir)/$(<F:.log=.enc) \
143 ## Putting pfb here forces all .pfb fonts to be built before
144 # fontforge starts generating emmentaler-*.* fonts.
145 $(outdir)/emmentaler-%.otf \
146 $(outdir)/emmentaler-%.svg \
147 $(outdir)/emmentaler-%.woff: $(outdir)/emmentaler-%.pe \
148 $(outdir)/feta%.pfb \
149 $(outdir)/feta-noteheads%.pfb \
150 $(outdir)/feta-flags%.pfb \
151 $(outdir)/feta-alphabet%.pfb \
152 $(outdir)/parmesan%.pfb \
153 $(outdir)/parmesan-noteheads%.pfb \
154 $(outdir)/feta%.otf-table \
155 $(outdir)/feta%.otf-gtable \
157 cd $(outdir) && $(FONTFORGE) -script $(notdir $<)
159 $(outdir)/emmentaler-brace.otf\
160 $(outdir)/emmentaler-brace.svg\
161 $(outdir)/emmentaler-brace.woff: $(outdir)/emmentaler-brace.pe\
162 $(foreach s,$(BRACES),$(outdir)/feta-braces-$(s).pfb) \
163 $(outdir)/emmentaler-brace.otf-table $(outdir)/emmentaler-brace.otf-gtable \
165 cd $(outdir) && $(FONTFORGE) -script emmentaler-brace.pe
167 default: $(ALL_GEN_FILES) \
168 $(outdir)/emmentaler-20.otf \
174 # FIXME: temporary hack: must regenerate after building fonts
175 tree-regen: $(ALL_GEN_FILES)
176 ${MAKE} -C $(top-build-dir) link-mf-tree
179 $(outdir)/%.otf-gtable \
181 $(outdir)/%.pe: $(outdir)/%.log $(outdir)/%.tfm
182 $(buildscript-dir)/mf-to-table \
183 --global-lisp=$(outdir)/$(<F:.log=.otf-gtable) \
184 --lisp=$(outdir)/$(<F:.log=.lisp) \
186 --enc $(outdir)/$(<F:.log=.enc) \
190 rm -f mfplain.mem mfplain.log
194 $(outdir)/fonts.conf:
195 echo '<fontconfig><dir>'$(shell cd $(outdir); pwd)'</dir></fontconfig>' > $@
197 $(NCSB_OTFS): $(NCSB_SOURCE_FILES) \
198 $(auxscript-dir)/pfx2ttf.fontforge
199 $(foreach i, $(basename $(NCSB_SOURCE_FILES)), \
200 $(FONTFORGE) -script $(auxscript-dir)/pfx2ttf.fontforge \
201 $(i).pfb $(i).afm $(outdir)/ && ) true