-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
47 lines (35 loc) · 676 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
43
44
45
46
47
PROJ = thesis
SRC = $(PROJ).tex
DEP = *.tex
OUT = .
DVI = $(OUT)/$(PROJ).dvi
PDF = $(OUT)/$(PROJ).pdf
CMDLATEX = pdflatex -output-directory=$(OUT)
CMDPDF = dvipdf
PDFVIEWER = evince
$(DVI) : $(DEP)
make tex
$(PDF) : $(DVI)
$(CMDPDF) $(DVI) $(PDF)
tex :
mkdir -p $(OUT)
$(CMDLATEX) $(SRC)
all :
make tex
make bib
make tex
make tex # Run LaTeX again to make sure all references are correct
bib :
bibtex $(OUT)/$(PROJ)
show : $(PDF)
$(PDFVIEWER) "$(PDF)"
clean :
rm -rf $(OUT)/*.aux
rm -rf $(OUT)/*.bbl
rm -rf $(OUT)/*.blg
rm -rf $(OUT)/*.dvi
rm -rf $(OUT)/*.lof
rm -rf $(OUT)/*.log
rm -rf $(OUT)/*.lot
rm -rf $(OUT)/*.out
rm -rf $(OUT)/*.toc