if [ "x$GCTLIB" = "x" ]
then
  GCTLIB=`pwd`/../..
  PATH=.:`pwd`/../..:$PATH
fi

say()
{
	echo "$INDENT" " $1"
}

#  This compiles files but throws away stupid copyright messages that 
#  some C compilers spit to stderr.  
hush_cc()
{
  cc $* 2> /tmp/Gerr$$
  grep -v 'Copyright (C)' /tmp/Gerr$$ 1>&2
  rm /tmp/Gerr$$
}


make clean


say mapfile
echo "NOTE:  On some machines, expect assembler warnings again."
hush_cc -c -g -I$GCTLIB -I$GCTLIB/config mapfile-test.c 
hush_cc -c -g -DTEST -I$GCTLIB -I$GCTLIB/config $GCTLIB/gct-mapfil.c 
hush_cc -c -g -DTEST -I$GCTLIB $GCTLIB/gct-util.c 
hush_cc mapfile-test.o gct-mapfil.o gct-util.o
a.out
diff Mapfile.log Mapfile.ref


exit 0
