diff --git a/Makefile b/Makefile index cf33ca34..82ceb9d2 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,11 @@ SRC = report.tex TARGET = $(SRC:%.tex=%.pdf) .PHONY: build -build: $(TARGET) +build: dot $(TARGET) + +.PHONY: dot +dot: + $(MAKE) -C ./assets/dot/ # used for `nix-build` .PHONY: install @@ -16,7 +20,7 @@ install: build latexmk $< .PHONY: watch -watch: +watch: dot latexmk -pvc $(SRC) .PHONY: lint @@ -28,5 +32,9 @@ languagetool: languagetool <(cat $(SRC) | ./scripts/detex.py) .PHONY: clean -clean: +clean: clean_dot latexmk -C + +.PHONY: clean_dot +clean_dot: + $(MAKE) -C ./assets/dot/ clean diff --git a/assets/dot/Makefile b/assets/dot/Makefile new file mode 100644 index 00000000..2875a811 --- /dev/null +++ b/assets/dot/Makefile @@ -0,0 +1,13 @@ + +DOT = $(wildcard *.dot) +PDF = $(DOT:.dot=.pdf) + +.PHONY: build +build: $(PDF) + +%.pdf: %.dot + dot -Tpdf $< -o $@ + +.PHONY: clean +clean: + rm -f *.pdf