#!/bin/sh
#
#  build.sh [compiler-path] -- build benchmark programs for timing

JR=${1-jrc}

rm -f build.out

## JR has no version number yet; also should print out Java version number
## $JR -v 2>&1 || exit 1

cat List | while read DIR SCALE DESCR
do
    case $DIR in
	"#"*|"")	continue;;
    esac
## JR has no optimization to turn on (at least not yet ;-)
    echo " (cd $DIR; $JR *.jr; javac jrGen/*.java; cd jrGen; jr_rmic)"
           (cd $DIR; $JR *.jr; javac jrGen/*.java; cd jrGen; jr_rmic)
done

echo $JR >build.out
## see comment above
## $JR -v >>build.out 2>&1
echo "$JR, javac, and java versions needed here" >>build.out 2>&1

exit 0
