aboutsummaryrefslogtreecommitdiff
path: root/pdf/Makefile
blob: 585b1b3f7beeee0f2ca44f7ce6886db76616e966 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FILES = doc
PDF = $(FILES:%=%.pdf)

export max_print_line = 100000
PDFLATEX_FLAGS = -shell-escape -file-line-error -interaction=nonstopmode -halt-on-error

all pdf: $(PDF)

.SECONDEXPANSION:
%.pdf: %.tex $$(wildcard $$*.bib)  assets/*.tex
	latexmk $(LATEXMK_FLAGS) $(PDFLATEX_FLAGS) -pdf -f $< \
	| grep --color=always -o '.*:[0-9]*:.*\|warning.*' || true

mostlyclean:
	latexmk $(LATEXMK_FLAGS) -c
	rm -f $(FILES:%=%.synctex.*) $(FILES:%=%.bbl)
	rm -f assets/*.aux

clean: mostlyclean
	rm -f $(PDF)

.PHONY: all pdf mostlyclean clean