-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile
69 lines (55 loc) · 1.61 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
#------------------------------------------------------------------------------
# This is a makefile tailored to work with the latex documents for the
# Licentiate and PhD thesis (MechThesis).
#------------------------------------------------------------------------------
# Variables:
#
main = thesis
TEX = pdflatex
TEX_FLAGS =
BIB = bibtex
BIB_FLAGS =
# Dependencies:
#
SRCS = jfm.bst \
MechThesis.cls \
packages.tex \
commands.tex \
frontmatter.tex \
acknowledgements.tex \
overview.tex \
$(main).tex \
$(main).bib \
$(subst /,/paper.tex,$(wildcard paper*/))
AUXS = overview.aux \
$(main).aux \
$(main).toc \
$(main).pls \
$(main).psm \
$(subst /,/paper.aux,$(wildcard paper*/))
BBLS = overview.bbl \
$(subst /,/paper.bbl,$(wildcard paper*/))
# Rules:
#
default: all
all: $(main)
#
$(main): $(SRCS) $(AUXS) $(BBLS)
@echo building $(main) with $(TEX)
@$(TEX) $(TEX_FLAGS) -draftmode $(main) #> /dev/null
@sed -i -e 's/toPaper/Paper/g' thesis.out
@$(TEX) $(TEX_FLAGS) $(main) #> /dev/null
$(AUXS): $(SRCS)
@echo building $(main) with $(TEX) [for $@]
@$(TEX) $(TEX_FLAGS) -draftmode $(main) #> /dev/null
%.bbl: %.aux $(main).bib
@echo building $@ with $(BIB)
@$(BIB) $(BIB_FLAGS) $(basename $@) #> /dev/null
#
clean: clean_papers clean_thesis
clean_thesis:
@echo cleaning thesis
@rm -f *.ps *.dvi *.aux *.toc *.log *.out *.bbl *.blg *.pls *.psm *~ *.syntex.gz
clean_papers:
@echo cleaning papers
@rm -f paper*/*.aux paper*/*.bbl paper*/*.blg