File tree 1 file changed +42
-5
lines changed
1 file changed +42
-5
lines changed Original file line number Diff line number Diff line change 1
- all :
2
- pdflatex -shell-escape thesis
3
- bibtex thesis
4
- pdflatex -shell-escape thesis
5
- pdflatex -shell-escape thesis
1
+ # original link: https://drewsilcock.co.uk/using-make-and-latexmk
2
+
3
+ LATEX =pdflatex
4
+ LATEXOPT =--shell-escape
5
+ NONSTOP=--interaction =nonstopmode
6
+
7
+ LATEXMK =latexmk
8
+ LATEXMKOPT =-pdf
9
+
10
+ MAIN =thesis
11
+ SOURCES =$(MAIN ) .tex
12
+ # Makefile yourothertexfiles
13
+ FIGURES := $(shell find images/* -type f)
14
+
15
+ all : $(MAIN ) .pdf
16
+
17
+ .refresh :
18
+ touch .refresh
19
+
20
+ $(MAIN ) .pdf : $(MAIN ) .tex .refresh $(SOURCES ) $(FIGURES )
21
+ $(LATEXMK ) $(LATEXMKOPT ) \
22
+ -pdflatex ="$(LATEX ) $(LATEXOPT ) $(NONSTOP ) %O %S" $(MAIN )
23
+
24
+ force :
25
+ touch .refresh
26
+ rm $(MAIN ) .pdf
27
+ $(LATEXMK ) $(LATEXMKOPT ) \
28
+ -pdflatex ="$(LATEX ) $(LATEXOPT ) %O %S" $(MAIN )
29
+
30
+ clean :
31
+ $(LATEXMK ) -C $(MAIN )
32
+ rm -f $(MAIN ) .pdfsync
33
+ rm -rf * ~ * .tmp
34
+ rm -f * .bbl * .blg * .aux * .end * .fls * .log * .out * .fdb_latexmk
35
+
36
+ once :
37
+ $(LATEXMK ) $(LATEXMKOPT ) -pdflatex=" $( LATEX) $( LATEXOPT) %O %S" $(MAIN )
38
+
39
+ debug :
40
+ $(LATEX ) $(LATEXOPT ) $(MAIN )
41
+
42
+ .PHONY : clean force once all
You can’t perform that action at this time.
0 commit comments