-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathMakefile
239 lines (230 loc) · 8.8 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
NAME = fei
SHELL = bash
PWD = $(shell pwd)
TEMP := $(shell mktemp -d)
TDIR = $(TEMP)/$(NAME)
VERS = $(shell ltxfileinfo -v $(NAME).cls)
LOCAL = $(shell kpsewhich --var-value TEXMFLOCAL)
UTREE = $(shell kpsewhich --var-value TEXMFHOME)
$(NAME).cls README.txt $(NAME).pdf: $(NAME).dtx
latexmk -pdf $(NAME).dtx -gg
clean:
git clean -Xdf
format:
cp fei.dtx tmp.cls
latexindent -w tmp.cls
mv tmp.cls fei.dtx
distclean: clean
rm -f *.{pdf,cls} README.txt fei-template.tex fei-template-sublist.tex $(NAME)-$(VERS).zip
inst: $(NAME).cls
mkdir -p $(UTREE)/{tex,source,doc}/latex/$(NAME)
cp $(NAME).dtx $(UTREE)/source/latex/$(NAME)
cp $(NAME).cls $(UTREE)/tex/latex/$(NAME)
cp $(NAME).cls $(UTREE)/doc/latex/$(NAME)
install: $(NAME).cls
sudo mkdir -p $(LOCAL)/{tex,source,doc}/latex/$(NAME)
sudo cp $(NAME).dtx $(LOCAL)/source/latex/$(NAME)
sudo cp $(NAME).cls $(LOCAL)/tex/latex/$(NAME)
sudo cp $(NAME).cls $(LOCAL)/doc/latex/$(NAME)
zip: $(NAME).cls $(NAME).pdf fei-template.tex fei-template-sublist.tex README.txt
mkdir $(TDIR)
cp README.txt $(TDIR)/README
cp $(NAME).{pdf,dtx} fei-template*.tex referencias.bib $(TDIR)
cd $(TEMP); zip -Drq $(PWD)/$(NAME)-$(VERS).zip $(NAME)
templates fei-template.tex fei-template-sublist.tex: tests/test-full-template.tex tests/test-full-template-sublist.tex
cp tests/test-full-template.tex fei-template.tex
cp tests/test-full-template-sublist.tex fei-template-sublist.tex
tests tests/test-full-template.tex tests/test-full-template-sublist.tex: $(NAME).cls tests/pieces/*.tex
awk 'FNR==1{print ""}{print}' tests/pieces/documentclass.tex \
tests/pieces/inputenc-author-title.tex \
tests/pieces/newsubfloatfigure.tex \
tests/pieces/subtitulo.tex \
tests/pieces/acronimos.tex \
tests/pieces/simbolos.tex \
tests/pieces/addbibresource.tex \
tests/pieces/makeindex.tex \
tests/pieces/makeglossaries.tex \
tests/pieces/begin-document.tex \
tests/pieces/titulo.tex \
tests/pieces/folha-de-rosto.tex \
tests/pieces/cat-aprov.tex \
tests/pieces/dedicatoria.tex \
tests/pieces/agradecimentos.tex \
tests/pieces/epigrafe.tex \
tests/pieces/resumo.tex \
tests/pieces/abstract.tex \
tests/pieces/tocloftasa.tex \
tests/pieces/first-chapter-title.tex \
tests/pieces/first-chapter-text.tex \
tests/pieces/document-text.tex \
tests/pieces/printbibliography.tex \
tests/pieces/printindex.tex \
tests/pieces/end-document.tex > tests/test-full-template.tex
awk 'FNR==1{print ""}{print}' tests/pieces/documentclass-numeric.tex \
tests/pieces/inputenc-author-title.tex \
tests/pieces/newsubfloatfigure.tex \
tests/pieces/subtitulo.tex \
tests/pieces/acronimos.tex \
tests/pieces/simbolos.tex \
tests/pieces/addbibresource.tex \
tests/pieces/makeindex.tex \
tests/pieces/makeglossaries.tex \
tests/pieces/begin-document.tex \
tests/pieces/titulo.tex \
tests/pieces/folha-de-rosto.tex \
tests/pieces/cat-aprov.tex \
tests/pieces/dedicatoria.tex \
tests/pieces/agradecimentos.tex \
tests/pieces/epigrafe.tex \
tests/pieces/resumo.tex \
tests/pieces/abstract.tex \
tests/pieces/tocloftasa.tex \
tests/pieces/first-chapter-title.tex \
tests/pieces/first-chapter-text.tex \
tests/pieces/document-text.tex \
tests/pieces/printbibliography.tex \
tests/pieces/printindex.tex \
tests/pieces/end-document.tex > tests/test-full-template-numeric.tex
awk 'FNR==1{print ""}{print}' tests/pieces/documentclass-backrefs.tex \
tests/pieces/inputenc-author-title.tex \
tests/pieces/newsubfloatfigure.tex \
tests/pieces/subtitulo.tex \
tests/pieces/acronimos.tex \
tests/pieces/simbolos.tex \
tests/pieces/addbibresource.tex \
tests/pieces/makeindex.tex \
tests/pieces/makeglossaries.tex \
tests/pieces/begin-document.tex \
tests/pieces/titulo.tex \
tests/pieces/folha-de-rosto.tex \
tests/pieces/cat-aprov.tex \
tests/pieces/dedicatoria.tex \
tests/pieces/agradecimentos.tex \
tests/pieces/epigrafe.tex \
tests/pieces/resumo.tex \
tests/pieces/abstract.tex \
tests/pieces/tocloftasa.tex \
tests/pieces/first-chapter-title.tex \
tests/pieces/first-chapter-text.tex \
tests/pieces/document-text.tex \
tests/pieces/printbibliography.tex \
tests/pieces/printindex.tex \
tests/pieces/end-document.tex > tests/test-full-template-backrefs.tex
awk 'FNR==1{print ""}{print}' tests/pieces/documentclass-numeric-backrefs.tex \
tests/pieces/inputenc-author-title.tex \
tests/pieces/newsubfloatfigure.tex \
tests/pieces/subtitulo.tex \
tests/pieces/acronimos.tex \
tests/pieces/simbolos.tex \
tests/pieces/addbibresource.tex \
tests/pieces/makeindex.tex \
tests/pieces/makeglossaries.tex \
tests/pieces/begin-document.tex \
tests/pieces/titulo.tex \
tests/pieces/folha-de-rosto.tex \
tests/pieces/cat-aprov.tex \
tests/pieces/dedicatoria.tex \
tests/pieces/agradecimentos.tex \
tests/pieces/epigrafe.tex \
tests/pieces/resumo.tex \
tests/pieces/abstract.tex \
tests/pieces/tocloftasa.tex \
tests/pieces/first-chapter-title.tex \
tests/pieces/first-chapter-text.tex \
tests/pieces/document-text.tex \
tests/pieces/printbibliography.tex \
tests/pieces/printindex.tex \
tests/pieces/end-document.tex > tests/test-full-template-numeric-backrefs.tex
awk 'FNR==1{print ""}{print}' tests/pieces/pdfa-xmpdata-filecontents.tex \
tests/pieces/documentclass-nopdfa.tex \
tests/pieces/inputenc-author-title.tex \
tests/pieces/newsubfloatfigure.tex \
tests/pieces/subtitulo.tex \
tests/pieces/acronimos.tex \
tests/pieces/simbolos.tex \
tests/pieces/addbibresource.tex \
tests/pieces/makeindex.tex \
tests/pieces/makeglossaries.tex \
tests/pieces/begin-document.tex \
tests/pieces/titulo.tex \
tests/pieces/folha-de-rosto.tex \
tests/pieces/cat-aprov.tex \
tests/pieces/dedicatoria.tex \
tests/pieces/agradecimentos.tex \
tests/pieces/epigrafe.tex \
tests/pieces/resumo.tex \
tests/pieces/abstract.tex \
tests/pieces/tocloftasa.tex \
tests/pieces/first-chapter-title.tex \
tests/pieces/first-chapter-text.tex \
tests/pieces/document-text.tex \
tests/pieces/printbibliography.tex \
tests/pieces/printindex.tex \
tests/pieces/end-document.tex > tests/test-full-template-nopdfa.tex
awk 'FNR==1{print ""}{print}' tests/pieces/pdfa-xmpdata-filecontents.tex \
tests/pieces/documentclass-sublist.tex \
tests/pieces/inputenc-author-title.tex \
tests/pieces/newsubfloatfigure.tex \
tests/pieces/subtitulo.tex \
tests/pieces/acronimos-simbolos-sublist.tex \
tests/pieces/addbibresource.tex \
tests/pieces/makeindex.tex \
tests/pieces/makeglossaries.tex \
tests/pieces/begin-document.tex \
tests/pieces/titulo.tex \
tests/pieces/folha-de-rosto.tex \
tests/pieces/cat-aprov.tex \
tests/pieces/dedicatoria.tex \
tests/pieces/agradecimentos.tex \
tests/pieces/epigrafe.tex \
tests/pieces/resumo.tex \
tests/pieces/abstract.tex \
tests/pieces/tocloftasa.tex \
tests/pieces/first-chapter-title.tex \
tests/pieces/first-chapter-text.tex \
tests/pieces/document-text.tex \
tests/pieces/printbibliography.tex \
tests/pieces/printindex.tex \
tests/pieces/end-document.tex > tests/test-full-template-sublist.tex
awk 'FNR==1{print ""}{print}' tests/pieces/documentclass.tex \
tests/pieces/inputenc-author-title.tex \
tests/pieces/newsubfloatfigure.tex \
tests/pieces/addbibresource.tex \
tests/pieces/begin-document.tex \
tests/pieces/titulo.tex \
tests/pieces/folha-de-rosto.tex \
tests/pieces/cat-aprov.tex \
tests/pieces/resumo.tex \
tests/pieces/abstract.tex \
tests/pieces/tocloftasa.tex \
tests/pieces/first-chapter-title.tex \
tests/pieces/first-chapter-text.tex \
tests/pieces/document-text.tex \
tests/pieces/printbibliography.tex \
tests/pieces/end-document.tex > tests/test-only-required.tex
awk 'FNR==1{print ""}{print}' tests/pieces/documentclass.tex \
tests/pieces/inputenc-author-title.tex \
tests/pieces/begin-document.tex \
tests/pieces/first-chapter-text.tex \
tests/pieces/end-document.tex > tests/test-only-text.tex
awk 'FNR==1{print ""}{print}' tests/pieces/documentclass.tex \
tests/pieces/inputenc-author-title.tex \
tests/pieces/newsubfloatfigure.tex \
tests/pieces/addbibresource.tex \
tests/pieces/begin-document.tex \
tests/pieces/first-chapter-title.tex \
tests/pieces/first-chapter-text.tex \
tests/pieces/document-text.tex \
tests/pieces/printbibliography.tex \
tests/pieces/end-document.tex > tests/test-only-text-and-titles.tex
cp $(NAME).cls referencias.bib tests
latexmk -pdf tests/test-full-template.tex
latexmk -pdf tests/test-full-template-numeric.tex
latexmk -pdf tests/test-full-template-backrefs.tex
latexmk -pdf tests/test-full-template-numeric-backrefs.tex
latexmk -pdf tests/test-full-template-nopdfa.tex
latexmk -pdf tests/test-full-template-sublist.tex
latexmk -pdf tests/test-only-required.tex
latexmk -pdf tests/test-only-text.tex
latexmk -pdf tests/test-only-text-and-titles.tex
rm tests/referencias.bib tests/$(NAME).cls