20 lines
503 B
Makefile
20 lines
503 B
Makefile
SOURCE_MODULES := $(shell find src/Project -name "*.agda" -exec basename {} \;)
|
|
GENERATED_TEX := $(patsubst %.agda, gentex/Project/%.tex, $(SOURCE_MODULES))
|
|
|
|
main.pdf: main.tex agda.sty
|
|
tectonic --keep-logs main.tex
|
|
|
|
gentex/Project/%.tex: src/Project/%.agda
|
|
agda --latex-dir=gentex --latex $<
|
|
|
|
agda.sty: $(GENERATED_TEX)
|
|
rm -f agda.sty
|
|
cp gentex/agda.sty agda.sty
|
|
|
|
watch:
|
|
watchexec -e agda,tex -- make --jobs=4 main.pdf
|
|
|
|
present: main.pdf
|
|
zathura --mode fullscreen main.pdf
|
|
|
|
.PHONY: watch present
|