about summary refs log tree commit diff stats
path: root/archive/1.vm/build3
diff options
context:
space:
mode:
Diffstat (limited to 'archive/1.vm/build3')
-rwxr-xr-xarchive/1.vm/build336
1 files changed, 13 insertions, 23 deletions
diff --git a/archive/1.vm/build3 b/archive/1.vm/build3
index 7bacfb62..11f8afc8 100755
--- a/archive/1.vm/build3
+++ b/archive/1.vm/build3
@@ -106,38 +106,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 && {
@@ -185,7 +175,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