Makefile: Add 'watch' target.

This commit is contained in:
Florian Walch
2017-01-22 15:08:58 +01:00
parent 501fbe346c
commit b445be01a0

View File

@@ -1,14 +1,18 @@
FILE := main
OUT := build
.PHONY: pdf
pdf:
# Also see .latexmkrc
latexmk -outdir=$(OUT) -pdf $(FILE)
latexmk -interaction=nonstopmode -outdir=$(OUT) -pdf -halt-on-error $(FILE)
.PHONY: watch
watch:
latexmk -interaction=nonstopmode -outdir=$(OUT) -pdf -pvc -halt-on-error $(FILE)
.PHONY: clean
clean:
rm -rf $(filter-out $(OUT)/$(FILE).pdf, $(wildcard $(OUT)/*))
.PHONY: purge
purge:
rm -rf $(OUT)
.PHONY: latexmk clean purge