-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
30 lines (23 loc) · 842 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
28
29
30
# remove *.pdf, *.aux, *.idx files when an error occurs
# https://stackoverflow.com/questions/12343428/latex-reference-and-makefile/14600960#14600960
.DELETE_ON_ERROR:
.PHONY: clean
ifeq ($(shell test -f .git/hooks/post-commit; echo $$?), 1)
$(error You need to setup a git-hook first. Please read the README.markdown)
endif
all: threema-protocol-analysis.pdf
threema-protocol-analysis.pdf: gitHeadInfo.gin
gitHeadInfo.gin:
@if [ ! -f gitHeadInfo.gin ]; then echo 'Running git hook manually'; .git/hooks/post-commit; fi
clean:
rm -f *.pdf
rm -f *.log
rm -f *.toc
rm -f *.out
rm -f *.aux
rm -f *.eps
rm -f *.gin
%.pdf %.aux %.idx: %.tex
@pdflatex $<
@while grep 'Rerun to get ' $*.log; do pdflatex $< ; done
@if grep -q 'LaTeX Warning' $*.log; then echo "------ There were warnings -----"; grep 'LaTeX Warning' $*.log ; fi