about summary refs log tree commit diff stats
path: root/archive/1.vm/build4
diff options
context:
space:
mode:
Diffstat (limited to 'archive/1.vm/build4')
-rwxr-xr-xarchive/1.vm/build453
1 files changed, 22 insertions, 31 deletions
diff --git a/archive/1.vm/build4 b/archive/1.vm/build4
index 08752831..dec46810 100755
--- a/archive/1.vm/build4
+++ b/archive/1.vm/build4
@@ -125,62 +125,53 @@ all_exist() {
 }
 
 TMP=`mktemp`
-mv_if_exists ../../enumerate/enumerate $TMP
+mv_if_exists ../../tools/enumerate $TMP
 (
-  wait_for_all ../../enumerate/enumerate.cc
-  older_than $TMP ../../enumerate/enumerate.cc && {
+  wait_for_all ../../tools/enumerate.cc
+  older_than $TMP ../../tools/enumerate.cc && {
     echo "building enumerate"
-    $CXX $CXXFLAGS ../../enumerate/enumerate.cc -o $TMP  ||  quit
+    $CXX $CXXFLAGS ../../tools/enumerate.cc -o $TMP  ||  quit
     echo "done building enumerate"
   }
-  mv $TMP ../../enumerate/enumerate
+  mv $TMP ../../tools/enumerate
 ) &
 
 TMP=`mktemp`
-mv_if_exists ../../tangle/tangle $TMP
+mv_if_exists ../../tools/tangle $TMP
 (
-  wait_for_all ../../tangle/*.cc
-  older_than $TMP ../../tangle/*.cc && {
+  wait_for_all ../../tools/tangle.cc
+  older_than $TMP ../../tools/tangle.cc && {
     echo "building tangle"
-    cd ../../tangle
+    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 $TMP  ||  quit
+      $CXX $CXXFLAGS tangle.cc -o $TMP  ||  quit
       $TMP test
-    cd ../archive/2.vm
+    cd ../archive/1.vm
     echo "done building tangle"
   }
-  mv $TMP ../../tangle/tangle
+  mv $TMP ../../tools/tangle
 ) &
 
-wait_for_all ../../enumerate/enumerate
+wait_for_all ../../tools/enumerate
 echo "enumerating layers"
-LAYERS=$(../../enumerate/enumerate --until $UNTIL_LAYER  |grep '\.cc$')
+LAYERS=$(../../tools/enumerate --until $UNTIL_LAYER  |grep '\.cc$')
 echo "done enumerating layers"
 
 TMP=`mktemp`
 mv_if_exists mu.cc $TMP
 (
-  wait_for_all $LAYERS ../../enumerate/enumerate ../../tangle/tangle
-  older_than $TMP $LAYERS ../../enumerate/enumerate ../../tangle/tangle && {
+  wait_for_all $LAYERS ../../tools/enumerate ../../tools/tangle
+  older_than $TMP $LAYERS ../../tools/enumerate ../../tools/tangle && {
     echo "running tangle"
     # no update here; rely on 'update' calls downstream
-    ../../tangle/tangle $LAYERS >$TMP  ||  quit
+    ../../tools/tangle $LAYERS >$TMP  ||  quit
     echo "done running tangle"
   }
   mv $TMP mu.cc
@@ -282,9 +273,9 @@ mv_if_exists mu_bin $TMP
 
 ## [0-9]*.mu -> core.mu
 
-wait_for_all ../../enumerate/enumerate
+wait_for_all ../../tools/enumerate
 echo "building 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
 echo "done building core.mu"