about summary refs log tree commit diff stats
path: root/archive/1.vm/build2
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-04-17 01:33:51 -0700
committerKartik Agaram <vc@akkartik.com>2020-04-17 01:33:51 -0700
commit11f7f7b8122f1c0c639ce8921278b1924bc51b20 (patch)
tree0816a8097e7f6fbd5d33607ad915c656b8f85b02 /archive/1.vm/build2
parentd6f9813650d1e09c23b5a9eebb22684175f73464 (diff)
downloadmu-11f7f7b8122f1c0c639ce8921278b1924bc51b20.tar.gz
6206
Diffstat (limited to 'archive/1.vm/build2')
-rwxr-xr-xarchive/1.vm/build236
1 files changed, 13 insertions, 23 deletions
diff --git a/archive/1.vm/build2 b/archive/1.vm/build2
index c6d5ef76..e0383fa5 100755
--- a/archive/1.vm/build2
+++ b/archive/1.vm/build2
@@ -81,38 +81,28 @@ noisy_cd() {
   echo "-- `pwd`" >&2
 }
 
-older_than ../../enumerate/enumerate ../../enumerate/enumerate.cc && {
-  $CXX $CXXFLAGS ../../enumerate/enumerate.cc -o ../../enumerate/enumerate
+older_than ../../tools/enumerate ../../tools/enumerate.cc && {
+  $CXX $CXXFLAGS ../../tools/enumerate.cc -o ../../tools/enumerate
 }
 
-older_than ../../tangle/tangle tangle/*.cc && {
-  noisy_cd ../../tangle
+older_than ../../tools/tangle ../../tools/tangle.cc && {
+  noisy_cd ../../tools
     # auto-generate various lists (ending in '_list' by convention) {
-    # list of types
-    {
-      grep -h "^struct .* {" [0-9]*.cc  |sed 's/\(struct *[^ ]*\).*/\1;/'
-      grep -h "^typedef " [0-9]*.cc
-    }  |update type_list
     # list of function declarations, so I can define them in any order
-    grep -h "^[^ #].*) {" [0-9]*.cc  |sed 's/ {.*/;/'  |update function_list
-    # list of code files to compile
-    ls [0-9]*.cc  |grep -v "\.test\.cc$"  |sed 's/.*/#include "&"/'  |update file_list
-    # list of test files to compile
-    ls [0-9]*.test.cc  |sed 's/.*/#include "&"/'  |update test_file_list
+    grep -h "^[^ #].*) {" tangle.cc  |sed 's/ {.*/;/'  |update tangle.function_list
     # list of tests to run
-    grep -h "^[[:space:]]*void test_" [0-9]*.cc  |sed 's/^\s*void \(.*\)() {$/\1,/'  |update test_list
-    grep -h "^\s*void test_" [0-9]*.cc  |sed 's/^\s*void \(.*\)() {.*/"\1",/'  |update test_name_list
+    grep -h "^[[:space:]]*void test_" tangle.cc  |sed 's/^\s*void \(.*\)() {$/\1,/'  |update tangle.test_list
+    grep -h "^\s*void test_" tangle.cc  |sed 's/^\s*void \(.*\)() {.*/"\1",/'  |update tangle.test_name_list
     # }
-    # Now that we have all the _lists, compile 'tangle'
-    $CXX $CXXFLAGS boot.cc -o tangle
+    $CXX $CFLAGS tangle.cc -o tangle
     ./tangle test
-  noisy_cd ../archive/2.vm  # no effect; just to show us returning to the parent directory
+  noisy_cd ../archive/1.vm  # no effect; just to show us returning to the parent directory
 }
 
-LAYERS=$(../../enumerate/enumerate --until $UNTIL_LAYER  |grep '\.cc$')
-older_than mu.cc $LAYERS ../../enumerate/enumerate ../../tangle/tangle && {
+LAYERS=$(../../tools/enumerate --until $UNTIL_LAYER  |grep '\.cc$')
+older_than mu.cc $LAYERS ../../tools/enumerate ../../tools/tangle && {
   # no update here; rely on 'update' calls downstream
-  ../../tangle/tangle $LAYERS  > mu.cc
+  ../../tools/tangle $LAYERS  > mu.cc
 }
 
 older_than cleave/cleave cleave/cleave.cc && {
@@ -160,7 +150,7 @@ older_than mu_bin mu.cc *_list cleave/cleave termbox/* && {
 
 ## [0-9]*.mu -> core.mu
 
-MU_LAYERS=$(../../enumerate/enumerate --until $UNTIL_LAYER  |grep '\.mu$') || exit 0  # ok if no .mu files
+MU_LAYERS=$(../../tools/enumerate --until $UNTIL_LAYER  |grep '\.mu$') || exit 0  # ok if no .mu files
 cat $MU_LAYERS  |update core.mu
 
 exit 0