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,feta-notehead*[0-9].mf) \
20 $(call src-wildcard,feta-flags*[0-9].mf) \
21 $(call src-wildcard,parmesan[0-9]*.mf)
23 STAFF_SIZES = 11 13 14 16 18 20 23 26
24 BRACES = a b c d e f g h i
26 OTF_FILES = $(STAFF_SIZES:%=$(outdir)/emmentaler-%.otf) \
27 $(outdir)/emmentaler-brace.otf
28 PE_SCRIPTS = $(STAFF_SIZES:%=$(outdir)/emmentaler-%.pe)
29 OTF_TABLES = $(STAFF_SIZES:%=$(outdir)/feta%.otf-table) \
30 $(BRACES:%=$(outdir)/feta-braces-%.otf-table)
31 FETA_FONTS = $(FETA_MF_FILES:.mf=)
32 SVG_FILES = $(OTF_FILES:%.otf=%.svg)
33 WOFF_FILES = $(OTF_FILES:%.otf=%.woff)
35 FC_FIND = $(shell $(FCLIST) --verbose 'Century Schoolbook L:style=$(1)' \
37 | sed 's/.*"\([^"]*\)".*/\1/g')
39 NCSB_OTFS = $(addprefix $(outdir)/,CenturySchL-Ital.otf \
40 CenturySchL-BoldItal.otf \
41 CenturySchL-Roma.otf \
43 NCSB_INSTALL_DIR = $(local_lilypond_datadir)/fonts/otf
45 LOG_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.log)
46 LISP_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.lisp)
47 ENC_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.enc)
48 TFM_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.tfm)
50 $(outdir)/emmentaler-brace.otf-table: $(BRACES:%=$(outdir)/feta-braces-%.otf-table)
53 $(outdir)/emmentaler-brace.otf-gtable: $(BRACES:%=$(outdir)/feta-braces-%.otf-gtable)
54 echo '(design_size . 20)' > $@
57 # only for fonts which
59 # 1. are mentioned in font.scm
61 # 2. are not included with teTeX
64 $(outdir)/emmentaler-%.otf\
65 $(outdir)/emmentaler-%.svg\
66 $(outdir)/emmentaler-%.woff: $(outdir)/emmentaler-%.pe \
68 $(outdir)/feta-noteheads%.pfb \
69 $(outdir)/feta-flags%.pfb \
70 $(outdir)/feta-alphabet%.pfb \
71 $(outdir)/parmesan%.pfb \
72 $(outdir)/feta%.otf-table \
73 $(outdir)/feta%.otf-gtable
74 cd $(outdir) && $(FONTFORGE) -script $(notdir $(basename ,$@).pe)
76 $(outdir)/emmentaler-brace.otf\
77 $(outdir)/emmentaler-brace.svg\
78 $(outdir)/emmentaler-brace.woff: $(outdir)/emmentaler-brace.pe \
79 $(foreach s,$(BRACES),$(outdir)/feta-braces-$(s).pfb) \
80 $(outdir)/emmentaler-brace.otf-table $(outdir)/emmentaler-brace.otf-gtable
81 cd $(outdir) && $(FONTFORGE) -script emmentaler-brace.pe
83 $(outdir)/%.pfb: $(outdir)/%.log
85 $(outdir)/%.otf-table: $(outdir)/%.lisp
86 cat $< $(if $(findstring brace,$<),,$(subst feta,parmesan,$<)) \
87 $(if $(findstring brace,$<),,$(subst feta,feta-noteheads,$<)) \
88 $(if $(findstring brace,$<),,$(subst feta,feta-flags,$<)) \
89 $(if $(findstring brace,$<),,$(subst feta,feta-alphabet,$<)) > $@
92 ## ugh -- we want this to prevent failing -j2 compiles.
93 $(outdir)/feta26.otf-table: $(outdir)/feta26.lisp \
94 $(outdir)/feta-noteheads26.lisp \
95 $(outdir)/feta-flags26.lisp \
96 $(outdir)/parmesan26.lisp \
97 $(outdir)/feta-alphabet26.lisp
98 $(outdir)/feta23.otf-table: $(outdir)/feta23.lisp \
99 $(outdir)/feta-noteheads23.lisp \
100 $(outdir)/feta-flags23.lisp \
101 $(outdir)/parmesan23.lisp \
102 $(outdir)/feta-alphabet23.lisp
103 $(outdir)/feta20.otf-table: $(outdir)/feta20.lisp \
104 $(outdir)/feta-noteheads20.lisp \
105 $(outdir)/feta-flags20.lisp \
106 $(outdir)/parmesan20.lisp \
107 $(outdir)/feta-alphabet20.lisp
108 $(outdir)/feta18.otf-table: $(outdir)/feta18.lisp \
109 $(outdir)/feta-noteheads18.lisp \
110 $(outdir)/feta-flags18.lisp \
111 $(outdir)/parmesan18.lisp \
112 $(outdir)/feta-alphabet18.lisp
113 $(outdir)/feta16.otf-table: $(outdir)/feta16.lisp \
114 $(outdir)/feta-noteheads16.lisp \
115 $(outdir)/feta-flags16.lisp \
116 $(outdir)/parmesan16.lisp \
117 $(outdir)/feta-alphabet16.lisp
118 $(outdir)/feta14.otf-table: $(outdir)/feta14.lisp \
119 $(outdir)/feta-noteheads14.lisp \
120 $(outdir)/feta-flags14.lisp \
121 $(outdir)/parmesan14.lisp \
122 $(outdir)/feta-alphabet14.lisp
123 $(outdir)/feta13.otf-table: $(outdir)/feta13.lisp \
124 $(outdir)/feta-noteheads13.lisp \
125 $(outdir)/feta-flags13.lisp \
126 $(outdir)/parmesan13.lisp \
127 $(outdir)/feta-alphabet13.lisp
128 $(outdir)/feta11.otf-table: $(outdir)/feta11.lisp \
129 $(outdir)/feta-noteheads11.lisp \
130 $(outdir)/feta-flags11.lisp \
131 $(outdir)/parmesan11.lisp \
132 $(outdir)/feta-alphabet11.lisp
134 $(outdir)/emmentaler-brace.otf: $(outdir)/emmentaler-brace.subfonts \
135 $(outdir)/emmentaler-brace.fontname \
136 $(outdir)/emmentaler-brace.otf-table \
137 $(outdir)/emmentaler-brace.otf-gtable \
138 $(outdir)/emmentaler-brace.pe
140 $(outdir)/emmentaler-brace.otf\
141 $(outdir)/emmentaler-brace.svg\
142 $(outdir)/emmentaler-brace.woff: $(BRACES:%=$(outdir)/feta-braces-%.pfb)
144 $(outdir)/emmentaler-brace.fontname:
145 echo -n 'emmentaler-brace' > $@
146 $(outdir)/emmentaler-brace.subfonts:
147 echo $(subst .mf,,$(call src-wildcard,feta-braces-[a-z].mf)) > $@
149 $(PE_SCRIPTS): $(buildscript-dir)/gen-emmentaler-scripts
152 ALL_FONTS = $(FETA_FONTS)
153 PFB_FILES = $(ALL_FONTS:%=$(outdir)/%.pfb)
155 .PRECIOUS: $(PFB_FILES)
158 # Make tfm files first, log files last,
159 # so that normally log files aren't made twice
160 ALL_GEN_FILES = $(LOG_FILES) \
169 # PRE_INSTALL=$(MAKE) "$(ALL_GEN_FILES)"
171 INSTALLATION_DIR = $(local_lilypond_datadir)/fonts/source
172 INSTALLATION_FILES = $(MF_FILES)
174 INSTALLATION_OUT_SUFFIXES = 1 2 3
176 INSTALLATION_OUT_DIR1 = $(local_lilypond_datadir)/fonts/otf
177 INSTALLATION_OUT_FILES1 = $(OTF_FILES) \
180 INSTALLATION_OUT_DIR2 = $(local_lilypond_datadir)/fonts/svg
181 INSTALLATION_OUT_FILES2 = $(SVG_FILES) $(WOFF_FILES)
183 export MFINPUTS := .:$(MFINPUTS)
186 default: $(PFB_FILES) $(ALL_GEN_FILES) \
187 $(outdir)/emmentaler-20.otf \
193 # FIXME: temporary hack: must regenerate after building fonts
194 tree-regen: $(ALL_GEN_FILES)
195 ${MAKE} -C $(top-build-dir) link-mf-tree
198 ## todo: this also depends on .tfm, FIXME.
200 $(outdir)/%.otf-gtable \
202 $(outdir)/%.pe: $(outdir)/%.log
203 $(buildscript-dir)/mf-to-table \
204 --global-lisp=$(outdir)/$(<F:.log=.otf-gtable) \
205 --lisp=$(outdir)/$(<F:.log=.lisp) \
207 --enc $(outdir)/$(<F:.log=.enc) \
211 rm -f mfplain.mem mfplain.log
215 $(outdir)/fonts.conf:
216 echo '<fontconfig><dir>'$(shell cd $(outdir); pwd)'</dir></fontconfig>' > $@
218 $(NCSB_OTFS): $(NCSB_SOURCE_FILES) \
219 $(auxscript-dir)/pfx2ttf.fontforge
220 $(foreach i, $(basename $(NCSB_SOURCE_FILES)), \
221 $(FONTFORGE) -script $(auxscript-dir)/pfx2ttf.fontforge \
222 $(i).pfb $(i).afm $(outdir)/ && ) true