#! /.bin.SYSV/sh
# $Header: :mk,v 1.4 87/09/28 10:50:01 root Exp $
# @(#):mk	1.1

if [ "$ROOT" = "" -o "$ROOT" = "/" ] ; then
	echo "It's a bad idea to install on root"
	exit 1
fi

if [ ! -f $ROOT/usr/src/uts/is68k -a "$KERNEL" = "" ] ; then
	echo "KERNEL must be set to the path of the kernel sources"
	exit 1
fi

cd $ROOT/usr/src
echo "==== Starting on "`date`
#
# Build tree structure
#
sh :mktree

#
# Install header files
#
:mkhead
:mksyshead

#
# Build libraries
#
:mklib \*

#
# Build commands
#
:mkcmd \*
:mkmachid

#
# Build kernel
#
if [ -f :mkuts ] ; then
	:mkuts
fi

echo "==== Finished on "`date`
exit 0
