# In csh, "source BUILD.athena"
# will build everything

# set up to compile with wcl
attach -q techinfodev -n wcl
source /mit/wcl/.attachrc

# create build directory
set newdir = /mit/techinfodev/build/`machtype`
mkdirhier $newdir
/usr/athena/etc/synctree -q -s /mit/techinfodev/src -d $newdir
pushd $newdir

# create Makefiles with Imake
if (-r /usr/athena/config/Imake.tmpl) then
	# 99% of the time it's this easy....
	xmkmf /usr/athena
else
	if (-r /source/support/config/cf/Imake.tmpl) then
		# Athena SGI March '95
		imake -I/source/support/config/cf -DTOPDIR=/source
	else
		attach -q source
		xmkmf /source
	endif
endif

# build ti library
make Makefiles
add watchmaker
make all |& tee all.log

# build xtechinfo
cd $newdir/xtechinfo
xmkmf
make all |& tee all.log
