This commit was generated by cvs2svn to track changes on a CVS vendor
[unix-history] / usr.sbin / sendmail / src / makesendmail
CommitLineData
042b8fbf
AM
1#!/bin/sh
2
3# Copyright (c) 1993 Eric P. Allman
4# Copyright (c) 1993 The Regents of the University of California.
5# All rights reserved.
6#
7# Redistribution and use in source and binary forms, with or without
8# modification, are permitted provided that the following conditions
9# are met:
10# 1. Redistributions of source code must retain the above copyright
11# notice, this list of conditions and the following disclaimer.
12# 2. Redistributions in binary form must reproduce the above copyright
13# notice, this list of conditions and the following disclaimer in the
14# documentation and/or other materials provided with the distribution.
15# 3. All advertising materials mentioning features or use of this software
16# must display the following acknowledgement:
17# This product includes software developed by the University of
18# California, Berkeley and its contributors.
19# 4. Neither the name of the University nor the names of its contributors
20# may be used to endorse or promote products derived from this software
21# without specific prior written permission.
22#
23# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33# SUCH DAMAGE.
34#
35# @(#)makesendmail 8.3 (Berkeley) 9/26/93
36#
37
38#
39# A quick-and-dirty script to compile sendmail in the presence of
40# multiple architectures and Makefiles.
41#
42
43# determine machine architecture
44arch=`uname -m`
45case $arch
46in
47 sun4*) arch=sun4;;
48esac
49
50# determine operating system type
51os=`uname -s`
52
53# determine operating system release
54rel=`uname -r`
55
56# now try to find a reasonable object directory
57if [ -r obj.$os.$arch.$rel ]; then
58 obj=obj.$os.$arch.$rel
59elif [ -r obj.$os.$rel ]; then
60 obj=obj.$os.$rel
61elif [ -r obj.$os.$arch ]; then
62 obj=obj.$os.$arch
63elif [ -r obj.$arch.$rel ]; then
64 obj=obj.$arch.$rel
65elif [ -r obj.$os ]; then
66 obj=obj.$os
67elif [ -r obj.$arch ]; then
68 obj=obj.$arch
69elif [ -r obj.$rel ]; then
70 obj=obj.$rel
71elif [ -r Makefile.$os ]; then
72 obj=obj.$os.$arch.$rel
73 echo "Creating $obj using Makefile.$os"
74 mkdir $obj
75 (cd $obj; ln -s ../*.[ch158] ../sendmail.hf .; ln -s ../Makefile.$os Makefile)
76else
77 echo "Warning: no recognized support for $arch.$os.$rel"
78 echo " ... winging it ..."
79 obj=.
80fi
81echo "Making in $obj"
82cd $obj
83exec make -f Makefile $*