about summary refs log tree commit diff stats
path: root/subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-07-22 00:41:40 -0700
committerKartik Agaram <vc@akkartik.com>2019-07-22 00:41:40 -0700
commit490cc2021c71499dd3630f699a23843c3b7b532c (patch)
treebc929af66ba05a916c28169ed5716b2aceb70901 /subx
parente968d7733acbcedcf18209a8438eec83591be6ec (diff)
downloadmu-490cc2021c71499dd3630f699a23843c3b7b532c.tar.gz
5441
Now our debug cycle passes through `translate` or `ntranslate`. Make
sure we rebuild phases whenever we need to.
Diffstat (limited to 'subx')
-rwxr-xr-xsubx/build24
1 files changed, 24 insertions, 0 deletions
diff --git a/subx/build b/subx/build
index f29518ac..94698444 100755
--- a/subx/build
+++ b/subx/build
@@ -106,4 +106,28 @@ older_than subx_bin subx.cc *_list && {
   $CXX $CFLAGS subx.cc -o subx_bin
 }
 
+# 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
+
+# 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
+
 exit 0