29 lines
557 B
Makefile
29 lines
557 B
Makefile
|
|
SHELL := bash
|
|
.ONESHELL:
|
|
.SHELLFLAGS := -eu -o pipefail -c
|
|
.DELETE_ON_ERROR:
|
|
MAKEFLAGS += --warn-undefined-variables
|
|
MAKEFLAGS += --no-builtin-rules
|
|
|
|
VERSION_STRING := $(shell git describe --tags --long --dirty)
|
|
|
|
all: chapter.pdf
|
|
|
|
%.pdf: %.tex ../main.bib version.tex
|
|
pdflatex -shell-escape $<
|
|
biber $*
|
|
pdflatex -shell-escape $<
|
|
|
|
.PHONY: preview
|
|
preview:
|
|
pdflatex -shell-escape chapter.tex
|
|
|
|
version.tex: chapter.tex
|
|
echo "${VERSION_STRING}" > $@
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
rm -f **.aux **.bbl **.bcf **.log **.blg
|
|
rm -f **.out **.run.xml **/texput.log
|
|
|