-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (31 loc) · 868 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
LATEX=pdflatex
LATEXOPT=--shell-escape #--output-directory=tmp
# NONSTOP=--interaction=nonstopmode
NONSTOP=--interaction=batchmode
LATEXMK=latexmk
LATEXMKOPT=-pdf -auxdir=tmp -outdir=tmp
CONTINUOUS=-pvc
MAIN=main
SOURCES=$(MAIN).tex Makefile
all: $(MAIN).pdf
.refresh:
touch .refresh
$(MAIN).pdf: $(MAIN).tex .refresh $(SOURCES)
$(LATEXMK) $(LATEXMKOPT) $(CONTINUOUS) \
-pdflatex="$(LATEX) $(LATEXOPT) $(NONSTOP) %O %S" $(MAIN)
force:
touch .refresh
rm $(MAIN).pdf
$(LATEXMK) $(LATEXMKOPT) $(CONTINUOUS) \
-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
rm -rf tmp/*
once:
$(LATEXMK) $(LATEXMKOPT) -pdflatex="$(LATEX) $(LATEXOPT) %O %S" $(MAIN)
debug:
$(LATEX) $(LATEXOPT) $(MAIN)
.PHONY: clean force once all