SHELL := bash .ONESHELL: .SHELLFLAGS := -eu -o pipefail -c .DELETE_ON_ERROR: MAKEFLAGS += --warn-undefined-variables MAKEFLAGS += --no-builtin-rules VERSION_STRING := $(shell git describe --always --tags --long) all: clean chapter.pdf # We need three runs for biblatex's defernumbers %.pdf: %.tex ../main.bib version.tex pdflatex -shell-escape $< biber $* pdflatex -shell-escape $< biber $* pdflatex -shell-escape $< .PHONY: preview preview: biber chapter || true pdflatex -shell-escape '\def\thesispreviewmode{}\input{chapter.tex}' version.tex: chapter.tex echo "${VERSION_STRING}" > $@ .PHONY: update-figures update-figures: @python figures/update_figures.py figures .PHONY: clean clean: rm -f **.aux **.bbl **.bcf **.log **.blg rm -f **.out **.run.xml **/texput.log