# Copyright (c) 1993 Eric P. Allman
# Copyright (c) 1993 The Regents of the University of California.
# %sccs.include.redist.sh%
# @(#)makesendmail 8.4 (Berkeley) %G%
# A quick-and-dirty script to compile sendmail in the presence of
# multiple architectures and Makefiles.
# determine machine architecture
9000/*) arch
=`echo $arch | sed -e 's/9000.//' -e 's/..$/xx/'`;;
# determine operating system type
# determine operating system release
rbase
=`echo $rel | sed 's/\..*//''`
# now try to find a reasonable object directory
if [ -r obj.
$os.
$arch.
$rel ]; then
elif [ -r obj.
$os.
$arch.
$rbase.x
]; then
obj
=obj.
$os.
$arch.
$rbase.x
elif [ -r obj.
$os.
$rel ]; then
elif [ -r obj.
$os.
$rbase.x
]; then
elif [ -r obj.
$os.
$arch ]; then
elif [ -r obj.
$arch.
$rel ]; then
elif [ -r obj.
$arch.
$rbase.x
]; then
elif [ -r obj.
$os ]; then
elif [ -r obj.
$arch ]; then
elif [ -r obj.
$rel ]; then
# no existing obj directory -- try to create one if Makefile found
if [ -r Makefile.
$os.
$arch.
$rel ]; then
makefile
=Makefile.
$os.
$arch.
$rel
elif [ -r Makefile.
$os.
$arch.
$rbase.x
]; then
makefile
=Makefile.
$os.
$arch.
$rbase.x
elif [ -r Makefile.
$os.
$rel ]; then
makefile
=Makefile.
$os.
$rel
elif [ -r Makefile.
$os.
$rbase.x
]; then
makefile
=Makefile.
$os.
$base.x
elif [ -r Makefile.
$os.
$arch ]; then
makefile
=Makefile.
$os.
$arch
elif [ -r Makefile.
$arch.
$rel ]; then
makefile
=Makefile.
$arch.
$rel
elif [ -r Makefile.
$arch.
$rbase.x
]; then
makefile
=Makefile.
$arch.
$rbase.x
elif [ -r Makefile.
$os ]; then
elif [ -r Makefile.
$arch ]; then
elif [ -r Makefile.
$rel ]; then
echo "Cannot determine how to support $arch.$os.$rel"
echo "Creating $obj using $makefile"
(cd $obj; ln -s ..
/*.
[ch158
] ..
/sendmail.hf .
; ln -s ..
/$makefile Makefile
)