ledger/tools/proof
2009-03-02 04:43:49 -04:00

55 lines
1 KiB
Bash
Executable file

#!/bin/sh
set -e
function build_and_test() {
if [ ! $1 = std ]; then
NAME=--$1
echo %%% Configuring $NAME %%%
if ! tools/myacprep $NAME; then
echo %%% FAILED to configure $NAME %%%
exit 1
fi
DIR=$HOME/Products/ledger-$1
else
NAME="$1"
DIR=$HOME/Products/ledger-$1
echo %%% Configuring $NAME %%%
if ! tools/myacprep --output $DIR; then
echo %%% FAILED to configure $NAME %%%
exit 1
fi
fi
echo %%% Cleaning $NAME %%%
if ! (cd $DIR && make clean); then
echo %%% FAILED to clean $NAME %%%
exit 1
fi
echo %%% Building $NAME %%%
if ! (cd $DIR && make); then
echo %%% FAILED to build $NAME %%%
exit 1
fi
echo %%% Testing $NAME %%%
if ! (cd $DIR && make fullcheck); then
echo %%% FAILED to test $NAME %%%
exit 1
fi
}
build_and_test opt
build_and_test gprof
build_and_test gcov
build_and_test std
echo %%% Building release-distcheck %%%
if ! (cd ~/Products/ledger-std && make release-distcheck); then
echo %%% FAILED to build release-distcheck %%%
exit 1
fi