-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (25 loc) · 800 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
TEXC=pdflatex
CFLAGS=-interaction=nonstopmode -halt-on-error -file-line-error
BIBC=bibtex
PAPER=thesis
BIBLIO=$(PAPER)
LATEST_COMMIT=$(shell git log --format="%h" -n 1)
all: $(PAPER).pdf
draft: $(PAPER).pdf-draft
$(PAPER).aux: $(PAPER).tex
$(TEXC) $(CFLAGS) $(PAPER)
$(BIBLIO).bbl: $(PAPER).aux $(BIBLIO).bib
$(BIBC) $(PAPER)
$(PAPER).pdf: $(PAPER).aux $(BIBLIO).bbl
$(TEXC) $(CFLAGS) $(PAPER)
$(TEXC) $(CFLAGS) $(PAPER)
$(PAPER).pdf-draft: CFLAGS:=$(CFLAGS) "\def\DRAFT{$(LATEST_COMMIT)}\input{$(PAPER)}"
$(PAPER).pdf-draft: all
mv $(PAPER).pdf $(PAPER)-draft.pdf
tar cf thesis-draft.tar.gz $(PAPER)-draft.pdf
clean:
rm -f *.log *.aux *.toc *.out
rm -f *.bbl *.blg *.fls *.xml
rm -f *.fdb_latexmk *.vtc *.cut
rm -f $(PAPER).pdf camera-ready.pdf submission.pdf
rm -f *.o *.cmx *.cmo