-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (31 loc) · 889 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
31
32
33
34
35
36
37
38
39
40
41
42
# original link: https://drewsilcock.co.uk/using-make-and-latexmk
LATEX=pdflatex
LATEXOPT=--shell-escape
NONSTOP=--interaction=nonstopmode
LATEXMK=latexmk
LATEXMKOPT=-pdf
MAIN=thesis
SOURCES=$(MAIN).tex
#Makefile yourothertexfiles
FIGURES := $(shell find images/* -type f)
all: $(MAIN).pdf
.refresh:
touch .refresh
$(MAIN).pdf: $(MAIN).tex .refresh $(SOURCES) $(FIGURES)
$(LATEXMK) $(LATEXMKOPT) \
-pdflatex="$(LATEX) $(LATEXOPT) $(NONSTOP) %O %S" $(MAIN)
force:
touch .refresh
rm $(MAIN).pdf
$(LATEXMK) $(LATEXMKOPT) \
-pdflatex="$(LATEX) $(LATEXOPT) %O %S" $(MAIN)
clean:
$(LATEXMK) -C $(MAIN)
rm -f $(MAIN).pdfsync
rm -rf *~ *.tmp
rm -f *.bbl *.blg *.aux *.end *.fls *.log *.out *.fdb_latexmk
once:
$(LATEXMK) $(LATEXMKOPT) -pdflatex="$(LATEX) $(LATEXOPT) %O %S" $(MAIN)
debug:
$(LATEX) $(LATEXOPT) $(MAIN)
.PHONY: clean force once all