Makefile: Add 'watch' target.
This commit is contained in:
12
Makefile
12
Makefile
@@ -1,14 +1,18 @@
|
|||||||
FILE := main
|
FILE := main
|
||||||
OUT := build
|
OUT := build
|
||||||
|
|
||||||
|
.PHONY: pdf
|
||||||
pdf:
|
pdf:
|
||||||
# Also see .latexmkrc
|
latexmk -interaction=nonstopmode -outdir=$(OUT) -pdf -halt-on-error $(FILE)
|
||||||
latexmk -outdir=$(OUT) -pdf $(FILE)
|
|
||||||
|
|
||||||
|
.PHONY: watch
|
||||||
|
watch:
|
||||||
|
latexmk -interaction=nonstopmode -outdir=$(OUT) -pdf -pvc -halt-on-error $(FILE)
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(filter-out $(OUT)/$(FILE).pdf, $(wildcard $(OUT)/*))
|
rm -rf $(filter-out $(OUT)/$(FILE).pdf, $(wildcard $(OUT)/*))
|
||||||
|
|
||||||
|
.PHONY: purge
|
||||||
purge:
|
purge:
|
||||||
rm -rf $(OUT)
|
rm -rf $(OUT)
|
||||||
|
|
||||||
.PHONY: latexmk clean purge
|
|
||||||
|
|||||||
Reference in New Issue
Block a user