-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
27 lines (19 loc) · 686 Bytes
/
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
SRC=refcard.tex
all: $(SRC:.tex=.pdf) preview.png
%.pdf: %.tex | revision.tex
latexmk $<
revision.tex:
git config --global --add safe.directory /srv
echo "% Autogenerated, do not edit" > $@
echo "\\\\newcommand{\\\\revisiondate}{`git log -1 --format=\"%ad\" --date=short`}" >> $@
echo "\\\\newcommand{\\\\revision}{`git describe`}" >> $@
underlay.pdf: underlay.tex
latexmk $<
preview.pdf: $(SRC)
latexmk -jobname=$(basename $@) -pdflatex='xelatex %O "\def\tinted{tinted}\input{%S}"' $<
%.png: %.pdf
gs -dSAFER -r150 -sDEVICE=pngalpha -dLastPage=1 -o $@ $<
clean:
latexmk -C
$(RM) *.log *.fls *.aux *.fdb_latexmk *.pdf *.xdv revision.tex $(SRC:.tex=.pdf)
.PHONY: clean