fix other mandelbrot variants
[mu.git] / archive / 1.vm / build0
blobfcee74d3b9f010cd47ffdeca37326e9d5e7fb674
1 #!/bin/sh
2 # Compile mu from scratch.
4 set -v
5 set -e # stop immediately on error
7 cd ../../linux/bootstrap/tools
8 # auto-generate various lists (ending in '_list' by convention) {
9 # list of function declarations, so I can define them in any order
10 grep -h "^[^ #].*) {" tangle.cc |sed 's/ {.*/;/' > tangle.function_list
11 # list of tests to run
12 grep -h "^[[:space:]]*void test_" tangle.cc |sed 's/^\s*void \(.*\)() {$/\1,/' > tangle.test_list
13 grep -h "^\s*void test_" tangle.cc |sed 's/^\s*void \(.*\)() {.*/"\1",/' > tangle.test_name_list
14 # }
15 g++ -std=c++98 -g -O3 tangle.cc -o tangle
16 ./tangle test
17 cd ../../../archive/1.vm
19 cd termbox
20 gcc -g -O2 -c termbox.c
21 gcc -g -O2 -c utf8.c
22 ar rcs libtermbox.a *.o
23 cd ..
25 ../../linux/bootstrap/tools/tangle [0-9]*.cc > mu.cc
26 # auto-generate function declarations, so I can define them in any order
27 # functions start out unindented, have all args on the same line, and end in ') {'
29 # \/ ignore struct/class methods
30 grep -h "^[^[:space:]#].*) {$" mu.cc |grep -v ":.*(" |sed 's/ {.*/;/' > function_list
31 # auto-generate list of tests to run
32 grep -h "^\s*void test_" mu.cc |sed 's/^\s*void \(.*\)() {.*/\1,/' > test_list
33 grep -h "^\s*void test_" mu.cc |sed 's/^\s*void \(.*\)() {.*/"\1",/' > test_name_list
34 g++ -std=c++98 -g -O2 mu.cc termbox/libtermbox.a -o mu_bin
36 cat [0-9]*.mu > core.mu