3 STEPMAKE_TEMPLATES=metafont install install-out
5 include $(depth)/make/stepmake.make
7 AF_FILES = $(wildcard *.af)
9 EXTRA_DIST_FILES += README feta.tex
11 # We don't use $(MF_FILES), because there's more .mf cruft here
12 FETA_MF_FILES = $(wildcard feta[0-9]*.mf)\
13 $(wildcard feta-braces-[a-z].mf)\
14 $(wildcard feta-alphabet*[0-9].mf)\
15 $(wildcard parmesan[0-9]*.mf)
17 STAFF_SIZES = 11 13 14 16 18 20 23 26
18 BRACES = a b c d e f g h i
20 OTF_FILES = $(addsuffix .otf, $(addprefix $(outdir)/bigcheese, $(STAFF_SIZES)))\
22 PE_SCRIPTS = $(addsuffix .pe, $(addprefix $(outdir)/bigcheese, $(STAFF_SIZES))) \
23 $(addsuffix .dep, $(addprefix $(outdir)/bigcheese, $(STAFF_SIZES)))
24 OTF_TABLES = $(addsuffix .otf-table, $(addprefix $(outdir)/feta, $(STAFF_SIZES))) \
25 $(BRACES:%=$(outdir)/feta-braces-%.otf-table)
26 FETA_FONTS = $(FETA_MF_FILES:.mf=)
27 SVG_FILES = $(OTF_FILES:%.otf=%.svg) $(ALL_FONTS:%=$(outdir)/%.svg)
30 $(outdir)/aybabtu.otf-table: $(BRACES:%=$(outdir)/feta-braces-%.otf-table)
33 $(outdir)/aybabtu.otf-gtable: $(BRACES:%=$(outdir)/feta-braces-%.otf-gtable)
34 echo '(design_size . 20)' > $@
36 LOG_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.log)
37 LISP_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.lisp)
38 TEXTABLES = $(FETA_MF_FILES:%.mf=$(outdir)/%.tex)
39 ENC_FILES = $(TEXTABLES:.tex=.enc) $(outdir)/cmr.enc
40 TFM_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.tfm) $(addprefix $(outdir)/,$(addsuffix .tfm,$(SAUTER_FONTS)))
41 FETA_LIST_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%list.ly)
44 ENCODING_FILE=$(findstring $(<:.mf=.enc), $(FETA_MF_FILES:.mf=.enc))
45 MFTRACE_FLAGS=$(if $(ENCODING_FILE),--encoding $(ENCODING_FILE),)
47 # only for fonts which
49 # 1. are mentioned in font.scm
51 # 2. are not included with teTeX
59 $(outdir)/%.otf $(outdir)/%.svg: $(outdir)/%.pe
60 (cd $(outdir) && fontforge -script $(notdir $<))
62 $(outdir)/%.otf-table: $(outdir)/%.lisp $(if $(findstring brace,$<),,$(subst feta,parmesan,$<))
64 $(if $(findstring brace,$<),,$(subst feta,parmesan,$<)) \
65 $(if $(findstring brace,$<),,$(subst feta,feta-alphabet,$<)) > $@
67 $(outdir)/aybabtu.otf: $(outdir)/aybabtu.subfonts $(outdir)/aybabtu.otf-table $(outdir)/aybabtu.otf-gtable
69 $(outdir)/aybabtu.subfonts:
70 echo $(subst .mf,,$(wildcard feta-braces-[a-z].mf)) > $@
72 $(PE_SCRIPTS): $(buildscript-dir)/gen-bigcheese-scripts.py
73 $(PYTHON) $< --dir=$(outdir)
76 ALL_FONTS = $(FETA_FONTS) $(SAUTER_FONTS)
77 PFA_FILES = $(ALL_FONTS:%=$(outdir)/%.pfa)
79 # Make tfm files first, log files last,
80 # so that normally log files aren't made twice
81 ALL_GEN_FILES= $(TFM_FILES) $(TEXTABLES) $(TFM_FILES) $(LOG_FILES) $(ENC_FILES) $(LISP_FILES) $(FETA_LIST_FILES) $(OTF_TABLES) $(PFA_FILES) $(outdir)/lilypond.map $(OTF_FILES) $(SVG_FILES)
83 #PRE_INSTALL=$(MAKE) "$(ALL_GEN_FILES)"
84 INSTALLATION_DIR=$(local_lilypond_datadir)/fonts/source
85 INSTALLATION_FILES=$(MF_FILES) $(AF_FILES)
87 INSTALLATION_OUT_SUFFIXES=1 2 3 4 5 6 7
89 INSTALLATION_OUT_DIR1=$(local_lilypond_datadir)/tex
90 INSTALLATION_OUT_FILES1=$(TEXTABLES)
92 INSTALLATION_OUT_DIR2=$(local_lilypond_datadir)/otf
93 INSTALLATION_OUT_FILES2=$(OTF_FILES)
95 INSTALLATION_OUT_DIR3=$(local_lilypond_datadir)/fonts/tfm
96 INSTALLATION_OUT_FILES3=$(TFM_FILES)
98 INSTALLATION_OUT_DIR4=$(local_lilypond_datadir)/ly
99 INSTALLATION_OUT_FILES4=$(FETA_LIST_FILES)
101 INSTALLATION_OUT_DIR5=$(local_lilypond_datadir)/fonts/type1
102 INSTALLATION_OUT_FILES5=$(PFA_FILES)
104 INSTALLATION_OUT_DIR6=$(local_lilypond_datadir)/dvips/
105 INSTALLATION_OUT_FILES6=$(outdir)/lilypond.map
107 INSTALLATION_OUT_DIR7=$(local_lilypond_datadir)/ps/
108 INSTALLATION_OUT_FILES7=$(ENC_FILES)
110 INSTALLATION_OUT_DIR8=$(local_lilypond_datadir)/svg
111 INSTALLATION_OUT_FILES8=$(OTF_FILES)
114 export MFINPUTS:=.:$(MFINPUTS)
116 default: pfa_warning $(ALL_GEN_FILES) $(outdir)/bigcheese20.otf
119 ifneq ($(shell $(MFTRACE) --version | sed 's/ .*//'),mftrace)
121 @echo "ERROR: mftrace not found"
123 @echo "For obtaining PFA fonts, either install mftrace "
124 @echo "(see http://www.xs4all.nl/~hanwen/mftrace/ ),"
125 @echo "or try one of the following commands in this directory: "
127 @echo " make get-pfa "
128 @echo " make get-rpm-pfa "
129 @echo " make get-deb-pfa "
131 @echo "These commands will try to download the files from internet."
136 debian-mirror=http://ftp.us.debian.org
137 debian-package =lilypond_$(TOPLEVEL_VERSION)-1_i386.deb
138 $(outdir)/$(debian-package):
139 wget --passive-ftp -P $(outdir) $(debian-mirror)/debian/pool/main/l/lilypond/$(debian-package)
141 get-deb-pfa: $(outdir)/$(debian-package)
142 rm -rf $(outdir)/./usr
143 ar p $< data.tar.gz | \
144 tar -C $(outdir) -zvxf - '*.pfa'
145 cp `find $(outdir)/usr/ -name '*.pfa'` $(outdir)/
148 redhat-package=lilypond-$(TOPLEVEL_VERSION)-1.i386.rpm
149 $(outdir)/$(redhat-package):
150 wget --passive-ftp -P $(outdir) http://lilypond.org/download/binaries/Fedora-3/$(redhat-package)
152 get-rpm-pfa: $(outdir)/$(redhat-package)
153 cd $(outdir) ; rm -rf usr/ # (root alert!)
154 cd $(outdir) ; rpm2cpio $(redhat-package) | cpio -uid '*.pfa'
155 cp `find $(outdir)/usr/ -name '*.pfa'` $(outdir)/
157 # change this dependency
162 ## todo: this also depends on .tfm, FIXME.
163 $(outdir)/%.lisp $(outdir)/%.otf-gtable $(outdir)/%.enc $(outdir)/%.tex $(outdir)/%list.ly $(outdir)/%.dep: $(outdir)/%.log $(outdir)/%.tfm
164 $(PYTHON) $(buildscript-dir)/mf-to-table.py --global-lisp=$(outdir)/$(<F:.log=.otf-gtable) --lisp=$(outdir)/$(<F:.log=.lisp) --outdir=$(outdir) --dep $(outdir)/$(<F:.log=.dep) --enc $(outdir)/$(<F:.log=.enc) --tex $(outdir)/$(<F:.log=.tex) --ly $(outdir)/$(<F:.log=list.ly) $<
166 fontdir: $(addprefix $(outdir)/, lilypond.map lilypond.sfd private-fonts fonts.scale fonts.dir Fontmap.lily)
169 $(outdir)/lilypond.map: $(AFM_FILES)
170 for i in $(FETA_FONTS); do echo $$i $$i '<'$$i.pfa; done > $@
174 rm -f mfplain.mem mfplain.log
177 $(outdir)/%.enc.in: %.enc