about summary refs log tree commit diff stats
path: root/subx
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2017-10-11 01:38:29 -0700
committerKartik K. Agaram <vc@akkartik.com>2017-10-11 01:38:29 -0700
commita7c35665a5b092eab1f4be159bd3f1e43f038283 (patch)
tree00c6d2eef3ea4f921dc3deb536b4d40057a9a9e6 /subx
parent46438423d2012029b3be54103c34191eb62a8f62 (diff)
downloadmu-a7c35665a5b092eab1f4be159bd3f1e43f038283.tar.gz
4013
Diffstat (limited to 'subx')
-rwxr-xr-xsubx/build6
-rwxr-xr-xsubx/clean2
-rwxr-xr-xsubx/subx4
3 files changed, 8 insertions, 4 deletions
diff --git a/subx/build b/subx/build
index f5ea62c3..7d01f975 100755
--- a/subx/build
+++ b/subx/build
@@ -3,7 +3,7 @@
 # non-zero exit status only on error during building
 set -e  # stop immediately on error
 
-# [0-9]*.cc -> subx.cc -> subx
+# [0-9]*.cc -> subx.cc -> subx_bin
 # (layers)   |          |
 #          tangle      $CXX
 
@@ -99,8 +99,8 @@ older_than subx.cc $LAYERS ../enumerate/enumerate ../tangle/tangle && {
 grep -h "^[^[:space:]#].*) {$" subx.cc  |grep -v ":.*("  |sed 's/ {.*/;/'  |update function_list
 grep -h "^\s*void test_" subx.cc  |sed 's/^\s*void \(.*\)() {.*/\1,/'  |update test_list
 
-older_than subx subx.cc *_list && {
-  $CXX $CFLAGS subx.cc -o subx
+older_than subx_bin subx.cc *_list && {
+  $CXX $CFLAGS subx.cc -o subx_bin
 }
 
 exit 0
diff --git a/subx/clean b/subx/clean
index 39593221..5243f243 100755
--- a/subx/clean
+++ b/subx/clean
@@ -1,6 +1,6 @@
 #!/bin/sh
 
 set -v
-rm -rf subx.cc subx *_list subx.core *.dSYM
+rm -rf subx.cc subx_bin* *_list
 test $# -gt 0 && exit 0  # convenience: 'clean top-level' to leave subsidiary tools alone
 rm -rf ../enumerate/enumerate ../tangle/tangle ../tangle/*_list ../*/*.dSYM
diff --git a/subx/subx b/subx/subx
new file mode 100755
index 00000000..d059c83a
--- /dev/null
+++ b/subx/subx
@@ -0,0 +1,4 @@
+#!/bin/sh
+# Run SubX VM, first compiling if necessary.
+
+./build && ./subx_bin "$@"