about summary refs log tree commit diff stats
path: root/archive/1.vm/build1
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/build1
parentd6f9813650d1e09c23b5a9eebb22684175f73464 (diff)
downloadmu-11f7f7b8122f1c0c639ce8921278b1924bc51b20.tar.gz
6206
Diffstat (limited to 'archive/1.vm/build1')
-rwxr-xr-xarchive/1.vm/build130
1 files changed, 10 insertions, 20 deletions
diff --git a/archive/1.vm/build1 b/archive/1.vm/build1
index 66bdb003..6d427c7a 100755
--- a/archive/1.vm/build1
+++ b/archive/1.vm/build1
@@ -21,29 +21,19 @@ export CXXFLAGS="-std=c++98 $CFLAGS"  # CI has an ancient version; don't expect
 # (layers)   |        |
 #          tangle   $CXX
 
-$CXX $CFLAGS ../../enumerate/enumerate.cc -o ../../enumerate/enumerate
+$CXX $CFLAGS ../../tools/enumerate.cc -o ../../tools/enumerate
 
-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
-  }  > type_list
   # list of function declarations, so I can define them in any order
-  grep -h "^[^ #].*) {" [0-9]*.cc  |sed 's/ {.*/;/'  > function_list
-  # list of code files to compile
-  ls [0-9]*.cc  |grep -v "\.test\.cc$"  |sed 's/.*/#include "&"/'  > file_list
-  # list of test files to compile
-  ls [0-9]*.test.cc  |sed 's/.*/#include "&"/'  > test_file_list
+  grep -h "^[^ #].*) {" tangle.cc  |sed 's/ {.*/;/'  > tangle.function_list
   # list of tests to run
-  grep -h "^[[:space:]]*void test_" [0-9]*.cc  |sed 's/^\s*void \(.*\)() {$/\1,/'  > test_list
-  grep -h "^\s*void test_" [0-9]*.cc  |sed 's/^\s*void \(.*\)() {.*/"\1",/'  > test_name_list
+  grep -h "^[[:space:]]*void test_" tangle.cc  |sed 's/^\s*void \(.*\)() {$/\1,/'  > tangle.test_list
+  grep -h "^\s*void test_" tangle.cc  |sed 's/^\s*void \(.*\)() {.*/"\1",/'  > tangle.test_name_list
   # }
-  # Now that we have all the _lists, compile 'tangle'
-  $CXX $CXXFLAGS boot.cc -o tangle
+  $CXX $CXXFLAGS tangle.cc -o tangle
   ./tangle test
-cd ../archive/2.vm
+cd ../archive/1.vm
 
 cd termbox
   $CC $CFLAGS -c termbox.c
@@ -51,8 +41,8 @@ cd termbox
   ar rcs libtermbox.a *.o
 cd ..
 
-LAYERS=$(../../enumerate/enumerate --until $UNTIL_LAYER  |grep '\.cc$')
-../../tangle/tangle $LAYERS  > mu.cc
+LAYERS=$(../../tools/enumerate --until $UNTIL_LAYER  |grep '\.cc$')
+../../tools/tangle $LAYERS  > mu.cc
 # auto-generate function declarations, so I can define them in any order
 # functions start out unindented, have all args on the same line, and end in ') {'
 #
@@ -65,5 +55,5 @@ $CXX $CXXFLAGS mu.cc termbox/libtermbox.a -o mu_bin
 
 ## [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  > core.mu