]> git.lizzy.rs Git - nothing.git/blobdiff - levels/Makefile
(#587) Use scripts_of_svg.py to generate deps for Makefile
[nothing.git] / levels / Makefile
index 8890cf95d2557a1b6baec2cd08ae576ef0abc680..20ccd2a4fe4beb42c74cabfd79a73d79370d9d7d 100644 (file)
@@ -3,10 +3,19 @@ TXTS=$(SVGS:.svg=.txt)
 
 all: $(TXTS)
 
-%.txt: %.svg
-       xqilla ../scripts/svg2rects.xqe -i $< -o $@
+.SECONDEXPANSION:
 
-.PHONY: clean
+%.txt: %.svg $$(shell python3 ../devtools/scripts_of_svg.py $$*.svg)
+       python3 ../devtools/svg2rects.py $< $@
+
+.PHONY: clean watch
 
 clean:
        rm -rfv $(TXTS)
+
+watch:
+       @echo "Watching for changes to ${SVGS} ..."
+       @inotifywait -m -q -e modify,move_self ${SVGS} | \
+       while read -r filename event; do \
+               make; \
+       done