3 # Copyright (c) 1998-2002, 2008 Sendmail, Inc. and its suppliers.
5 # Copyright (c) 1993, 1996-1997 Eric P. Allman. All rights reserved.
7 # The Regents of the University of California. All rights reserved.
9 # By using this file, you agree to the terms and conditions set
10 # forth in the LICENSE file which can be found at the top level of
11 # the sendmail distribution.
14 # $Id: Build,v 8.187 2008/01/11 18:40:17 ca Exp $
18 # A quick-and-dirty script to compile sendmail and related programs
19 # in the presence of multiple architectures. To use, just use
23 trap "rm -f $obj/.settings$$; exit" 1 2 3 15
43 SENDMAIL_BUILD_FLAGS
=""
50 # default to a optimized build to behave like the old system.
51 build_variant
="optimized"
56 src_dir
=`basename ${full_src_dir}`
58 absolute_base_dir
=`echo ${full_src_dir} | sed "s#${src_dir}\\$##"`
59 obj_rel_base_dir
='../..'
65 -src) # Specify pathname of source directory relative to
66 # root of cvs tree. This relative pathname may have
67 # multiple components, as in 'foo/bar/baz', and will also
68 # be used to form the pathname of the object directory.
73 echo "Missing arg for -src" >&2
78 /*) echo "Arg for -src must not begin with / ($arg)" >&2
83 absolute_base_dir
=`echo ${full_src_dir} | sed "s;/${src_dir}$;;"`
84 obj_rel_base_dir
=`echo x/${src_dir} | sed "s;[^/][^/]*;..;g"`
85 SMROOT
=${absolute_base_dir}
88 -c) # clean out existing $obj tree
90 SENDMAIL_BUILD_FLAGS
="$SENDMAIL_BUILD_FLAGS $1"
94 -m) # show Makefile name only
99 -M) # show the name of the obj. directory
104 -A) # show the name of the architecture
109 -E*) # environment variables to pass into Build
110 arg
=`echo $1 | sed 's/^-E//'`
113 shift # move to argument
118 echo "Empty -E flag" >&2
125 export `echo $arg | sed 's;=.*;;'`
126 SENDMAIL_BUILD_FLAGS
="$SENDMAIL_BUILD_FLAGS -E \"$arg\""
129 echo "Bad format for -E argument ($arg)" >&2
137 -L*) # set up LIBDIRS
138 libdirs
="$libdirs $1"
139 SENDMAIL_BUILD_FLAGS
="$SENDMAIL_BUILD_FLAGS $1"
143 -I*) # set up INCDIRS
144 incdirs
="$incdirs $1"
145 SENDMAIL_BUILD_FLAGS
="$SENDMAIL_BUILD_FLAGS $1"
149 -f*) # select site config file
150 arg
=`echo $1 | sed 's/^-f//'`
153 shift # move to argument
158 echo "May not use -f and -Q together"
163 echo "Only one -f flag allowed" >&2
167 if [ -z "$siteconfig" ]
169 echo "Missing argument for -f flag" >&2
171 elif [ ! -f "$siteconfig" ]
173 echo "${siteconfig}: File not found"
176 shift # move past argument
180 SENDMAIL_BUILD_FLAGS
="$SENDMAIL_BUILD_FLAGS -f \"$siteconfig\""
183 SENDMAIL_BUILD_FLAGS
="$SENDMAIL_BUILD_FLAGS -f \"${full_src_dir}/$siteconfig\""
190 -O*) # Set object directory manually.
191 arg
="`echo $1 | sed 's/^-O//'`"
194 shift # move to argument
201 SENDMAIL_BUILD_FLAGS
="$SENDMAIL_BUILD_FLAGS -O \"$OBJ_ROOT\""
202 obj_rel_base_dir
=$absolute_base_dir
205 echo "Absolute directory path required for -O flag" >&2
212 -S) # skip auto-configure
214 SENDMAIL_BUILD_FLAGS
="$SENDMAIL_BUILD_FLAGS $1"
218 -Q*) # Select a prefix for the Site/*.config.m4 file
219 arg
=`echo $1 | sed 's/^-Q//'`
222 shift # move to argument
227 echo "Empty -Q flag" >&2
229 elif [ "$siteconfig" ]
231 echo "May not use -Q and -f together" >&2
235 echo "Only one -Q allowed" >&2
239 SENDMAIL_BUILD_FLAGS
="$SENDMAIL_BUILD_FLAGS -Q \"$pfx\""
244 -v) # Select a build variant: debug, optimized, purify, whatever.
247 if [ -z "$build_variant" ]
249 echo "Usage error with \"-v\" <build_variant>" >&2
250 echo "You must specify exactly one build variant of debug|optimized|purify" >&2
256 *) # pass argument to make
257 makeargs
="$makeargs \"$1\""
258 #SENDMAIL_BUILD_FLAGS="$SENDMAIL_BUILD_FLAGS \"$1\""
264 # process selected build variant.
265 case $build_variant in
267 M4_BLDVARIANT_FLAGS
="-DconfBLDVARIANT=DEBUG"
270 M4_BLDVARIANT_FLAGS
="-DconfBLDVARIANT=OPTIMIZED"
273 M4_BLDVARIANT_FLAGS
="-DconfBLDVARIANT=PURIFY"
274 echo "Sorry, the purify build variant has not been plumbed yet. (Bummer.)" >&2
284 # Do heuristic guesses !ONLY! for machines that do not have uname
286 if [ -d /NextApps
-a ! -f /bin
/uname
-a ! -f /usr
/bin
/uname
]
288 # probably a NeXT box
289 arch
=`hostinfo | sed -n 's/.*Processor type: \([^ ]*\).*/\1/p'`
291 rel
=`hostinfo | sed -n 's/.*NeXT Mach \([0-9\.]*\).*/\1/p'`
292 elif [ -f /usr
/sony
/bin
/machine
-a -f /etc
/osversion
]
294 # probably a Sony NEWS 4.x
296 rel
=`awk '{ print $3}' /etc/osversion`
297 arch
=`/usr/sony/bin/machine`
298 elif [ -d /usr
/omron
-a -f /bin
/luna
]
300 # probably a Omron LUNA
302 if [ -f /bin
/luna1
] && /bin
/luna1
306 elif [ -f /bin
/luna2
] && /bin
/luna2
310 elif [ -f /bin
/luna88k
] && /bin
/luna88k
315 elif [ -d /usr
/apollo
-a -d \
`node_data ]
317 # probably a Apollo/DOMAIN
320 rel=`/usr
/apollo
/bin
/bldt |
grep Domain |
awk '{ print $4 }' |
sed -e 's/,//g'`
323 if [ ! "$arch" -a ! "$os" -a ! "$rel" ]
325 arch=`uname
-m |
sed -e 's/ //g' -e 's/\//-/g'`
326 os=`uname
-s |
sed -e 's/\//-/g' -e 's/ //g'`
327 rel=`uname
-r |
sed -e 's/(/-/g' -e 's/)//g' -e 's/ //g'`
331 # Tweak the values we have already got. PLEASE LIMIT THESE to
332 # tweaks that are absolutely necessary because your system uname
333 # routine doesn't return something sufficiently unique. Don't do
334 # it just because you don't like the name that is returned. You
335 # can combine the architecture name with the os name to create a
336 # unique Makefile name.
339 # tweak machine architecture
344 9000/*) arch=`echo $arch |
sed -e 's/9000.//' -e 's/..$/xx/'`;;
346 DS/907000) arch=ds90;;
351 CRAYT3E) os=UNICOS-mk;;
353 CRAY[CJT]90*|CRAYTS|CRAYSV1*|CRAYY-MP)
357 # tweak operating system type and release
358 node=`uname
-n |
sed -e 's/\//-/g' -e 's/ //g'`
359 if [ "$os" = "$node" -a "$arch" = "i386" -a "$rel" = 3.2 -a "`uname
-v`" = 2 ]
361 # old versions of SCO UNIX set uname -s the same as uname -n
367 3[34]??|3[34]??,*|3[34]??[A-Z]|4[48]??|56??)
368 if [ -d /usr/sadm/sysadm/add-ons/WIN-TCP ]
373 elif [ -d /usr/sadm/sysadm/add-ons/inet ]
386 Paragon*) os=Paragon;;
387 HP-UX) rel=`echo $rel |
sed -e 's/^[^.]*\.0*//'`;;
391 osl=`/bin
/lslpp
-Lcq bos.rte | cut
-f3 -d: | cut
-f1-3 -d.
2>/dev
/null
`
392 if [ $? = 0 -a -n "$osl" ]
396 # command failed; fall back to old method
400 # check whether it worked
410 SCO_SV) rel=`uname
-X |
sed -n 's/Release = //p'`
411 if [ "$rel" = "5v6.0.0" ]
413 os=OSR; rel=`uname
-X |
sed -n 's/Release = //p'`
415 os=SCO; rel=`uname
-X |
sed -n 's/Release = 3.2v//p'`
417 UNIX_System_V) if [ "$arch" = "ds90" ]
420 rel=`uname
-v |
sed -e 's/\(V.*\)L.*/\1/'`
422 ReliantUNIX-?|SINIX-?) os=SINIX;;
423 DomainOS) case $rel in
427 IRIX*) rel=`echo $rel |
sed -e 's/-.*$//'`;;
428 NeXT) mkdir="mkdirs";;
429 UNICOSMK) rel=`echo $rel |
sed -e 's/\(.*\)\.\(.*\)\.\(.*\)\..*$/\1.\2.\3/'`;;
430 UNICOS*) rel=`echo $rel |
sed -e 's/\(.*\)\.\(.*\)\..*$/\1.\2/'`;;
433 # get "base part" of operating system release
434 rroot=`echo $rel |
sed -e 's/\.[^.]*$//'`
435 rbase=`echo $rel |
sed -e 's/\..*//'`
436 if [ "$rroot" = "$rbase" ]
441 # heuristic tweaks to clean up names -- PLEASE LIMIT THESE!
442 if [ "$os" = "unix" ]
444 # might be Altos System V
449 elif [ -r /unix -a -r /usr/lib/libseq.a -a -r /lib/cpp ]
451 # might be a DYNIX/ptx 2.x system, which has a broken uname
452 if strings /lib/cpp | grep _SEQUENT_ > /dev/null
458 # NEC machine -- what is it running?
459 if [ "$os" = "UNIX_System_V" ]
462 elif [ "$os" = "UNIX_SV" ]
466 elif [ "$arch" = "mips" ]
471 if [ `uname
-v` = "UMIPS" ]
478 # see if there is a "user suffix" specified
479 if [ "${SENDMAIL_SUFFIX-}x" = "x" ]
483 sfx=".${SENDMAIL_SUFFIX}"
486 if [ ! -n "$Mflag" -a ! -n "$Aflag" ]
488 echo "Configuration: pfx=$pfx, os=$os, rel=$rel, rbase=$rbase, rroot=$rroot, arch=$arch, sfx=$sfx, variant=$build_variant"
491 SMROOT=${SMROOT-`(cd ..;pwd)`}
492 BUILDTOOLS=${BUILDTOOLS-$SMROOT/devtools}
493 export SMROOT BUILDTOOLS
495 # see if we are in a Build-able directory
496 if [ ! -f Makefile.m4 -a ! -n "$Aflag" ]; then
497 echo "Makefile.m4 not found. Build can only be run from a source directory."
501 incdirs="$incdirs -I\${SRCDIR}/include"
503 if [ -z "$OBJ_ROOT" ]; then
507 if [ "${pfx}x" = "x" ]
514 # Print out the architecture (to build up an obj dir path) and exit
517 echo "$os.$rel.$arch$sfx"
521 # now try to find a reasonable object directory
522 if [ -r ${OBJ_ROOT}/obj${prefix}.$os.$rel.$arch$sfx ]; then
523 abs_obj_dir=${OBJ_ROOT}/obj${prefix}.$os.$rel.$arch$sfx
524 elif [ -r ${OBJ_ROOT}/obj${prefix}.$os.$rroot.$arch$sfx ]; then
525 abs_obj_dir=${OBJ_ROOT}/obj${prefix}.$os.$rroot.$arch$sfx
526 elif [ -r ${OBJ_ROOT}/obj${prefix}.$os.$rbase.x.$arch$sfx ]; then
527 abs_obj_dir=${OBJ_ROOT}/obj${prefix}.$os.$rbase.x.$arch$sfx
528 elif [ -r ${OBJ_ROOT}/obj${prefix}.$os.$rel$sfx ]; then
529 abs_obj_dir=${OBJ_ROOT}/obj${prefix}.$os.$rel$sfx
530 elif [ -r ${OBJ_ROOT}/obj${prefix}.$os.$rbase.x$sfx ]; then
531 abs_obj_dir=${OBJ_ROOT}/obj${prefix}.$os.$rbase.x$sfx
532 elif [ -r ${OBJ_ROOT}/obj${prefix}.$os.$arch$sfx ]; then
533 abs_obj_dir=${OBJ_ROOT}/obj${prefix}.$os.$arch$sfx
534 elif [ -r ${OBJ_ROOT}/obj${prefix}.$rel.$arch$sfx ]; then
535 abs_obj_dir=${OBJ_ROOT}/obj${prefix}.$rel.$arch$sfx
536 elif [ -r ${OBJ_ROOT}/obj${prefix}.$rbase.x.$arch$sfx ]; then
537 abs_obj_dir=${OBJ_ROOT}/obj${prefix}.$rbase.x.$arch$sfx
538 elif [ -r ${OBJ_ROOT}/obj${prefix}.$os$sfx ]; then
539 abs_obj_dir=${OBJ_ROOT}/obj${prefix}.$os$sfx
540 elif [ -r ${OBJ_ROOT}/obj${prefix}.$arch$sfx ]; then
541 abs_obj_dir=${OBJ_ROOT}/obj${prefix}.$arch$sfx
542 elif [ -r ${OBJ_ROOT}/obj${prefix}.$rel$sfx ]; then
543 abs_obj_dir=${OBJ_ROOT}/obj${prefix}.$rel$sfx
544 elif [ -r ${OBJ_ROOT}/obj${prefix}.$sfx ]; then
545 abs_obj_dir=${OBJ_ROOT}/obj${prefix}.$sfx
548 if [ -n "$abs_obj_dir" ]
550 obj=${abs_obj_dir}/${src_dir}
553 # Print the directory which would be used for the build and exit
558 obj=${OBJ_ROOT}/obj.$os.$rel.$arch$sfx/${src_dir}
564 # Check if trying to use -f with an existing obj directory
565 if [ -n "$siteconfig" -a -n "$obj" -a -d "$obj" -a -z "$cflag" ]
567 echo "Can not use Build's -f flag with an existing object tree."
568 echo "If you wish to change configuration information, use the -c flag to clear"
569 echo "the existing $obj tree."
573 # Check if trying to use -Q with an existing obj directory
574 if [ -n "$pfx" -a -n "$obj" -a -d "$obj" -a -z "$cflag" ]
576 echo "Can not use Build's -Q flag with an existing object tree."
577 echo "If you wish to change configuration information, use the -c flag to clear"
578 echo "the existing $obj tree."
583 # Clean out the directory before building.
588 echo "Clearing out existing $obj tree"
593 # If we didn't detect an existing obj directory, makeup a new obj name.
596 abs_obj_dir=${OBJ_ROOT}/obj${prefix}.$os.$rel.$arch$sfx
597 obj=${abs_obj_dir}/${src_dir}
600 # Check if obj directory exists
603 if [ -r $BUILDTOOLS/OS/$os.$rel.$arch$sfx ]; then
604 oscf=$os.$rel.$arch$sfx
605 elif [ -r $BUILDTOOLS/OS/$os.$rel.$arch ]; then
607 elif [ -r $BUILDTOOLS/OS/$os.$rroot.$arch$sfx ]; then
608 oscf=$os.$rroot.$arch$sfx
609 elif [ -r $BUILDTOOLS/OS/$os.$rroot.$arch ]; then
610 oscf=$os.$rroot.$arch
611 elif [ -r $BUILDTOOLS/OS/$os.$rbase.x.$arch$sfx ]; then
612 oscf=$os.$rbase.x.$arch$sfx
613 elif [ -r $BUILDTOOLS/OS/$os.$rbase.x.$arch ]; then
614 oscf=$os.$rbase.x.$arch
615 elif [ -r $BUILDTOOLS/OS/$os.$rel$sfx ]; then
617 elif [ -r $BUILDTOOLS/OS/$os.$rel ]; then
619 elif [ -r $BUILDTOOLS/OS/$os.$rroot$sfx ]; then
621 elif [ -r $BUILDTOOLS/OS/$os.$rroot ]; then
623 elif [ -r $BUILDTOOLS/OS/$os.$rbase.x$sfx ]; then
624 oscf=$os.$rbase.x$sfx
625 elif [ -r $BUILDTOOLS/OS/$os.$rbase.x ]; then
627 elif [ -r $BUILDTOOLS/OS/$os.$arch$sfx ]; then
629 elif [ -r $BUILDTOOLS/OS/$os.$arch ]; then
631 elif [ -r $BUILDTOOLS/OS/$rel.$arch$sfx ]; then
633 elif [ -r $BUILDTOOLS/OS/$rel.$arch ]; then
635 elif [ -r $BUILDTOOLS/OS/$rroot.$arch$sfx ]; then
636 oscf=$rroot.$arch$sfx
637 elif [ -r $BUILDTOOLS/OS/$rroot.$arch ]; then
639 elif [ -r $BUILDTOOLS/OS/$rbase.x.$arch$sfx ]; then
640 oscf=$rbase.x.$arch$sfx
641 elif [ -r $BUILDTOOLS/OS/$rbase.x.$arch ]; then
643 elif [ -r $BUILDTOOLS/OS/$os$sfx ]; then
645 elif [ -r $BUILDTOOLS/OS/$os ]; then
647 elif [ -r $BUILDTOOLS/OS/$arch$sfx ]; then
649 elif [ -r $BUILDTOOLS/OS/$arch ]; then
651 elif [ -r $BUILDTOOLS/OS/$rel$sfx ]; then
653 elif [ -r $BUILDTOOLS/OS/$rel ]; then
655 elif [ -r $BUILDTOOLS/OS/$rel$sfx ]; then
658 echo "Cannot determine how to support $os.$rel.$arch" >&2
661 M4=`$SHELL $BUILDTOOLS/bin
/find_m4.sh
`
671 echo "Will run in virgin $obj using $BUILDTOOLS/OS/$oscf"
675 echo "Creating $obj using $BUILDTOOLS/OS/$oscf"
680 # This glob doesn't actually glob to something everywhere,
681 # thus the protective measures.
682 for i in ${obj_rel_base_dir}/${src_dir}/*.[chly13458]
689 # This glob doesn't actually glob to something everywhere,
690 # thus the protective measures.
691 for i in ${obj_rel_base_dir}/${src_dir}/*.0
695 $ln $i `basename $i`.dist
700 (cd $obj; $ln ${obj_rel_base_dir}/${src_dir}/helpfile .)
703 rm -f $obj/.settings$$
704 echo 'divert(-1)' > $obj/.settings$$
705 cat $BUILDTOOLS/M4/header.m4 >> $obj/.settings$$
706 echo "define(\`bldOS
', \`\`$os'')" >> $obj/.settings$$
707 echo "define(\`bldREL', \
`\`$rel'')" >> $obj/.settings$$
708 echo "define
(\
`bldARCH', \`\
`$arch'')" >> $obj/.settings$$
709 cat $BUILDTOOLS/OS/$oscf >> $obj/.settings$$
713 absolute_obj_dir=`pwd`
717 echo "ifdef(\`bldABS_OBJ_DIR
',,\`define(\`bldABS_OBJ_DIR', \
`$absolute_obj_dir')')" >> $obj/.settings$$
718 rel_src_dir="$obj_rel_base_dir/$src_dir"
719 echo "define(\`bldSRC_NAME
', \`$src_dir')" >> $obj/.settings$$
720 echo "define
(\
`bldREL_SRC_DIR', \`$rel_src_dir')" >> $obj/.settings$$
724 # They gave us a specific prefix, let's try it out.
725 if [ -f $BUILDTOOLS/Site
/$pfx.
$oscf$sfx.
m4 ]
727 siteconfig
=$BUILDTOOLS/Site
/$pfx.
$oscf$sfx.
m4
728 elif [ -f $BUILDTOOLS/Site
/$pfx.
$oscf.
m4 ]
730 siteconfig
=$BUILDTOOLS/Site
/$pfx.
$oscf.
m4
732 if [ -f $BUILDTOOLS/Site
/$pfx.config.
m4 ]
734 siteconfig
="$BUILDTOOLS/Site/$pfx.config.m4 $siteconfig"
736 elif [ -z "$siteconfig" ]
738 # none specified, use defaults
739 if [ -f $BUILDTOOLS/Site
/site.
$oscf$sfx.
m4 ]
741 siteconfig
=$BUILDTOOLS/Site
/site.
$oscf$sfx.
m4
742 elif [ -f $BUILDTOOLS/Site
/site.
$oscf.
m4 ]
744 siteconfig
=$BUILDTOOLS/Site
/site.
$oscf.
m4
746 if [ -f $BUILDTOOLS/Site
/site.config.
m4 ]
748 siteconfig
="$BUILDTOOLS/Site/site.config.m4 $siteconfig"
750 if [ -f $BUILDTOOLS/Site
/site.post.
m4 ]
752 siteconfig
="$siteconfig $BUILDTOOLS/Site/site.post.m4"
755 if [ ! -z "$siteconfig" ]
757 echo "Including $siteconfig"
758 cat $siteconfig >> $obj/.settings$$
762 echo "define(\`confLIBDIRS', confLIBDIRS \`\`$libdirs'')" >> $obj/.settings$$
766 echo "define(\`confINCDIRS', \`\`$incdirs'' confINCDIRS)" >> $obj/.settings$$
768 echo "define(\`_SRC_PATH_', \`\`$obj_rel_base_dir'')" >> $obj/.settings$$
769 echo "define(\`bldSRC_PATH', \`\`$obj_rel_base_dir'')" >> $obj/.settings$$
770 echo 'divert(0)dnl' >> $obj/.settings$$
771 libdirs
=`(cat $obj/.settings$$; echo "_SRIDBIL_= confLIBDIRS" ) | \
772 sed -e 's/\(.\)include/\1_include_/g' -e 's/#define/#_define_/g' | \
773 ${M4} ${M4_BLDVARIANT_FLAGS} -DconfBUILDTOOLSDIR=$BUILDTOOLS - | \
774 grep "^_SRIDBIL_=" | \
775 sed -e 's/#_define_/#define/g' -e 's/_include_/include/g' -e "s/^_SRIDBIL_=//"`
776 libsrch
=`(cat $obj/.settings$$; echo "_HCRSBIL_= confLIBSEARCH" ) | \
777 sed -e 's/\(.\)include/\1_include_/g' -e 's/#define/#_define_/g' | \
778 ${M4} ${M4_BLDVARIANT_FLAGS} -DconfBUILDTOOLSDIR=$BUILDTOOLS - | \
779 grep "^_HCRSBIL_=" | \
780 sed -e 's/#_define_/#define/g' -e 's/_include_/include/g' -e "s/^_HCRSBIL_=//"`
781 libpath
=`(cat $obj/.settings$$; echo "_HCRSBIL_= confLIBSEARCHPATH" ) | \
782 sed -e 's/\(.\)include/\1_include_/g' -e 's/#define/#_define_/g' | \
783 ${M4} ${M4_BLDVARIANT_FLAGS} -DconfBUILDTOOLSDIR=$BUILDTOOLS - | \
784 grep "^_HCRSBIL_=" | \
785 sed -e 's/#_define_/#define/g' -e 's/_include_/include/g' -e "s/^_HCRSBIL_=//"`
786 echo 'divert(-1)' >> $obj/.settings$$
787 LIBDIRS
="$libdirs" LIBSRCH
="$libsrch" LIBPATH
="$libpath" SITECONFIG
="$siteconfig" $SHELL $BUILDTOOLS/bin
/configure.sh
$sflag $oscf >> $obj/.settings$$
788 echo 'divert(0)dnl' >> $obj/.settings$$
789 sed -e 's/\(.\)include/\1_include_/g' -e 's/#define/#_define_/g' -e 's/
//g' $obj/.settings$$ | \
790 ${M4} ${M4_BLDVARIANT_FLAGS} -DconfBUILDTOOLSDIR=$BUILDTOOLS - Makefile.
m4 | \
791 sed -e 's/#_define_/#define/g' -e 's/_include_/include/g' -e 's/
//g' > $obj/Makefile
792 # That ^M up there was added by quoting it in emacs.
793 # Make has problems if lines end in ^M^M, but not in ^M apparently
794 if [ $?
-ne 0 -o ! -s $obj/Makefile
]
796 echo "ERROR: ${M4} failed; You may need a newer version of M4, at least as new as System V or GNU" 1>&2
800 rm -f $obj/.settings$$
801 echo "Making dependencies in $obj"
802 (cd $obj; ${MAKE-make} depend
)
807 makefile
=`ls -l $obj/Makefile | sed 's/.* //'`
808 if [ -z "$makefile" ]
810 echo "ERROR: $obj exists but has no Makefile" >&2
813 echo "Will run in existing $obj using $makefile"
817 echo "Making in $obj"
819 eval exec ${MAKE-make} SENDMAIL_BUILD_FLAGS
=\"$SENDMAIL_BUILD_FLAGS\" $makeargs