From e9340c8bda330fec652b3232369962a21817b18c Mon Sep 17 00:00:00 2001 From: David Runge Date: Tue, 12 Dec 2023 14:59:18 +0100 Subject: [PATCH] Add ASSETSDIR variable to more conveniently address assets dir Signed-off-by: David Runge --- book/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/book/Makefile b/book/Makefile index d4b9822..d1e55d2 100644 --- a/book/Makefile +++ b/book/Makefile @@ -16,6 +16,7 @@ LYCHEE ?= lychee PRINTF ?= printf RM ?= rm WATCHEXEC ?= watchexec +ASSETSDIR = assets SOURCEDIR = source BUILDDIR = build @@ -25,7 +26,7 @@ clean-all: clean # convert all SVG to plain SVGs without metadata and paths instead of text convert-svg: - for file in $(SOURCEDIR)/../assets/inkscape/*.svg $(SOURCEDIR)/../assets/drawio/*.svg; do if [[ ! -f $(SOURCEDIR)/plain_svg/$$(basename $$file) ]]; then $(INKSCAPE) --export-text-to-path --export-plain-svg --export-filename=$(SOURCEDIR)/plain_svg/$$(basename $$file) $$file; fi; done + for file in $(ASSETSDIR)/inkscape/*.svg $(ASSETSDIR)/drawio/*.svg; do if [[ ! -f $(SOURCEDIR)/plain_svg/$$(basename $$file) ]]; then $(INKSCAPE) --export-text-to-path --export-plain-svg --export-filename=$(SOURCEDIR)/plain_svg/$$(basename $$file) $$file; fi; done epub: convert-svg @$(SPHINXBUILD) -M epub "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)