Makefile: Add 'watch' target.
This commit is contained in:
12
Makefile
12
Makefile
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user