-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (39 loc) · 1.39 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
##################################################################
# Variables
BIBDIR := Bibliography
BIBFILE := bibliography.bib
MAIN_FILE := sidarenka_thesis.pdf
PROPOSAL_FILE := proposal.pdf
##################################################################
# Special Targets
.DELETE_ON_ERROR:
.PHONY: all thesis proposal \
clean clean_thesis clean_proposal
##################################################################
# Main Target
all: thesis
clean: clean_thesis
-rm -f *.lot *.log *.aux *.out *.bbl *.lof *.blg
##################################################################
# Thesis
thesis: ${MAIN_FILE}
clean_thesis:
-rm -f ${MAIN_FILE}
##################################################################
# Main Thesis File
${MAIN_FILE}: %.pdf: %.tex ${BIBFILE} $(wildcard *.tex)
@set -e; \
pdflatex -halt-on-error -output-directory ${@D} $< && \
bibtex -min-crossrefs=100 $(basename $<) && \
pdflatex -halt-on-error -output-directory ${@D} $< && pdflatex -halt-on-error \
-output-directory ${@D} $<
##################################################################
# Proposal
proposal: ${PROPOSAL_FILE}
clean_proposal:
-rm -f ${PROPOSAL_FILE}
${PROPOSAL_FILE}: %.pdf: %.tex ${BIBFILE}
@set -e; \
pdflatex -halt-on-error -output-directory ${@D} $< && bibtex $(basename $<) && \
pdflatex -halt-on-error -output-directory ${@D} $< && pdflatex -halt-on-error \
-output-directory ${@D} $<