Update tbs
[apc.git] / tbs
blob4dd09e62cba2bdf949234e98755dad5706a85f3a
1 #!/bin/sh
3 #set -x
4 set -e
6 h=$(readlink -f $(dirname $0))
7 r=$(readlink -f $h/..)
8 t=$r/tbs
9 d=MD5
11 export OCAMLRUNPARAM=b
13 if test $h = $PWD; then
14 mkdir -p build
15 cd build
18 if ! md5sum --status -c $d; then
19 cp $h/build.ml build1.ml
20 md5sum $h/build.ml $h/build.sh $t/tbs.cma >$d.tmp
21 ocamlc.opt -g -thread -I $t unix.cma threads.cma tbs.cma build1.ml -o b
22 mv $d.tmp $d
25 gcc="gcc"
26 gxx="g++"
27 test $(hostname) = "linmac" && {
28 gcc="$HOME/x/dev/gcc-4.2.1/bin/gcc";
29 gxx="$HOME/x/dev/gcc-4.2.1/bin/g++"
32 targets="apc"
33 ./b -O src:$h -O gcc:$gcc -O g++:$gxx $* $targets