]> git.lizzy.rs Git - nothing.git/blob - levels/Makefile
20ccd2a4fe4beb42c74cabfd79a73d79370d9d7d
[nothing.git] / levels / Makefile
1 SVGS=$(wildcard ./*.svg)
2 TXTS=$(SVGS:.svg=.txt)
3
4 all: $(TXTS)
5
6 .SECONDEXPANSION:
7
8 %.txt: %.svg $$(shell python3 ../devtools/scripts_of_svg.py $$*.svg)
9         python3 ../devtools/svg2rects.py $< $@
10
11 .PHONY: clean watch
12
13 clean:
14         rm -rfv $(TXTS)
15
16 watch:
17         @echo "Watching for changes to ${SVGS} ..."
18         @inotifywait -m -q -e modify,move_self ${SVGS} | \
19         while read -r filename event; do \
20                 make; \
21         done