#! /bin/sh
# Edit this to change this to the top directory where your X11R3 source is
# something like /usr/src/local/X.V11R3
TOPDIR=please/change/this/to/the/real/X/top/level/directory
if test -d xtroff ; then
	cd xtroff
fi
if test -f suntroff.c -a -f xtroff.manX ; then
	true
else
	echo 'Please cd to contrib/clients/xtroff before running this script'
	exit 1
fi
if test ! \( -d $TOPDIR -a -d $TOPDIR/util -a -d $TOPDIR/util/scripts \) ; then
	echo 'Please fix TOPDIR and run this script again'
	exit 1
elif test ! -x $TOPDIR/util/scripts/ximake.sh ; then
	echo Something wrong - $TOPDIR/util/scripts/ximake.sh isn\'t executable
	exit 1
else
	$TOPDIR/util/scripts/ximake.sh $TOPDIR
	cd XtStuff
	case $TOPDIR in
		/*);;
		*)TOPDIR=../$TOPDIR;;
	esac
	$TOPDIR/util/scripts/ximake.sh $TOPDIR
fi
echo Now run \'make depend\', \'make\', \'make xfonts\' and \'make install\'
