#!/bin/sh
# usage: test-distrib machine [ gcl.tgz-file ]
# xbin/test-distrib 386-linux /d11/wfs/gcl.tgz >&
# xbin/test-distrib solaris /dilbert1/wfs/gcl.tgz >&
MACHINE=$1

if [ -d /d11/wfs/test-lisp ]  ; then DIR=/d11/wfs ;
else if [ -d ${HOME}/test-lisp ] ; then DIR=${HOME};
else echo cant find test-lisp ; exit 1;
fi; fi
TESTDIR=${DIR}/test-lisp
if [ $# -eq 2 ] ;then FILE=$2 ;
else 
FILE=${DIR}/gcl.tgz
NAME="gcl-`cat majvers`.`cat minvers`"
xbin/distribute ${FILE}
fi
rm -rf ${DIR}/gcl-test
mkdir ${DIR}/gcl-test
cd ${DIR}/gcl-test
gzip -dc ${FILE} | tar xvf -
NAME="gcl-`cat gcl-*/majvers`.`cat gcl-*/minvers`"
cd ${NAME}
add-defs ${MACHINE}
make
cd ${TESTDIR}
make LISP=${DIR}/gcl-test/${NAME}/unixport/saved_gcl
