From 133e8bcf26b878190c5280df3bb89ece149158bf Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Mon, 22 Jul 2019 01:39:14 -0700 Subject: 5445 Fix CI. --- subx/build | 51 ++++++++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 23 deletions(-) (limited to 'subx') 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 -- cgit 1.4.1-2-gfad0