about summary refs log tree commit diff stats
path: root/subx
diff options
context:
space:
mode:
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 "$@"