#!/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 the source files that make the best benchmark subjects into tha arena
for module in make_hlds typecheck llds_out modules code_info polymorphism
do
	cp compiler/$module.m arena
done

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

exit 0
