3 STEPMAKE_TEMPLATES
=metafont
install install-out
4 LOCALSTEPMAKE_TEMPLATES
=asciifont
6 include $(depth
)/make
/stepmake.make
8 AF_FILES
= $(wildcard *.af
)
10 EXTRA_DIST_FILES
+= README feta.
tex
12 # We don't use $(MF_FILES), because there's more .mf cruft here
13 FETA_MF_FILES
= $(wildcard feta
[0-9]*.mf
)\
14 $(wildcard feta-braces
*[0-9].mf
)\
15 $(wildcard feta-din
*[0-9].mf
)\
16 $(wildcard feta-nummer
*[0-9].mf
)\
17 $(wildcard parmesan
[0-9]*.mf
)
19 FETA_FONTS
= $(FETA_MF_FILES
:.mf
=)
21 XPM_FONTS
= feta20 feta-din10 feta-nummer10 feta-braces20 parmesan20
23 LOG_FILES
= $(FETA_MF_FILES
:%.mf
=$(outdir
)/%.log
)
24 TEXTABLES
= $(FETA_MF_FILES
:%.mf
=$(outdir
)/%.
tex)
25 AFM_FILES
= $(FETA_MF_FILES
:%.mf
=$(outdir
)/%.afm
) \
26 $(AF_FILES
:%.af
=$(outdir
)/%.afm
)
27 ENC_FILES
= $(TEXTABLES
:.
tex=.enc
)
28 TFM_FILES
= $(FETA_MF_FILES
:%.mf
=$(outdir
)/%.tfm
)
31 ENCODING_FILE
=$(findstring $(<:.mf
=.enc
), $(FETA_MF_FILES
:.mf
=.enc
))
32 MFTRACE_FLAGS
=$(if
$(ENCODING_FILE
),--encoding
$(ENCODING_FILE
),)
34 # Make tfm files first, log files last,
35 # so that normally log files aren't made twice
36 ALL_GEN_FILES
= $(TFM_FILES
) $(TEXTABLES
) $(AFM_FILES
) $(TFM_FILES
) $(LOG_FILES
) $(ENC_FILES
)
38 #PRE_INSTALL=$(MAKE) "$(ALL_GEN_FILES)"
39 INSTALLATION_DIR
=$(local_lilypond_datadir
)/fonts
/source
40 INSTALLATION_FILES
=$(MF_FILES
) $(AF_FILES
)
42 INSTALLATION_OUT_SUFFIXES
=1 2 3 4 5
44 INSTALLATION_OUT_DIR1
=$(local_lilypond_datadir
)/tex
45 INSTALLATION_OUT_FILES1
=$(TEXTABLES
)
47 INSTALLATION_OUT_DIR2
=$(local_lilypond_datadir
)/fonts
/afm
48 INSTALLATION_OUT_FILES2
=$(AFM_FILES
)
50 INSTALLATION_OUT_DIR3
=$(local_lilypond_datadir
)/fonts
/tfm
51 INSTALLATION_OUT_FILES3
=$(TFM_FILES
)
53 # comment this out if you don't want pfa's to be generated
54 # making pfas takes a lot of CPU time. Let's skip it for now.
58 SAUTER_FONTS
= cmbxti7 cmbxti8 cmbxti12 cmbxti14 \
59 cmcsc7 cmcsc12 cmtt17 cmbx14 cmbx17 cmtt6 cmbx6 cmbx5 cmbxti5 \
62 ALL_FONTS
= $(FETA_FONTS
) $(SAUTER_FONTS
)
65 PFA_FILES
= $(ALL_FONTS
:%=$(outdir
)/%.pfa
)
66 PFB_FILES
= $(PFA_FILES
:%.pfa
=%.pfb
)
70 ALL_GEN_FILES
+= $(PFB_FILES
)
74 ALL_GEN_FILES
+= $(PFA_FILES
) $(outdir
)/lilypond.map
$(outdir
)/fonts.scale
75 INSTALLATION_OUT_DIR4
=$(local_lilypond_datadir
)/fonts
/type1
76 INSTALLATION_OUT_FILES4
=$(PFA_FILES
) $(outdir
)/fonts.scale
78 INSTALLATION_OUT_DIR5
=$(local_lilypond_datadir
)/dvips
/
79 INSTALLATION_OUT_FILES5
=$(outdir
)/lilypond.map
83 INSTALLATION_OUT_FILES4
+=$(PFB_FILES
)
86 export MFINPUTS
:=.
:$(MFINPUTS
)
88 default
: $(ALL_GEN_FILES
)
91 ## todo: this also depends on .tfm, FIXME.
92 $(outdir
)/%.afm
$(outdir
)/%.enc
$(outdir
)/%.
tex $(outdir
)/%.dep
: $(outdir
)/%.log
$(outdir
)/%.tfm
93 $(PYTHON
) $(buildscript-dir
)/mf-to-table.py
--package
=$(topdir
) --outdir
=$(outdir
) --dep
$(outdir
)/$(<F
:.log
=.dep
) --afm
$(outdir
)/$(<F
:.log
=.afm
) --enc
$(outdir
)/$(<F
:.log
=.enc
) --tex $(outdir
)/$(<F
:.log
=.
tex) --ly
$(outdir
)/$(<F
:.log
=list.ly
) $<
95 fontdir
: $(addprefix $(outdir
)/, lilypond.map lilypond.sfd private-fonts fonts.scale fonts.
dir)
98 mapentry
=$(1) $(shell fgrep FontName
$(outdir
)/$(1).afm | sed
-e
's/FontName *//') <$(1).pfaX
100 map
= $(foreach a
,$(2),$(call
$(1),$(a
)))
101 $(outdir
)/lilypond.xmap
: $(AFM_FILES
)
102 echo
'$(call map,mapentry,$(ALL_FONTS))' | \
103 tr
'X' '\n' | sed
-e
's/^ *//'> $@
105 # using shell for loop seems most robust
106 $(outdir
)/lilypond.map
: $(AFM_FILES
)
107 for i in
$(FETA_FONTS
); do echo
$$i $$(fgrep FontName
$(outdir
)/$$i.afm | sed
-e
's/FontName *//') '<'$$i.pfa
; done
> $@
108 for i in
$(SAUTER_FONTS
); do echo
"$$i $$i <$$i.pfa"; done
>> $@
111 $(outdir
)/fonts.scale
: $(PFA_FILES
)
112 # cd $(outdir) && echo $(FETA_MF_FILES:.mf=.pfa) $(FETA_MF_FILES:.mf=.pfb) | $(PYTHON) $(topdir)/buildscripts/make-font-dir.py > $(@F)
113 cd
$(outdir
) && echo
*.pfa
*.pfb |
$(PYTHON
) $(topdir
)/buildscripts
/make-font-dir.py
> $(@F
)
115 $(outdir
)/fonts.
dir: $(outdir
)/fonts.scale
116 cd
$(outdir
) && mkfontdir
119 $(outdir
)/lilypond.sfd
:
120 # cd $(outdir) && echo sketch $(FETA_MF_FILES:.mf=.pfa) | $(PYTHON) $(topdir)/buildscripts/make-font-dir.py > $(@F)
121 cd
$(outdir
) && echo sketch
*.pfa |
$(PYTHON
) $(topdir
)/buildscripts
/make-font-dir.py
> $(@F
)
124 SODIPODI_FONTS
= parmesan20 feta-braces0 feta-nummer10 feta20
125 $(outdir
)/private-fonts
:
126 cd
$(outdir
) && echo sodipodi
$(SODIPODI_FONTS
:%=%.pfa
) |
$(PYTHON
) $(topdir
)/buildscripts
/make-font-dir.py
> $(@F
)
129 rm -f mfplain.mem mfplain.log
133 pfa
: afm
$(PFA_FILES
) fontdir
134 pfb
: afm
$(PFB_FILES
) fontdir
136 # needed for web documentation
137 $(SAUTER_FONTS
:%=$(outdir
)/%.pfa
):
138 $(foreach i
, $(SAUTER_FONTS
), \
139 $(MFTRACE
) -I
$(outdir
)/ --pfa
--simplify
--keep-trying
$(i
) && mv
$(i
).pfa
$(outdir
)/ && ) true
140 $(SAUTER_FONTS
:%=$(outdir
)/%.pfb
):
141 $(foreach i
, $(SAUTER_FONTS
), \
142 $(MFTRACE
) -I
$(outdir
)/ --pfa
--pfb
--simplify
--keep-trying
$(i
) && mv
$(i
).pfb
$(i
).pfa
$(outdir
)/ && ) true