-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
32 lines (22 loc) · 814 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
BUILD_DIR := $(CURDIR)/build
PDFLATEX := TEXINPUTS=$(CURDIR):$(CURDIR)/tex:${BUILD_DIR}/dependencies/ucsb/sty: \
pdflatex -interaction=nonstopmode -halt-on-error -shell-escape -output-directory ${BUILD_DIR}
BIBTEX := BSTINPUTS=${BUILD_DIR}/dependencies/ucsb: BIBINPUTS=$(CURDIR)/tex: \
bibtex
JUNK := *.pdf *.aux *.log *.bbl *.blg *.toc *.out *.fdb_latexmk *.fls *.synctex.gz
.PHONY: all thesis patch clean
all: clean thesis
thesis: patch
mkdir -p ${BUILD_DIR}/final
mkdir -p ${BUILD_DIR}/chapters
${PDFLATEX} thesis
cd ${BUILD_DIR} && $(BIBTEX) thesis
${PDFLATEX} thesis
${PDFLATEX} thesis
patch: dependencies.patch
mkdir -p ${BUILD_DIR}
rm -rf ${BUILD_DIR}/dependencies
cp -ra dependencies ${BUILD_DIR}/dependencies
cd ${BUILD_DIR} && patch -p0 < ../dependencies.patch
clean:
rm -rf build