From 33f1ca780c19adb8be9b38d2249dcf6a86bdeb60 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Tue, 13 Aug 2019 10:08:53 -0700 Subject: . --- build | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'build') diff --git a/build b/build index ac1b5828..ed266455 100755 --- a/build +++ b/build @@ -136,6 +136,14 @@ then } done + # higher-level syntax + for phase in desugar + 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 From 1a7b15aa3d2873983bec5787e565695ed194fbae Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sun, 25 Aug 2019 00:58:20 -0700 Subject: skip building apps when running a single test Environment variables allow me to have non-local effects inside scripts. --- build | 2 +- run_one_test | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'build') diff --git a/build b/build index ed266455..ad0f6e8a 100755 --- a/build +++ b/build @@ -106,7 +106,7 @@ older_than subx_bin subx.cc *_list && { $CXX $CFLAGS subx.cc -o subx_bin } -if [ $# -eq 0 ] +if [ ! $ONLY_CPP ] then # Assumption: SubX programs don't need to be retranslated every time we diff --git a/run_one_test b/run_one_test index 41844d82..aff33c36 100755 --- a/run_one_test +++ b/run_one_test @@ -16,7 +16,7 @@ else fi set -e - # turn newlines into spaces -CFLAGS=$CFLAGS ./subx --debug translate $(echo $FILES) /tmp/run_one_test.subx -o /tmp/a.elf + # turn newlines into spaces +ONLY_CPP=1 CFLAGS=$CFLAGS ./subx --debug translate $(echo $FILES) /tmp/run_one_test.subx -o /tmp/a.elf -./subx --debug --trace run /tmp/a.elf +ONLY_CPP=1 ./subx --debug --trace run /tmp/a.elf -- cgit 1.4.1-2-gfad0