Allow compiling dot resources

This commit is contained in:
Valentin Brandl 2021-11-11 16:43:53 +01:00
parent c7a4fa3f94
commit 704e6b85b3
2 changed files with 24 additions and 3 deletions

View File

@ -4,7 +4,11 @@ SRC = report.tex
TARGET = $(SRC:%.tex=%.pdf) TARGET = $(SRC:%.tex=%.pdf)
.PHONY: build .PHONY: build
build: $(TARGET) build: dot $(TARGET)
.PHONY: dot
dot:
$(MAKE) -C ./assets/dot/
# used for `nix-build` # used for `nix-build`
.PHONY: install .PHONY: install
@ -16,7 +20,7 @@ install: build
latexmk $< latexmk $<
.PHONY: watch .PHONY: watch
watch: watch: dot
latexmk -pvc $(SRC) latexmk -pvc $(SRC)
.PHONY: lint .PHONY: lint
@ -28,5 +32,9 @@ languagetool:
languagetool <(cat $(SRC) | ./scripts/detex.py) languagetool <(cat $(SRC) | ./scripts/detex.py)
.PHONY: clean .PHONY: clean
clean: clean: clean_dot
latexmk -C latexmk -C
.PHONY: clean_dot
clean_dot:
$(MAKE) -C ./assets/dot/ clean

13
assets/dot/Makefile Normal file
View File

@ -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