| 1 : |
anton
|
1.17
|
#! /bin/bash |
| 2 : |
anton
|
1.1
|
#tests that dist works |
| 3 : |
anton
|
1.5
|
#usage: testdist gforth-version.tar.gz |
| 4 : |
|
|
#gforth-version.tar.gz must be in the working directory |
| 5 : |
|
|
MACHINE=`hostname` |
| 6 : |
anton
|
1.20
|
test $MACHINE = mail2 -o $MACHINE = t1000 && confopt='ac_cv_prog_GNU_LIBTOOL=' |
| 7 : |
anton
|
1.5
|
GFORTH=`basename $1 .tar.gz` |
| 8 : |
anton
|
1.17
|
result=ok |
| 9 : |
anton
|
1.19
|
for CC in `(shopt -s nullglob; for i in /usr/sfw/bin /opt/csw/gcc4/bin \`echo $PATH|sed 's/:/ /g'\`; do for j in $i/gcc-*; do basename $j; done; done )|sort -u`; do |
| 10 : |
anton
|
1.17
|
last=broken |
| 11 : |
|
|
rm -rf $CC |
| 12 : |
|
|
mkdir $CC |
| 13 : |
|
|
cd $CC |
| 14 : |
|
|
PATHDIR=`pwd` |
| 15 : |
|
|
DIR=`cygpath -m \`pwd\` 2>/dev/null` || DIR=`pwd` |
| 16 : |
|
|
chmod -R +w $GFORTH |
| 17 : |
|
|
rm -rf $GFORTH |
| 18 : |
|
|
gunzip -cd ../$1 | tar xf - |
| 19 : |
anton
|
1.20
|
(if make --version|grep GNU >/dev/null |
| 20 : |
anton
|
1.17
|
then |
| 21 : |
|
|
echo building in build with $CC |
| 22 : |
anton
|
1.5
|
chmod -R a-w $GFORTH |
| 23 : |
anton
|
1.13
|
rm -rf build |
| 24 : |
anton
|
1.5
|
mkdir build |
| 25 : |
|
|
cd build |
| 26 : |
anton
|
1.20
|
../$GFORTH/configure --prefix=$DIR/install CC=$CC $confopt |
| 27 : |
anton
|
1.17
|
else |
| 28 : |
|
|
echo building in $GFORTH with $CC |
| 29 : |
anton
|
1.5
|
cd $GFORTH |
| 30 : |
anton
|
1.20
|
./configure --prefix=$DIR/install CC=$CC $confopt |
| 31 : |
anton
|
1.17
|
fi && |
| 32 : |
|
|
make && |
| 33 : |
anton
|
1.1
|
#gforth locals-test.fs |
| 34 : |
|
|
#gforth test-counted-loops.fs |
| 35 : |
anton
|
1.17
|
make install && |
| 36 : |
anton
|
1.11
|
#make all-bench && |
| 37 : |
anton
|
1.17
|
chmod -R +w ../$GFORTH/vmgen-ex ../$GFORTH/vmgen-ex2 && |
| 38 : |
|
|
cd ../$GFORTH/vmgen-ex && |
| 39 : |
|
|
PATH=$PATHDIR/install/bin:$PATH make check GCC="$CC -O" YACC=yacc LEX=lex && |
| 40 : |
|
|
cd ../vmgen-ex2 && |
| 41 : |
|
|
PATH=$DIR/install/bin:$PATH make check GCC="$CC -O" YACC=yacc LEX=lex && |
| 42 : |
|
|
cd .. && |
| 43 : |
|
|
cd .. && |
| 44 : |
|
|
install/bin/gforth test/tester.fs test/coretest.fs test/postpone.fs test/dbltest.fs -e bye >&/dev/null && |
| 45 : |
|
|
make -f build/Makefile onebench ENGINE_FAST=install/bin/gforth-fast && |
| 46 : |
anton
|
1.18
|
install/bin/gforth-fast --debug -e bye 2>&1 |grep 'Compiled with' ) && |
| 47 : |
anton
|
1.17
|
last=ok |
| 48 : |
anton
|
1.18
|
echo $CC $last |
| 49 : |
anton
|
1.17
|
chmod -R +w $GFORTH |
| 50 : |
|
|
cd .. |
| 51 : |
|
|
test $result = ok -a $last = ok || result=broken |
| 52 : |
|
|
done |
| 53 : |
|
|
echo test $result |