
# Note:  use sed to strip blanks because not all systems have same version
# of diff.

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


# Note that we flush all the header crud GCT puts on.  What exactly
# goes there is rather in flux.
doit()
{
	echo "$INDENT" " $1"
	gct-init $GCTLIB
	gct -B$GCTLIB $1.c
	sed -e "1,/#line 1/d" -e "s/ //g" T$1.c > /tmp/T$1.N
	sed -e "1,/#line 1/d" -e "s/ //g" $1.ref > /tmp/$1.N
	if diff /tmp/T$1.N /tmp/$1.N
	then
		rm /tmp/T$1.N /tmp/$1.N
	fi
}

make clean
gct-init $GCTLIB

doit $1
exit 0
