#ident	"@(#)mk:i386at/:mkX	1.7.1.13"
#ident	"$Header: $"
#
#	Build Graphics Source (X)
#
trap "exit 1" 1 2 3 15

# call is ./:mkX $ROOT $MACH $WORK $TOOLS $PFX

Root=$1
Mach=$2
Work=$3
Tools=$4
Pfx=$5

cd ${Root}/usr/src/${Work}/X11R5

ROOT=${Root}
MACH=${Mach}
WORK=${Work}
TOOLS=${Tools}
PFX=${Pfx}
export ROOT MACH WORK TOOLS PFX

${Tools}/usr/ccs/bin/${Pfx}env ${Pfx}make install

#
#	Build the graphic portion of the CCS debugger
#	Chances are most was already made, but without
#	graphics.  We don't care, we'll make all, anyhow.
#	NOTE: :mknatccs MUST be executed before this.
#

echo "Building graphical debugger"

cd ${Root}/usr/src/${Work}/cmd/debug
${Tools}/usr/ccs/bin/${Pfx}env ${Pfx}make -f debug.mk install


echo "Building graphical version of libserver.so"

cd ${Root}/usr/src/${Work}/lib/libserver
${Tools}/usr/ccs/bin/${Pfx}osenv ${Pfx}make -f libserver.mk install_gui


echo "Rebuilding prtsetup to use X version of libserver.so"

cd ${Root}/usr/src/${Work}/X11R5/netware/Printer_Setup
if [ -f prtsetup ]
then
	rm -f prtsetup
	${Tools}/usr/ccs/bin/${Pfx}env ${Pfx}make all install
fi
	


exit 0
