From 704e6b85b36af61fcfb82f1563f7f87306ac827f Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Thu, 11 Nov 2021 16:43:53 +0100 Subject: [PATCH] Allow compiling dot resources --- Makefile | 14 +++++++++++--- assets/dot/Makefile | 13 +++++++++++++ 2 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 assets/dot/Makefile 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