summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authoriainp5 <iain.pearce.ip@gmail.com>2024-10-27 08:02:11 +0000
committeriainp5 <iain.pearce.ip@gmail.com>2024-10-27 08:02:11 +0000
commit18bb386d69a86df0d20e685fabdee873c7d10979 (patch)
tree161289606af608d6e9ea2b402bb7d0e387f428c1 /Makefile
parent129fca876d1efb7b238e277fc82c6589d52ac016 (diff)
parentb8a0e71403e00cdce59f86c576cdfc68a76b7f10 (diff)
download1989-dawn-of-freedom-18bb386d69a86df0d20e685fabdee873c7d10979.tar.gz
Merge branch 'work-in-progress' of https://github.com/iainp5/1989-Dawn-of-Freedom into work-in-progress
Tor updates for constants
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile28
1 files changed, 20 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index daa5c21..fc78fed 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,21 @@
default: rules.js play.js
-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
- sed '/var LAYOUT /,$$d' < play.js > /tmp/play.js
- node tools/genlayout.js >> /tmp/play.js
- cp /tmp/play.js play.js
+
+rules.js: events.txt data.js
+ node tools/gencode.js > /tmp/events.inc
+ node tools/genconst.js > /tmp/const.inc
+ sed -i \
+ -e '/BEGIN CONST/,/END CONST/{//!d}' \
+ -e '/BEGIN CONST/r /tmp/const.inc' \
+ -e '/BEGIN EVENTS/,/END EVENTS/{//!d}' \
+ -e '/BEGIN EVENTS/r /tmp/events.inc' \
+ rules.js
+
+play.js: tools/layout.svg data.js
+ node tools/genlayout.js > /tmp/layout.inc
+ node tools/genconst.js > /tmp/const.inc
+ sed -i \
+ -e '/BEGIN CONST/,/END CONST/{//!d}' \
+ -e '/BEGIN CONST/r /tmp/const.inc' \
+ -e '/BEGIN LAYOUT/,/END LAYOUT/{//!d}' \
+ -e '/BEGIN LAYOUT/r /tmp/layout.inc' \
+ play.js