about summary refs log tree commit diff stats
path: root/archive/1.vm/build0
diff options
context:
space:
mode:
Diffstat (limited to 'archive/1.vm/build0')
-rwxr-xr-xarchive/1.vm/build024
1 files changed, 7 insertions, 17 deletions
diff --git a/archive/1.vm/build0 b/archive/1.vm/build0
index f45a72d2..03ac8180 100755
--- a/archive/1.vm/build0
+++ b/archive/1.vm/build0
@@ -4,27 +4,17 @@
 set -v
 set -e  # stop immediately on error
 
-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'
-  g++ -std=c++98 -g -O2 boot.cc -o tangle
+  g++ -std=c++98 -g -O3 tangle.cc -o tangle
   ./tangle test
-cd ../archive/2.vm
+cd ../archive/1.vm
 
 cd termbox
   gcc -g -O2 -c termbox.c
@@ -32,7 +22,7 @@ cd termbox
   ar rcs libtermbox.a *.o
 cd ..
 
-../../tangle/tangle [0-9]*.cc > mu.cc
+../../tools/tangle [0-9]*.cc > 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 ') {'
 #