5 STEPMAKE_TEMPLATES = metafont \
8 LOCALSTEPMAKE_TEMPLATES = lilypond
10 # We don't use $(MF_FILES), because there's more .mf cruft here
11 FETA_MF_FILES = $(call src-wildcard,feta[0-9]*.mf) \
12 $(call src-wildcard,feta-braces-[a-z].mf) \
13 $(call src-wildcard,feta-alphabet*[0-9].mf) \
14 $(call src-wildcard,feta-noteheads*[0-9].mf) \
15 $(call src-wildcard,feta-flags*[0-9].mf) \
16 $(call src-wildcard,parmesan[0-9]*.mf) \
17 $(call src-wildcard,parmesan-noteheads*[0-9].mf)
18 FETA_FONTS = $(FETA_MF_FILES:.mf=)
19 ALL_FONTS = $(FETA_FONTS)
20 PFB_FILES = $(ALL_FONTS:%=$(outdir)/%.pfb)
22 include $(depth)/make/stepmake.make
25 EXTRA_DIST_FILES += README mf2pt1.mp
27 STAFF_SIZES = 11 13 14 16 18 20 23 26
28 BRACES = a b c d e f g h i
30 OTF_FILES = $(STAFF_SIZES:%=$(outdir)/emmentaler-%.otf) \
31 $(outdir)/emmentaler-brace.otf
32 PE_SCRIPTS = $(STAFF_SIZES:%=$(outdir)/emmentaler-%.pe)
33 OTF_TABLES = $(STAFF_SIZES:%=$(outdir)/feta%.otf-table) \
34 $(BRACES:%=$(outdir)/feta-braces-%.otf-table)
35 SVG_FILES = $(OTF_FILES:%.otf=%.svg)
36 WOFF_FILES = $(OTF_FILES:%.otf=%.woff)
38 FC_FIND = $(shell $(FCLIST) --verbose 'Century Schoolbook L:style=$(1)' \
40 | sed 's/.*"\([^"]*\)".*/\1/g')
42 NCSB_OTFS = $(addprefix $(outdir)/,CenturySchL-Ital.otf \
43 CenturySchL-BoldItal.otf \
44 CenturySchL-Roma.otf \
46 NCSB_INSTALL_DIR = $(local_lilypond_datadir)/fonts/otf
48 LOG_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.log)
49 LISP_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.lisp)
50 ENC_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.enc)
51 TFM_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.tfm)
53 $(outdir)/emmentaler-brace.otf-table: $(BRACES:%=$(outdir)/feta-braces-%.otf-table)
56 $(outdir)/emmentaler-brace.otf-gtable: $(BRACES:%=$(outdir)/feta-braces-%.otf-gtable)
57 echo '(design_size . 20)' > $@
61 ## ugh -- we want this to prevent failing -j2 compiles.
62 define FETAxx-PREREQUISITES
65 $(outdir)/feta$(i).otf-table: $(outdir)/feta$(i).lisp \
66 $(outdir)/feta-noteheads$(i).lisp \
67 $(outdir)/feta-flags$(i).lisp \
68 $(outdir)/parmesan$(i).lisp \
69 $(outdir)/parmesan-noteheads$(i).lisp \
70 $(outdir)/feta-alphabet$(i).lisp
73 $(eval $(foreach i,$(STAFF_SIZES),$(FETAxx-PREREQUISITES)))
75 $(outdir)/%.otf-table: $(outdir)/%.lisp
76 cat $< $(if $(findstring brace,$<),,$(subst feta,parmesan,$<)) \
77 $(if $(findstring brace,$<),,$(subst feta,parmesan-noteheads,$<)) \
78 $(if $(findstring brace,$<),,$(subst feta,feta-noteheads,$<)) \
79 $(if $(findstring brace,$<),,$(subst feta,feta-flags,$<)) \
80 $(if $(findstring brace,$<),,$(subst feta,feta-alphabet,$<)) > $@
83 $(outdir)/emmentaler-brace.otf: $(outdir)/emmentaler-brace.subfonts \
84 $(outdir)/emmentaler-brace.fontname \
85 $(outdir)/emmentaler-brace.otf-table \
86 $(outdir)/emmentaler-brace.otf-gtable \
87 $(outdir)/emmentaler-brace.pe
89 $(outdir)/emmentaler-brace.otf\
90 $(outdir)/emmentaler-brace.svg\
91 $(outdir)/emmentaler-brace.woff: $(BRACES:%=$(outdir)/feta-braces-%.pfb)
93 $(outdir)/emmentaler-brace.fontname:
94 printf 'emmentaler-brace' > $@
95 $(outdir)/emmentaler-brace.subfonts:
96 echo $(subst .mf,,$(call src-wildcard,feta-braces-[a-z].mf)) > $@
98 $(PE_SCRIPTS): $(buildscript-dir)/gen-emmentaler-scripts
102 # Make tfm files first, log files last,
103 # so that normally log files aren't made twice
104 ALL_GEN_FILES = $(LOG_FILES) \
113 # PRE_INSTALL=$(MAKE) "$(ALL_GEN_FILES)"
115 INSTALLATION_DIR = $(local_lilypond_datadir)/fonts/source
116 INSTALLATION_FILES = $(MF_FILES)
118 INSTALLATION_OUT_SUFFIXES = 1 2
120 INSTALLATION_OUT_DIR1 = $(local_lilypond_datadir)/fonts/otf
121 INSTALLATION_OUT_FILES1 = $(OTF_FILES) \
124 INSTALLATION_OUT_DIR2 = $(local_lilypond_datadir)/fonts/svg
125 INSTALLATION_OUT_FILES2 = $(SVG_FILES) $(WOFF_FILES)
127 export MFINPUTS := .:$(MFINPUTS)
129 # only for fonts which
131 # 1. are mentioned in font.scm
133 # 2. are not included with teTeX
136 $(outdir)/%.otf-gtable \
138 $(outdir)/%.pe: $(outdir)/%.log $(outdir)/%.tfm
139 $(buildscript-dir)/mf-to-table \
140 --global-lisp=$(outdir)/$(<F:.log=.otf-gtable) \
141 --lisp=$(outdir)/$(<F:.log=.lisp) \
143 --enc $(outdir)/$(<F:.log=.enc) \
146 ## Putting pfb here forces all .pfb fonts to be built before
147 # fontforge starts generating emmentaler-*.* fonts.
148 $(outdir)/emmentaler-%.otf \
149 $(outdir)/emmentaler-%.svg \
150 $(outdir)/emmentaler-%.woff: $(outdir)/emmentaler-%.pe \
151 $(outdir)/feta%.pfb \
152 $(outdir)/feta-noteheads%.pfb \
153 $(outdir)/feta-flags%.pfb \
154 $(outdir)/feta-alphabet%.pfb \
155 $(outdir)/parmesan%.pfb \
156 $(outdir)/parmesan-noteheads%.pfb \
157 $(outdir)/feta%.otf-table \
158 $(outdir)/feta%.otf-gtable \
160 cd $(outdir) && $(FONTFORGE) -script $(notdir $<)
162 $(outdir)/emmentaler-brace.otf\
163 $(outdir)/emmentaler-brace.svg\
164 $(outdir)/emmentaler-brace.woff: $(outdir)/emmentaler-brace.pe\
165 $(foreach s,$(BRACES),$(outdir)/feta-braces-$(s).pfb) \
166 $(outdir)/emmentaler-brace.otf-table $(outdir)/emmentaler-brace.otf-gtable \
168 cd $(outdir) && $(FONTFORGE) -script emmentaler-brace.pe
170 default: $(ALL_GEN_FILES) \
171 $(outdir)/emmentaler-20.otf \
177 # FIXME: temporary hack: must regenerate after building fonts
178 tree-regen: $(ALL_GEN_FILES)
179 ${MAKE} -C $(top-build-dir) link-mf-tree
182 $(outdir)/%.otf-gtable \
184 $(outdir)/%.pe: $(outdir)/%.log $(outdir)/%.tfm
185 $(buildscript-dir)/mf-to-table \
186 --global-lisp=$(outdir)/$(<F:.log=.otf-gtable) \
187 --lisp=$(outdir)/$(<F:.log=.lisp) \
189 --enc $(outdir)/$(<F:.log=.enc) \
193 rm -f mfplain.mem mfplain.log
197 $(outdir)/fonts.conf:
198 echo '<fontconfig><dir>'$(shell cd $(outdir); pwd)'</dir></fontconfig>' > $@
200 $(NCSB_OTFS): $(NCSB_SOURCE_FILES) \
201 $(auxscript-dir)/pfx2ttf.fontforge
202 $(foreach i, $(basename $(NCSB_SOURCE_FILES)), \
203 $(FONTFORGE) -script $(auxscript-dir)/pfx2ttf.fontforge \
204 $(i).pfb $(i).afm $(outdir)/ && ) true