blob: 6d2c10c66f06443e6c0b7b334a0df8b8d583638c (
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
|
PACKAGE=amnestyreport
SAMPLES = \
sample.Rmd
PDF = $(PACKAGE).pdf ${SAMPLES:%.Rmd=%.pdf}
all: ${PDF}
%.pdf: %.dtx $(PACKAGE).cls
xelatex $<
- bibtex $*
xelatex $<
- makeindex -s gind.ist -o $*.ind $*.idx
- makeindex -s gglo.ist -o $*.gls $*.glo
xelatex $<
while ( grep -q '^LaTeX Warning: Label(s) may have changed' $*.log) \
do xelatex $<; done
%.pdf: %.Rmd $(PACKAGE).cls amnestytemplate.tex
Rscript -e "rmarkdown::render('$<', output_file='$@', output_format='pdf_document')"
%.cls: %.ins %.dtx
xelatex $<
%.pdf: %.tex $(PACKAGE).cls
xelatex $<
- bibtex $*
xelatex $<
while ( grep -q '^LaTeX Warning: Label(s) may have changed' $*.log) \
do xelatex $<; done
.PRECIOUS: $(PACKAGE).cfg $(PACKAGE).cls
clean:
$(RM) $(PACKAGE).cls *.log *.aux \
*.cfg *.glo *.idx *.toc \
*.ilg *.ind *.out *.lof \
*.lot *.bbl *.blg *.gls \
*.dvi *.ps *.thm *.tgz *.zip *.rpi \
*.hd sample-blx.bib sample.run.xml \
sample-tikzDictionary \
*-blx.bib
$(RM) -r sample_files
distclean: clean
$(RM) $(PDF) sample.tex
$(RM) -r sample_files
#
# Archive for the distribution. Includes typeset documentation
#
archive: all clean
COPYFILE_DISABLE=1 \
tar -C .. -czvf ../$(PACKAGE).tgz --exclude '*~' \
--exclude '*.tgz' --exclude '*.zip' --exclude ".git*" \
--exclude Amnesty_logo.png $(PACKAGE)
zip: all clean
make $(PACKAGE).cls
$(RM) $(PACKAGE).log
cd ..;\
zip -r $(PACKAGE).zip $(PACKAGE) -x "*.ins" -x "*.gitignore" \
-x "*-blx.bib" -x "*sample-tikzDictionary" -x "*sample_files*"
|