#!/bin/sh
#
# Create and populate an arena directory for use in speed tests.

if test ! -d boehm_gc
then
	echo "make_arena should be executed at the top level of a workspace"
	exit 1
fi

if test -d arena
then
	echo "make_arena: arena directory already exists"
	exit 1
fi

mkdir arena

# copy all the compiler source files into the arena
cp compiler/*.m arena

# copy the interface files and possibly optimization files they will need
for dir in library mdbcomp compiler
do
	cp $dir/*.int* arena
	cp $dir/*.*opt arena > /dev/null 2>&1
done

exit 0
