about summary refs log tree commit diff stats
path: root/subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-07-22 01:39:14 -0700
committerKartik Agaram <vc@akkartik.com>2019-07-22 01:39:14 -0700
commit133e8bcf26b878190c5280df3bb89ece149158bf (patch)
tree6eeac1cf9bcb465da9df83fb6aabbcf16991e7c7 /subx
parent1421e4cf3e4cc445b4d3dcaac9ac8017de318ca3 (diff)
downloadmu-133e8bcf26b878190c5280df3bb89ece149158bf.tar.gz
5445
Fix CI.
Diffstat (limited to 'subx')
-rwxr-xr-xsubx/build51
1 files changed, 28 insertions, 23 deletions
diff --git a/subx/build b/subx/build
index 94698444..79f7707b 100755
--- a/subx/build
+++ b/subx/build
@@ -102,32 +102,37 @@ grep -h "^[^[:space:]#].*) {$" subx.cc  |grep -v ":.*("  |sed 's/ {.*/;/'  |upda
 grep -h "^\s*void test_" subx.cc  |sed 's/^\s*void \(.*\)() {.*/\1,/'  |update test_list
 grep -h "^\s*void test_" subx.cc  |sed 's/^\s*void \(.*\)() {.*/"\1",/'  |update test_name_list
 
-older_than subx_bin subx.cc *_list && {
-  $CXX $CFLAGS subx.cc -o subx_bin
-}
+if [ $# -eq 0 ]
+then
 
-# simple example programs
-for n in `seq 1 12`
-do
-  older_than examples/ex$n examples/ex$n.subx subx_bin && {
-    ./subx_bin translate examples/ex$n.subx -o examples/ex$n
+  older_than subx_bin subx.cc *_list && {
+    $CXX $CFLAGS subx.cc -o subx_bin
   }
-done
 
-# simple apps that use the standard library
-for app in factorial crenshaw2-1 crenshaw2-1b handle
-do
-  older_than apps/$app apps/$app.subx [0-9]*.subx && {
-    ./subx_bin translate [0-9]*.subx apps/$app.subx -o apps/$app
-  }
-done
+  # simple example programs
+  for n in `seq 1 12`
+  do
+    older_than examples/ex$n examples/ex$n.subx subx_bin && {
+      ./subx_bin translate examples/ex$n.subx -o examples/ex$n
+    }
+  done
 
-# self-hosting translator
-for phase in hex survey pack assort dquotes tests
-do
-  older_than apps/$phase apps/$phase.subx apps/subx-common.subx [0-9]*.subx && {
-    ./subx_bin translate [0-9]*.subx apps/subx-common.subx apps/$phase.subx -o apps/$phase
-  }
-done
+  # simple apps that use the standard library
+  for app in factorial crenshaw2-1 crenshaw2-1b handle
+  do
+    older_than apps/$app apps/$app.subx [0-9]*.subx && {
+      ./subx_bin translate [0-9]*.subx apps/$app.subx -o apps/$app
+    }
+  done
+
+  # self-hosting translator
+  for phase in hex survey pack assort dquotes tests
+  do
+    older_than apps/$phase apps/$phase.subx apps/subx-common.subx [0-9]*.subx && {
+      ./subx_bin translate [0-9]*.subx apps/subx-common.subx apps/$phase.subx -o apps/$phase
+    }
+  done
+
+fi
 
 exit 0