source: doc/papers/concurrency/AMA/AMA-lato/Lato-fonts/Makefile@ d5ccbe9

ADT aaron-thesis arm-eh ast-experimental cleanup-dtors deferred_resn demangler enum forall-pointer-decay jacob/cs343-translation jenkins-sandbox new-ast new-ast-unique-expr new-env no_list persistent-indexer pthread-emulation qualifiedEnum with_gc
Last change on this file since d5ccbe9 was d5ccbe9, checked in by Peter A. Buhr <pabuhr@…>, 8 years ago

modify for SPE macros

  • Property mode set to 100644
File size: 5.7 KB
Line 
1## Makefile
2## Copyright 2011 Mohamed El Morabity
3#
4# This work may be distributed and/or modified under the conditions of the LaTeX
5# Project Public License, either version 1.3 of this license or (at your option)
6# any later version. The latest version of this license is in
7# http://www.latex-project.org/lppl.txt and version 1.3 or later is part of all
8# distributions of LaTeX version 2005/12/01 or later.
9#
10# This work has the LPPL maintenance status `maintained'.
11#
12# The Current Maintainer of this work is Mohamed El Morabity
13#
14# This work consists of all files listed in manifest.txt.
15
16######################
17# Fonts informations #
18######################
19
20FONT_NAME = lato
21FOUNDRY = public
22FONT_CODES = fla
23
24# Supported LaTeX encodings
25SUPPORTED_ENCODINGS = ot1 t1 ts1
26# Supported LaTeX encodings containing small caps
27SUPPORTED_SC_ENCODINGS = $(filter-out ts1,$(SUPPORTED_ENCODINGS))
28# Custom encodings provided
29INPUT_ENCODINGS = $(INPUT_ETX_FILES:$(FONT_NAME)-%.etx=%)
30
31
32#####################
33# Installation root #
34#####################
35
36TEXMFHOME = $(shell kpsexpand '$$TEXMFHOME')
37
38
39###########
40# Archive #
41###########
42
43ARCHIVE_ROOT = $(FONT_NAME)
44ARCHIVE = $(FONT_NAME).zip
45
46
47###########
48# Sources #
49###########
50
51TRUETYPE_FILES = $(wildcard *.ttf)
52
53# Fontinst files
54FONTINST_FILE = $(FONT_NAME)-drv.tex
55FONTINST_MAP_FILE = $(FONT_NAME)-map.tex
56
57# Custom Fontinst encoding files
58INPUT_ETX_FILES = $(FONT_NAME)-01.etx $(FONT_NAME)-02.etx $(FONT_NAME)-dotlessj.etx
59MTX_FILES = $(FONT_NAME)-fixlatin.mtx $(FONT_NAME)-fixtextcomp.mtx
60
61STYLE_FILES = $(wildcard *.sty)
62
63DOCUMENTATION = $(FONT_NAME).tex $(FONT_NAME).pdf $(FONT_NAME)-samples.tex $(FONT_NAME)-samples.pdf README CHANGES
64
65# Files to be installed in texmf/source
66SOURCE_FILES = $(FONTINST_FILE) $(FONTINST_MAP_FILE) $(INPUT_ETX_FILES) $(MTX_FILES) Makefile ttf2type1.pe
67
68
69###################
70# Generated files #
71###################
72
73TYPE1_FILES = $(TRUETYPE_FILES:.ttf=.pfb) $(TRUETYPE_FILES:.ttf=-LCDFJ.pfb)
74AFM_FILES = $(TYPE1_FILES:.pfb=.afm)
75
76# Fontinst log file
77FONTINST_REC_FILE = $(FONT_NAME)-rec.tex
78
79# Metrics files
80PL_FILES = $(foreach e,$(INPUT_ENCODINGS), \
81 $(TRUETYPE_FILES:.ttf=-$(e).pl) \
82 )
83OUTPUT_MTX_FILES = $(PL_FILES:.pl=.mtx)
84VPL_FILES = $(foreach e,$(SUPPORTED_ENCODINGS), \
85 $(TRUETYPE_FILES:.ttf=-$(e).vpl) \
86 ) \
87 $(foreach e,$(SUPPORTED_SC_ENCODINGS), \
88 $(TRUETYPE_FILES:.ttf=-SmallCaps-$(e).vpl) \
89 )
90TFM_FILES = $(PL_FILES:.pl=.tfm) $(VPL_FILES:.vpl=.tfm)
91VF_FILES = $(VPL_FILES:.vpl=.vf)
92
93MAP = $(FONT_NAME).map
94
95# Font definition files
96FD_FILES = $(foreach e,$(SUPPORTED_ENCODINGS), \
97 $(foreach f,$(FONT_CODES), \
98 $(e)$(f).fd \
99 ) \
100 )
101
102# Generated encoding files
103ENC_FILES = $(INPUT_ETX_FILES:.etx=.enc)
104
105# Generated files to be installed
106GENERATED_FILES = $(TYPE1_FILES) $(AFM_FILES) $(TFM_FILES) $(VF_FILES) $(MAP) $(FD_FILES) $(ENC_FILES)
107
108
109default: all
110
111
112all: dist
113
114
115dist: $(ARCHIVE)
116
117
118%.pfb %.afm: %.ttf
119 fontforge ttf2type1.pe $<
120 # BUGFIX: fix FontName to the name of the file
121 sed -i "s/^FontName .*/FontName $*/" $*.afm
122
123
124%-LCDFJ.pfb: %.pfb
125 t1dotlessj $< $@
126
127
128%-LCDFJ.afm: %-LCDFJ.pfb
129 pf2afm $<
130 # BUGFIX: fix FontName to the name of the file
131 sed -i "s/^FontName .*/FontName $*/" $*.afm
132
133
134%.tfm: %.pl
135 pltotf $< $@
136
137
138%.tfm: %.vpl
139 vptovf $^ $
140
141
142%.vf: %.vpl
143 vptovf $^ $@
144
145
146$(FONTINST_REC_FILE): $(AFM_FILES) $(MTX_FILES) $(FONTINST_FILE)
147 latex $(FONTINST_FILE)
148
149
150$(PL_FILES) $(VPL_FILES): $(FONTINST_REC_FILE)
151
152
153$(MAP): $(FONTINST_REC_FILE) $(FONTINST_MAP_FILE)
154 latex $(FONTINST_MAP_FILE)
155
156
157$(FD_FILES) $(ENC_FILES): $(MAP)
158
159
160texmf-tree: clean-texmf-tree $(GENERATED_FILES) $(SOURCES_FILES)
161 mkdir -p $(ARCHIVE_ROOT)/doc/fonts/$(FONT_NAME)/
162 mkdir -p $(ARCHIVE_ROOT)/tex/latex/$(FONT_NAME)/
163 mkdir -p $(ARCHIVE_ROOT)/fonts/{enc,map}/dvips/$(FONT_NAME)/
164 mkdir -p $(ARCHIVE_ROOT)/fonts/{afm,tfm,truetype,type1,vf}/$(FOUNDRY)/$(FONT_NAME)/
165 mkdir -p $(ARCHIVE_ROOT)/source/fonts/$(FONT_NAME)/
166 cp -p $(DOCUMENTATION) $(ARCHIVE_ROOT)/doc/fonts/$(FONT_NAME)/
167 cp -p $(FD_FILES) $(STYLE_FILES) $(ARCHIVE_ROOT)/tex/latex/$(FONT_NAME)/
168 cp -p $(ENC_FILES) $(ARCHIVE_ROOT)/fonts/enc/dvips/$(FONT_NAME)/
169 cp -p $(MAP) $(ARCHIVE_ROOT)/fonts/map/dvips/$(FONT_NAME)/
170 cp -p $(AFM_FILES) $(ARCHIVE_ROOT)/fonts/afm/$(FOUNDRY)/$(FONT_NAME)/
171 cp -p $(TFM_FILES) $(ARCHIVE_ROOT)/fonts/tfm/$(FOUNDRY)/$(FONT_NAME)/
172 cp -p $(TRUETYPE_FILES) $(ARCHIVE_ROOT)/fonts/truetype/$(FOUNDRY)/$(FONT_NAME)/
173 cp -p $(TYPE1_FILES) $(ARCHIVE_ROOT)/fonts/type1/$(FOUNDRY)/$(FONT_NAME)/
174 cp -p $(VF_FILES) $(ARCHIVE_ROOT)/fonts/vf/$(FOUNDRY)/$(FONT_NAME)/
175 cp -p $(SOURCE_FILES) $(ARCHIVE_ROOT)/source/fonts/$(FONT_NAME)/
176 cp -p README $(ARCHIVE_ROOT)
177 cd $(ARCHIVE_ROOT) && find . -type f > manifest.txt
178
179
180$(ARCHIVE): clean-texmf-tree texmf-tree
181 zip -r $@ $(ARCHIVE_ROOT)
182
183
184install: texmf-tree
185 mkdir -p $(TEXMFHOME)
186 cp -a $(ARCHIVE_ROOT)/* $(TEXMFHOME)
187 texhash
188 updmap --enable Map=$(MAP)
189
190
191uninstall:
192 $(RM) -r $(TEXMFHOME)/doc/latex/$(FONT_NAME)/
193 $(RM) -r $(TEXMFHOME)/tex/latex/$(FONT_NAME)/
194 $(RM) -r $(TEXMFHOME)/fonts/{enc,map}/dvips/$(FONT_NAME)/
195 $(RM) -r $(TEXMFHOME)/fonts/{afm,tfm,type1,vf}/$(FOUNDRY)/$(FONT_NAME)/
196 $(RM) -r $(TEXMFHOME)/source/$(FONT_NAME)/
197 updmap --disable $(MAP)
198 texhash
199
200
201clean: clean-texmf-tree
202 $(RM) $(TYPE1_FILES) $(AFM_FILES)
203 $(RM) $(FONTINST_REC_FILE)
204 $(RM) $(PL_FILES) $(TYPE1_FILES:.pfb=.pl)
205 $(RM) $(OUTPUT_MTX_FILES) $(TYPE1_FILES:.pfb=.mtx)
206 $(RM) $(VPL_FILES)
207 $(RM) $(TFM_FILES)
208 $(RM) $(VF_FILES)
209 $(RM) $(MAP)
210 $(RM) $(FD_FILES)
211 $(RM) $(ENC_FILES)
212 $(RM) $(ARCHIVE)
213 $(RM) *~ *.log
214
215
216clean-texmf-tree:
217 $(RM) -r $(ARCHIVE_ROOT)
218
219
220.PHONY: clean clean-texmf-tree texmf-tree
Note: See TracBrowser for help on using the repository browser.