forked from dacapo1142/nthu-thesis-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·39 lines (30 loc) · 747 Bytes
/
Copy pathMakefile
File metadata and controls
executable file
·39 lines (30 loc) · 747 Bytes
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
# Thanks to Tz-Huan Huang [http://www.csie.ntu.edu.tw/~tzhuan] for building this script.
MAIN=thesis
LATEX=xelatex
BIBTEX=bibtex
RM=rm -f
.SUFFIXES: .tex
ifdef PASSWORD
all: $(MAIN).pdf $(MAIN)-with-pass.pdf
else
all: $(MAIN).pdf
endif
ifdef WATERMARK
TEXFLAG="\def\withwatermark{1}\input{$(MAIN)}"
else
TEXFLAG=
endif
$(MAIN).pdf: *.tex nthuthesis.cls
$(LATEX) $(TEXFLAG) $(MAIN)
$(BIBTEX) $(MAIN)
$(LATEX) $(TEXFLAG) $(MAIN)
$(LATEX) $(TEXFLAG) $(MAIN)
ifdef PASSWORD
$(MAIN)-with-pass.pdf: $(MAIN).pdf
pdftk $^ output $@ owner_pw "$(PASSWORD)" allow printing allow ScreenReaders
endif
clean:
$(RM) *.log *.aux *.dvi *.lof *.lot *.toc *.bbl *.blg
clean-pdf:
$(RM) -f $(MAIN).pdf $(MAIN)-with-pass.pdf
clean-all: clean clean-pdf