diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-04-17 01:33:51 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-04-17 01:33:51 -0700 |
commit | 11f7f7b8122f1c0c639ce8921278b1924bc51b20 (patch) | |
tree | 0816a8097e7f6fbd5d33607ad915c656b8f85b02 /archive/1.vm/build0 | |
parent | d6f9813650d1e09c23b5a9eebb22684175f73464 (diff) | |
download | mu-11f7f7b8122f1c0c639ce8921278b1924bc51b20.tar.gz |
6206
Diffstat (limited to 'archive/1.vm/build0')
-rwxr-xr-x | archive/1.vm/build0 | 24 |
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 ') {' # |