#!/bin/sh
#	go - Invoke Make.sh verbose with logging and display

#  Henry Grebler    15 Dec 94  Record machine on which compile is done.
#  Henry Grebler     2 Dec 94  Use domainname to check if Optimation.
#  Henry Grebler     3 Sep 94  Add dali.


#       =======================================================================
#       Functions
#       =======================================================================

CheckOptimation () {

	if domainname | fgrep -i optimation > /dev/null ;then return; fi

	if [ "$OSEdir" = "" ]
	then
		if [ `uname -n` != optim1 -a `uname -n` != optimhp \
		  -a `uname -n` != opto   -a `uname -n` != sean    \
		  -a `uname -n` != dali                            ]
		then
			cat <<XXX
You are not running at Optimation and yet you have not defined the
environment variable OSEdir. This is unlikely to be a valid
combination. You may proceed despite this warning. [^c to abort.]

XXX
			echo 'Press RETURN to proceed \c'
	                read ans
		fi
	else
		echo 'OSEdir set to' $OSEdir
	fi
}

#       =======================================================================
#       Main line of script
#       =======================================================================

        if ${DEBUG-false} 
	then
		debug='nice sh -xv'
		set -xv
	else
		debug=nice
	fi
        PATH=/usr/5bin:$PATH

#	First, some sanity checks

	CheckOptimation

	{
	echo '--------------------------------------'
	date
	uname -a
	} >> make.log 2>&1

	$debug ./Make.sh -v $* 2>&1 | tee -a make.log
