From 209dc1084540e333bfcc748bb4102c126ce6e3b4 Mon Sep 17 00:00:00 2001 From: malc Date: Thu, 30 Aug 2007 23:08:04 +0400 Subject: [PATCH] TBS based build system --- build.sh | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) rewrite build.sh (91%) mode change 100755 => 100644 diff --git a/build.sh b/build.sh old mode 100755 new mode 100644 dissimilarity index 91% index 3174bac..caad078 --- a/build.sh +++ b/build.sh @@ -1,11 +1,26 @@ -#!/bin/sh - -set -e - -libs="unix.cma lablgl.cma lablglut.cma threads.cma" -flags="-custom -thread -I +lablGL" -test -z "$comp" && comp=ocamlc -$comp -o apc $flags $libs apc.ml ml_apc.c -cc -o hog -Wall -Werror -pedantic -W hog.c - -(cd mod && make) +#!/bin/sh + +#set -x +set -e + +h=$(readlink -f $(dirname $0)) +r=$(readlink -f $h/..) +t=$r/tbs +d=MD5 + +export OCAMLRUNPARAM=b + +if test $h = $PWD; then + mkdir -p build + cd build +fi + +if ! md5sum --status -c $d; then + cp $h/build.ml build1.ml + md5sum $h/build.ml $h/build.sh $t/tbs.cma >$d.tmp + ocamlc.opt -g -thread -I $t unix.cma threads.cma tbs.cma build1.ml -o b + mv $d.tmp $d +fi + +targets="apc" +./b -O src:$h $* $targets -- 2.11.4.GIT