blob: c81d355446504fe2cf3feed59720526daca151e7 (
plain)
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
|
#
# Makefile for acmart package
#
# This file is in public domain
#
# $Id: Makefile,v 1.10 2016/04/14 21:55:57 boris Exp $
#
PACKAGE=acmart
DEV=-dev # To switch dev on
#DEV=
PDF = $(PACKAGE).pdf acmguide.pdf
BIBLATEXFILES= $(wildcard *.bbx) $(wildcard *.cbx) $(wildcard *.dbx) $(wildcard *.lbx)
SAMPLEBIBLATEXFILES=$(patsubst %,samples/%,$(BIBLATEXFILES))
ACMCPSAMPLES= \
samples/sample-acmcp-Discussion.pdf \
samples/sample-acmcp-Invited.pdf \
samples/sample-acmcp-Position.pdf \
samples/sample-acmcp-Research.pdf \
samples/sample-acmcp-Review.pdf
all: ${PDF} ALLSAMPLES
%.pdf: %.dtx $(PACKAGE).cls
pdflatex $<
- bibtex $*
pdflatex $<
- makeindex -s gind.ist -o $*.ind $*.idx
- makeindex -s gglo.ist -o $*.gls $*.glo
pdflatex $<
while ( grep -q '^LaTeX Warning: Label(s) may have changed' $*.log) \
do pdflatex $<; done
acmguide.pdf: $(PACKAGE).dtx $(PACKAGE).cls
pdflatex -jobname acmguide $(PACKAGE).dtx
- bibtex acmguide
pdflatex -jobname acmguide $(PACKAGE).dtx
while ( grep -q '^LaTeX Warning: Label(s) may have changed' acmguide.log) \
do pdflatex -jobname acmguide $(PACKAGE).dtx; done
%.cls: %.ins %.dtx
pdflatex $<
%-tagged.cls: %.ins %.dtx
pdflatex $<
ALLSAMPLES: $(SAMPLEBIBLATEXFILES)
cd samples; pdflatex samples.ins; cd ..
for texfile in samples/*.tex; do \
pdffile=$${texfile%.tex}.pdf; \
${MAKE} $$pdffile; \
done
samples/%: %
cp $^ samples
samples/$(PACKAGE).cls: $(PACKAGE).cls
samples/$(PACKAGE)-tagged.cls: $(PACKAGE)-tagged.cls
samples/ACM-Reference-Format.bst: ACM-Reference-Format.bst
samples/abbrev.bib: ACM-Reference-Format.bst
perl -pe 's/MACRO ({[^}]*}) *\n/MACRO \1/' ACM-Reference-Format.bst \
| grep MACRO | sed 's/MACRO {/@STRING{/' \
| sed 's/} *{/ = /' > samples/abbrev.bib
samples/%.bbx: %.bbx
samples/%.cbx: %.cbx
samples/%.dbx: %.dbx
samples/%.lbx: %.lbx
samples/%.pdf: samples/%.tex samples/$(PACKAGE).cls samples/ACM-Reference-Format.bst
cd $(dir $@) && pdflatex${DEV} $(notdir $<)
- cd $(dir $@) && bibtex $(notdir $(basename $<))
cd $(dir $@) && pdflatex${DEV} $(notdir $<)
cd $(dir $@) && pdflatex${DEV} $(notdir $<)
while ( grep -q '^LaTeX Warning: Label(s) may have changed' $(basename $<).log) \
do cd $(dir $@) && pdflatex${DEV} $(notdir $<); done
samples/sample-sigconf-biblatex.pdf: samples/sample-sigconf-biblatex.tex $(SAMPLEBIBLATEXFILES)
cd $(dir $@) && pdflatex${DEV} $(notdir $<)
- cd $(dir $@) && biber $(notdir $(basename $<))
cd $(dir $@) && pdflatex${DEV} $(notdir $<)
cd $(dir $@) && pdflatex${DEV} $(notdir $<)
while ( grep -q '^LaTeX Warning: Label(s) may have changed' $(basename $<).log) \
do cd $(dir $@) && pdflatex${DEV} $(notdir $<); done
samples/sample-acmsmall-biblatex.pdf: samples/sample-acmsmall-biblatex.tex $(SAMPLEBIBLATEXFILES)
cd $(dir $@) && pdflatex${DEV} $(notdir $<)
- cd $(dir $@) && biber $(notdir $(basename $<))
cd $(dir $@) && pdflatex${DEV} $(notdir $<)
cd $(dir $@) && pdflatex${DEV} $(notdir $<)
while ( grep -q '^LaTeX Warning: Label(s) may have changed' $(basename $<).log) \
do cd $(dir $@) && pdflatex${DEV} $(notdir $<); done
samples/sample-sigconf-xelatex.pdf: samples/sample-xelatex.tex samples/$(PACKAGE).cls samples/ACM-Reference-Format.bst
cd $(dir $@) && xelatex${DEV} $(notdir $<)
- cd $(dir $@) && bibtex $(notdir $(basename $<))
cd $(dir $@) && xelatex${DEV} $(notdir $<)
cd $(dir $@) && xelatex${DEV} $(notdir $<)
while ( grep -q '^LaTeX Warning: Label(s) may have changed' $(basename $<).log) \
do cd $(dir $@) && xelatex${DEV} $(notdir $<); done
samples/sample-sigconf-lualatex.pdf: samples/sample-lualatex.tex samples/$(PACKAGE).cls samples/ACM-Reference-Format.bst
cd $(dir $@) && lualatex${DEV} $(notdir $<)
- cd $(dir $@) && bibtex $(notdir $(basename $<))
cd $(dir $@) && lualatex${DEV} $(notdir $<)
cd $(dir $@) && lualatex${DEV} $(notdir $<)
while ( grep -q '^LaTeX Warning: Label(s) may have changed' $(basename $<).log) \
do cd $(dir $@) && lualatex${DEV} $(notdir $<); done
samples/sample-acmcp.pdf: samples/acm-jdslogo.png
samples/sample-acmsmall-tagged.pdf: samples/sample-acmsmall-tagged.tex samples/$(PACKAGE)-tagged.cls samples/ACM-Reference-Format.bst
cd $(dir $@) && lualatex-dev $(notdir $<)
- cd $(dir $@) && bibtex $(notdir $(basename $<))
cd $(dir $@) && lualatex-dev $(notdir $<)
cd $(dir $@) && lualatex-dev $(notdir $<)
while ( grep -q '^LaTeX Warning: Label(s) may have changed' $(basename $<).log) \
do cd $(dir $@) && lualatex-dev $(notdir $<); done
.PRECIOUS: $(PACKAGE).cfg $(PACKAGE).cls $(PACKAGE)-tagged.cls
docclean:
$(RM) *.log *.aux \
*.cfg *.glo *.idx *.toc \
*.ilg *.ind *.out *.lof \
*.lot *.bbl *.blg *.gls *.cut *.hd \
*.dvi *.ps *.thm *.tgz *.zip *.rpi \
samples/$(PACKAGE).cls \
samples/$(PACKAGE)-tagged.cls \
samples/ACM-Reference-Format.bst \
samples/*.log samples/*.aux samples/*.out \
samples/*.bbl samples/*.blg samples/*.cut \
samples/acm-jdslogo.png \
samples/*.run.xml samples/*.bcf $(SAMPLEBIBLATEXFILES)
clean: docclean
$(RM) $(PACKAGE).cls $(PACKAGE)-tagged.cls \
samples/*.tex
distclean: clean
$(RM) *.pdf samples/sample-*.pdf
#
# Archive for the distribution. Includes typeset documentation
#
archive: all clean
COPYFILE_DISABLE=1 tar -C .. -czvf ../$(PACKAGE).tgz --exclude '*~' --exclude '*.tgz' --exclude '*.zip' --exclude CVS --exclude '.git*' $(PACKAGE); mv ../$(PACKAGE).tgz .
zip: all clean
zip -r $(PACKAGE).zip * -x '*~' -x '*.tgz' -x '*.zip' -x CVS -x 'CVS/*'
# distros
distros: all docclean
zip -r acm-distro.zip \
acmart.pdf acmguide.pdf samples *.cls ACM-Reference-Format.* \
--exclude samples/sample-acmengage*
zip -r acmengage-distro.zip samples/sample-acmengage* \
samples/*.bib \
acmart.pdf acmguide.pdf *.cls ACM-Reference-Format.*
acmcp.zip: ${ACMCPSAMPLES} acmart.cls
zip $@ $+
samples/sample-acmcp.tex: samples/samples.ins samples/samples.dtx
cd samples; pdflatex samples.ins; cd ..
samples/sample-acmcp-%.tex: samples/sample-acmcp.tex samples/acm-jdslogo.png
sed 's/acmArticleType{Review}/acmArticleType{$*}/' $< > $@
.PHONY: all ALLSAMPLES docclean clean distclean archive zip
|