#! /bin/sh
#
# $Id: run_benchmarks.sh,v 1.2 2000/06/29 20:20:46 yamauchi Exp $
#     Copyright (C) 2000 YAMAUCHI Hitoshi »³Æâ ÀÆ
# run all benchmarks in R^2mark : serial version
#
MAKE=make
# ACCURATE=run_accurate
ACCURATE=run_inaccurate

#
# starting confirmation
#
echo "This is the script which runs the all benchmarks for serial version."
echo "     Copyright (C) 2000 YAMAUCHI Hitoshi."
echo ""

if [ $# -eq 0 ]; then
    echo "This benchmark suite may take a long time to run. Is it OK? (yes/else)"
    read line
    if [ $line != "yes" ]; then
	echo "OK!, exit."
	exit 0;
    fi
else
    if [ $1 = "-h" -o $1 = "--help" ] ; then
	echo "Usage: run_benchmarks.sh"
	echo "	if an argument which is not -h or --help is indicated,"
	echo "	this script do not ask any questions."
	echo "		Copyright (C) 2000 YAMAUCHI Hitoshi"
	exit 1;
    fi
fi

#
# Run the C++ version
#
${MAKE} copyexec
for dir in C++ Java
do
    (cd ${dir}; ${MAKE} run;)
done
