summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 51efd32e0f88a5e72ee3395db124f57e6b4a70c3 (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
CV_SRC := cv.tex
LT_SRC := coverletter.tex 

.PHONY: clean

all: cv.pdf coverletter.pdf

cv.pdf: $(CV_SRC)
	if which latexmk > /dev/null 2>&1; then \
		latexmk -pdf -f -pdflatex='pdflatex -shell-escape -halt-on-error -file-line-error' $<;\
	else \
		pdflatex -shell-escape -halt-on-error -file-line-error $< && \
		biber $(patsubst %.tex,%,$<) && \
		pdflatex -shell-escape -halt-on-error -file-line-error $< ;\
		pdflatex -shell-escape -halt-on-error -file-line-error $< ;\
	fi

coverletter.pdf: $(LT_SRC)
	if which latexmk > /dev/null 2>&1; then \
		latexmk -pdf -f -pdflatex='pdflatex -shell-escape -halt-on-error -file-line-error' $<;\
	else \
		pdflatex -shell-escape -halt-on-error -file-line-error $< && \
		biber $(patsubst %.tex,%,$<) && \
		pdflatex -shell-escape -halt-on-error -file-line-error $< ;\
		pdflatex -shell-escape -halt-on-error -file-line-error $< ;\
	fi

clean:
	$(RM) *.aux *.log *.out *.vrb *.pdf \
	*.bbl *.blg *.fdb_latexmk \
	*.toc *.fls *.lof *.lot