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
,parmesan
[0-9]*.mf
)
22 STAFF_SIZES
= 11 13 14 16 18 20 23 26
23 BRACES
= a b c d e f g h i
25 OTF_FILES
= $(STAFF_SIZES
:%=$(outdir
)/emmentaler-
%.otf
) \
26 $(outdir
)/emmentaler-brace.otf
27 PE_SCRIPTS
= $(STAFF_SIZES
:%=$(outdir
)/emmentaler-
%.pe
)
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
)
32 WOFF_FILES
= $(OTF_FILES
:%.otf
=%.woff
)
34 FC_FIND
= $(shell $(FCLIST
) --verbose
'Century Schoolbook L:style=$(1)' \
36 | sed
's/.*"\([^"]*\)".*/\1/g')
38 NCSB_OTFS
= $(addprefix $(outdir
)/,CenturySchL-Ital.otf \
39 CenturySchL-BoldItal.otf \
40 CenturySchL-Roma.otf \
42 NCSB_INSTALL_DIR
= $(local_lilypond_datadir
)/fonts
/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)' > $@
56 # only for fonts which
58 # 1. are mentioned in font.scm
60 # 2. are not included with teTeX
63 $(outdir
)/emmentaler-
%.otf\
64 $(outdir
)/emmentaler-
%.svg\
65 $(outdir
)/emmentaler-
%.woff
: $(outdir
)/emmentaler-
%.pe \
67 $(outdir
)/feta-noteheads
%.pfb \
68 $(outdir
)/feta-alphabet
%.pfb \
69 $(outdir
)/parmesan
%.pfb \
70 $(outdir
)/feta
%.otf-table \
71 $(outdir
)/feta
%.otf-gtable
72 cd
$(outdir
) && $(FONTFORGE
) -script
$(notdir $(basename ,$@
).pe
)
74 $(outdir
)/emmentaler-brace.otf\
75 $(outdir
)/emmentaler-brace.svg\
76 $(outdir
)/emmentaler-brace.woff
: $(outdir
)/emmentaler-brace.pe \
77 $(foreach s
,$(BRACES
),$(outdir
)/feta-braces-
$(s
).pfb
) \
78 $(outdir
)/emmentaler-brace.otf-table
$(outdir
)/emmentaler-brace.otf-gtable
79 cd
$(outdir
) && $(FONTFORGE
) -script emmentaler-brace.pe
81 $(outdir
)/%.pfb
: $(outdir
)/%.log
83 $(outdir
)/%.otf-table
: $(outdir
)/%.lisp
84 cat
$< $(if
$(findstring brace
,$<),,$(subst feta
,parmesan
,$<)) \
85 $(if
$(findstring brace
,$<),,$(subst feta
,feta-noteheads
,$<)) \
86 $(if
$(findstring brace
,$<),,$(subst feta
,feta-alphabet
,$<)) > $@
89 ## ugh -- we want this to prevent failing -j2 compiles.
90 $(outdir
)/feta26.otf-table
: $(outdir
)/feta26.lisp \
91 $(outdir
)/feta-noteheads26.lisp \
92 $(outdir
)/parmesan26.lisp \
93 $(outdir
)/feta-alphabet26.lisp
94 $(outdir
)/feta23.otf-table
: $(outdir
)/feta23.lisp \
95 $(outdir
)/feta-noteheads23.lisp \
96 $(outdir
)/parmesan23.lisp \
97 $(outdir
)/feta-alphabet23.lisp
98 $(outdir
)/feta20.otf-table
: $(outdir
)/feta20.lisp \
99 $(outdir
)/feta-noteheads23.lisp \
100 $(outdir
)/parmesan20.lisp \
101 $(outdir
)/feta-alphabet20.lisp
102 $(outdir
)/feta18.otf-table
: $(outdir
)/feta18.lisp \
103 $(outdir
)/feta-noteheads18.lisp \
104 $(outdir
)/parmesan18.lisp \
105 $(outdir
)/feta-alphabet18.lisp
106 $(outdir
)/feta16.otf-table
: $(outdir
)/feta16.lisp \
107 $(outdir
)/feta-noteheads16.lisp \
108 $(outdir
)/parmesan16.lisp \
109 $(outdir
)/feta-alphabet16.lisp
110 $(outdir
)/feta14.otf-table
: $(outdir
)/feta14.lisp \
111 $(outdir
)/feta-noteheads14.lisp \
112 $(outdir
)/parmesan14.lisp \
113 $(outdir
)/feta-alphabet14.lisp
114 $(outdir
)/feta13.otf-table
: $(outdir
)/feta13.lisp \
115 $(outdir
)/feta-noteheads13.lisp \
116 $(outdir
)/parmesan13.lisp \
117 $(outdir
)/feta-alphabet13.lisp
118 $(outdir
)/feta11.otf-table
: $(outdir
)/feta11.lisp \
119 $(outdir
)/feta-noteheads11.lisp \
120 $(outdir
)/parmesan11.lisp \
121 $(outdir
)/feta-alphabet11.lisp
123 $(outdir
)/emmentaler-brace.otf
: $(outdir
)/emmentaler-brace.subfonts \
124 $(outdir
)/emmentaler-brace.fontname \
125 $(outdir
)/emmentaler-brace.otf-table \
126 $(outdir
)/emmentaler-brace.otf-gtable \
127 $(outdir
)/emmentaler-brace.pe
129 $(outdir
)/emmentaler-brace.otf\
130 $(outdir
)/emmentaler-brace.svg\
131 $(outdir
)/emmentaler-brace.woff
: $(BRACES
:%=$(outdir
)/feta-braces-
%.pfb
)
133 $(outdir
)/emmentaler-brace.fontname
:
134 echo
-n
'emmentaler-brace' > $@
135 $(outdir
)/emmentaler-brace.subfonts
:
136 echo
$(subst .mf
,,$(call src-wildcard
,feta-braces-
[a-z
].mf
)) > $@
138 $(PE_SCRIPTS
): $(buildscript-dir
)/gen-emmentaler-scripts
141 ALL_FONTS
= $(FETA_FONTS
)
142 PFB_FILES
= $(ALL_FONTS
:%=$(outdir
)/%.pfb
)
144 .PRECIOUS
: $(PFB_FILES
)
147 # Make tfm files first, log files last,
148 # so that normally log files aren't made twice
149 ALL_GEN_FILES
= $(LOG_FILES
) \
158 # PRE_INSTALL=$(MAKE) "$(ALL_GEN_FILES)"
160 INSTALLATION_DIR
= $(local_lilypond_datadir
)/fonts
/source
161 INSTALLATION_FILES
= $(MF_FILES
)
163 INSTALLATION_OUT_SUFFIXES
= 1 2 3
165 INSTALLATION_OUT_DIR1
= $(local_lilypond_datadir
)/fonts
/otf
166 INSTALLATION_OUT_FILES1
= $(OTF_FILES
) \
169 INSTALLATION_OUT_DIR2
= $(local_lilypond_datadir
)/fonts
/svg
170 INSTALLATION_OUT_FILES2
= $(SVG_FILES
) $(WOFF_FILES
)
172 export MFINPUTS
:= .
:$(MFINPUTS
)
175 default
: $(PFB_FILES
) $(ALL_GEN_FILES
) \
176 $(outdir
)/emmentaler-20.otf \
182 # FIXME: temporary hack: must regenerate after building fonts
183 tree-regen
: $(ALL_GEN_FILES
)
184 ${MAKE} -C
$(top-build-dir
) link-mf-tree
187 ## todo: this also depends on .tfm, FIXME.
189 $(outdir
)/%.otf-gtable \
191 $(outdir
)/%.pe
: $(outdir
)/%.log
192 $(buildscript-dir
)/mf-to-table \
193 --global-lisp
=$(outdir
)/$(<F
:.log
=.otf-gtable
) \
194 --lisp
=$(outdir
)/$(<F
:.log
=.lisp
) \
196 --enc
$(outdir
)/$(<F
:.log
=.enc
) \
200 rm -f mfplain.mem mfplain.log
204 $(outdir
)/fonts.conf
:
205 echo
'<fontconfig><dir>'$(shell cd
$(outdir
); pwd
)'</dir></fontconfig>' > $@
207 $(NCSB_OTFS
): $(NCSB_SOURCE_FILES
) \
208 $(auxscript-dir
)/pfx2ttf.fontforge
209 $(foreach i
, $(basename $(NCSB_SOURCE_FILES
)), \
210 $(FONTFORGE
) -script
$(auxscript-dir
)/pfx2ttf.fontforge \
211 $(i
).pfb
$(i
).afm
$(outdir
)/ && ) true