Debian Codegraph @

texmf-dist/source/latex/amnestyreport/Makefile

raw
1 PACKAGE=amnestyreport
2
3 SAMPLES = \
4 sample.Rmd
5
6 PDF = $(PACKAGE).pdf ${SAMPLES:%.Rmd=%.pdf}
7
8 all: ${PDF}
9
10
11
12 %.pdf: %.dtx $(PACKAGE).cls
13 xelatex $<
14 - bibtex $*
15 xelatex $<
16 - makeindex -s gind.ist -o $*.ind $*.idx
17 - makeindex -s gglo.ist -o $*.gls $*.glo
18 xelatex $<
19 while ( grep -q '^LaTeX Warning: Label(s) may have changed' $*.log) \
20 do xelatex $<; done
21
22 %.pdf: %.Rmd $(PACKAGE).cls amnestytemplate.tex
23 Rscript -e "rmarkdown::render('$<', output_file='$@', output_format='pdf_document')"
24
25 %.cls: %.ins %.dtx
26 xelatex $<
27
28 %.pdf: %.tex $(PACKAGE).cls
29 xelatex $<
30 - bibtex $*
31 xelatex $<
32 while ( grep -q '^LaTeX Warning: Label(s) may have changed' $*.log) \
33 do xelatex $<; done
34
35 .PRECIOUS: $(PACKAGE).cfg $(PACKAGE).cls
36
37
38 clean:
39 $(RM) $(PACKAGE).cls *.log *.aux \
40 *.cfg *.glo *.idx *.toc \
41 *.ilg *.ind *.out *.lof \
42 *.lot *.bbl *.blg *.gls \
43 *.dvi *.ps *.thm *.tgz *.zip *.rpi \
44 *.hd sample-blx.bib sample.run.xml \
45 sample-tikzDictionary \
46 *-blx.bib
47 $(RM) -r sample_files
48
49 distclean: clean
50 $(RM) $(PDF) sample.tex
51 $(RM) -r sample_files
52
53 #
54 # Archive for the distribution. Includes typeset documentation
55 #
56 archive: all clean
57 COPYFILE_DISABLE=1 \
58 tar -C .. -czvf ../$(PACKAGE).tgz --exclude '*~' \
59 --exclude '*.tgz' --exclude '*.zip' --exclude ".git*" \
60 --exclude Amnesty_logo.png $(PACKAGE)
61
62 zip: all clean
63 make $(PACKAGE).cls
64 $(RM) $(PACKAGE).log
65 cd ..;\
66 zip -r $(PACKAGE).zip $(PACKAGE) -x "*.ins" -x "*.gitignore" \
67 -x "*-blx.bib" -x "*sample-tikzDictionary" -x "*sample_files*"
68