-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
82 lines (61 loc) · 1.7 KB
/
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#
# Edit the $FILES and $FIGURES variables before you run this makefile.
#
SHELL=/bin/sh
RM=/bin/rm
MV=/bin/mv
PREFIX=/usr/bin
LATEX=$(PREFIX)/pdflatex
BIBTEX=$(PREFIX)/bibtex
VIEWER=$(PREFIX)/acroread
DETEX=$(PREFIX)/detex
LINT=/usr/bin/chktex
LINT_OPTIONS=-q
# If you use vi replace this with ctags.
TAGS=$(PREFIX)/etags
.SUFFIXES: .tex .dvi .eps .ps .pdf
.PHONEY: all clean tags lint view neat wc
MAIN = thesis
FIGDIR = figures
CHAPDIR = chapters
# Add your own .eps figures to this list.
FIGURES = $(FIGDIR)/mandelbrot.png
# Add your own LaTeX files to this list.
FILES = thesis.tex thesis.sty \
abstract.tex ack.tex contents.tex tables.tex figures.tex \
$(CHAPDIR)/introduction.tex $(CHAPDIR)/example.tex $(CHAPDIR)/app-example.tex \
bib.tex refs/example1.bib refs/example2.bib
###
### DO NOT EDIT BELOW THIS LINE UNLESS YOU REALLY KNOW WHAT YOU'RE DOING!
###
all: $(MAIN).pdf
$(MAIN).pdf: $(MAIN).tex $(FIGURES) $(FILES)
$(LATEX) $*.tex;
$(BIBTEX) $*;
$(LATEX) $*.tex;
$(LATEX) $*.tex;
view: $(MAIN).pdf
- $(VIEWER) $<
lint:
@ $(LINT) $(LINT_OPTIONS) *.tex $(CHAPDIR)/*.tex 2>/dev/null
clean:
- $(RM) -f *.aux \
$(CHAPDIR)/*.aux \
$(MAIN).log $(MAIN).dvi $(MAIN).ps $(MAIN).blg $(MAIN).bbl \
$(MAIN).lot $(MAIN).lol $(MAIN).lof $(MAIN).toc $(MAIN).pdf
# Generate a TAGS file for Emacs etags.
# Replace etags with ctags if you use vi.
tags:
find . -name "*.tex" -print0 | xargs -0 $(TAGS)
# Suggested by Neil B.
neat:
$(RM) -f *.aux \
$(CHAPDIR)/*.aux \
$(MAIN).log $(MAIN).blg $(MAIN).bbl \
$(MAIN).lot $(MAIN).lof $(MAIN).toc
# Count words in thesis
wc:
-@ echo
-@ echo -n "UoW thesis, current word count: "
-@ $(DETEX) $(CHAPDIR)/*.tex | wc -w
-@ echo