diff options
Diffstat (limited to 'thesis/Makefile')
| -rw-r--r-- | thesis/Makefile | 30 | 
1 files changed, 30 insertions, 0 deletions
| 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 | 
