Add ASSETSDIR variable to more conveniently address assets dir

Signed-off-by: David Runge <dave@sleepmap.de>
This commit is contained in:
David Runge 2023-12-12 14:59:18 +01:00
parent ace6499cbb
commit e9340c8bda
No known key found for this signature in database
GPG key ID: 90D4B9641E092971

View file

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