summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-04-14 15:56:18 +0200
committerTor Andersson <tor@ccxvii.net>2023-05-03 18:48:16 +0200
commit2134b456150212808274fa0ec98c56d69c08d51a (patch)
treee1164c6e431b03d9367cf7ffae0eb6b88edafa7e /Makefile
parent77b270991aa4741870c8871c9bd3d5140c1cb969 (diff)
downloadandean-abyss-2134b456150212808274fa0ec98c56d69c08d51a.tar.gz
Add layout generation script to Makefile.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index d85f06f..8a09b8b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,12 @@
-default: data.js rules.js
+default: data.js rules.js play.js
data.js: tools/gendata.js
node tools/gendata.js
-default rules.js: events.txt
+rules.js: events.txt
sed '/const CODE /,$$d' < rules.js > /tmp/rules.js
node tools/gencode.js >> /tmp/rules.js
cp /tmp/rules.js rules.js
+play.js: tools/layout.svg tools/genlayout.py
+ sed -n -e '1,/BEGIN LAYOUT DATA/p' < play.js > /tmp/play.js
+ python3 tools/genlayout.py >> /tmp/play.js
+ sed -n -e '/END LAYOUT DATA/,$$p' < play.js >> /tmp/play.js
+ cp /tmp/play.js play.js