From 6b5e8eb67ed718e5eba61f143c48e4a7cc0bbb19 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Thu, 17 Nov 2016 23:56:45 +0100 Subject: Formatting & makefile --- thesis/Makefile | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 thesis/Makefile (limited to 'thesis/Makefile') diff --git a/thesis/Makefile b/thesis/Makefile new file mode 100644 index 0000000..4e70993 --- /dev/null +++ b/thesis/Makefile @@ -0,0 +1,30 @@ +DOC:=thesis +LATEX?=pdflatex +LATEXFLAGS?=-file-line-error -halt-on-error -shell-escape +BIBER?=biber +TEXS:=$(wildcard *.tex) +STYS:=$(wildcard *.sty) + +.PHONY: all clean +.SECONDARY: $(DOC).fmt + +all: $(DOC).pdf + +%.fmt: preamble.tex $(STYS) + $(LATEX) $(LATEXFLAGS) -ini -jobname="$(basename $@)" "&$(LATEX) $<\dump" + +%.bcf: %.tex %.fmt $(TEXS) + $(LATEX) $(LATEXFLAGS) $< + +%.bbl: %.bcf + $(BIBER) $(basename $@) + +%.pdf: %.tex %.fmt $(TEXS) %.bbl + $(LATEX) $(LATEXFLAGS) $< | tee $(basename $<).mlog + grep -qF 'Please rerun LaTeX.' $(basename $<).mlog &&\ + $(LATEX) $(LATEXFLAGS) $< || true + $(RM) $(basename $<).mlog + +clean: + $(RM) $(addprefix $(DOC).,aux bbl bcf blg fmt log mlog run.xml out pdf toc)\ + $(DOC)-blx.bib -- cgit v1.2.3