Commit 694c897b authored by Bob Halley's avatar Bob Halley
Browse files

mkdep support

parent 332d9b38
#! /bin/sh
# From configure.in Revision: 1.38
# From configure.in Revision: 1.39
......@@ -2024,6 +2024,8 @@ fi
;;
esac
MKDEPCC="$CC"
MKDEPCFLAGS="-M"
if test "X$GCC" = "Xyes"; then
STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes"
case "$host" in
......@@ -2035,16 +2037,23 @@ else
case "$host" in
*-dec-osf*)
CC="$CC -pthread"
MKDEPCC="$CC"
;;
*-sun-solaris*)
CC="$CC -mt"
MKDEPCC="$CC"
MKDEPCFLAGS="-xM"
;;
*-hp-hpux*)
CC="$CC -Ae -z +w1"
MKDEPPROG='cc -E -Wp,-M >/dev/null 2>>$TMP'
;;
esac
fi
case "$host" in
*-dec-osf*)
;;
......@@ -2052,9 +2061,9 @@ esac
echo $ac_n "checking for sa_len in struct sockaddr""... $ac_c" 1>&6
echo "configure:2056: checking for sa_len in struct sockaddr" >&5
echo "configure:2065: checking for sa_len in struct sockaddr" >&5
cat > conftest.$ac_ext <<EOF
#line 2058 "configure"
#line 2067 "configure"
#include "confdefs.h"
#include <sys/types.h>
......@@ -2063,7 +2072,7 @@ int main() {
struct sockaddr sa; sa.sa_len = 0; return (0);
; return 0; }
EOF
if { (eval echo configure:2067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
ISC_NET_HAVESALEN="#define ISC_NET_HAVESALEN 1"
......@@ -2078,9 +2087,9 @@ rm -f conftest*
echo $ac_n "checking for AF_INET6""... $ac_c" 1>&6
echo "configure:2082: checking for AF_INET6" >&5
echo "configure:2091: checking for AF_INET6" >&5
cat > conftest.$ac_ext <<EOF
#line 2084 "configure"
#line 2093 "configure"
#include "confdefs.h"
#include <sys/types.h>
......@@ -2089,7 +2098,7 @@ int main() {
return (AF_INET6);
; return 0; }
EOF
if { (eval echo configure:2093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
ISC_NET_NEEDAFINET6="#undef ISC_NET_NEEDAFINET6"
......@@ -2103,9 +2112,9 @@ fi
rm -f conftest*
echo $ac_n "checking for IPv6 structures""... $ac_c" 1>&6
echo "configure:2107: checking for IPv6 structures" >&5
echo "configure:2116: checking for IPv6 structures" >&5
cat > conftest.$ac_ext <<EOF
#line 2109 "configure"
#line 2118 "configure"
#include "confdefs.h"
#include <sys/types.h>
......@@ -2115,7 +2124,7 @@ int main() {
struct sockaddr_in6 sin6; return (0);
; return 0; }
EOF
if { (eval echo configure:2119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
ISC_NET_HAVEIPV6="#define ISC_NET_HAVEIPV6 1"
......@@ -2212,7 +2221,7 @@ else
fi
echo $ac_n "checking build system type""... $ac_c" 1>&6
echo "configure:2216: checking build system type" >&5
echo "configure:2225: checking build system type" >&5
build_alias=$build
case "$build_alias" in
......@@ -2241,7 +2250,7 @@ ac_prog=ld
if test "$ac_cv_prog_gcc" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
echo "configure:2245: checking for ld used by GCC" >&5
echo "configure:2254: checking for ld used by GCC" >&5
ac_prog=`($CC -print-prog-name=ld) 2>&5`
case "$ac_prog" in
# Accept absolute paths.
......@@ -2265,10 +2274,10 @@ echo "configure:2245: checking for ld used by GCC" >&5
esac
elif test "$with_gnu_ld" = yes; then
echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
echo "configure:2269: checking for GNU ld" >&5
echo "configure:2278: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
echo "configure:2272: checking for non-GNU ld" >&5
echo "configure:2281: checking for non-GNU ld" >&5
fi
if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -2304,7 +2313,7 @@ fi
test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
echo "configure:2308: checking if the linker ($LD) is GNU ld" >&5
echo "configure:2317: checking if the linker ($LD) is GNU ld" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -2320,7 +2329,7 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
echo "configure:2324: checking for BSD-compatible nm" >&5
echo "configure:2333: checking for BSD-compatible nm" >&5
if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -2357,7 +2366,7 @@ echo "$ac_t""$NM" 1>&6
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
echo "configure:2361: checking whether ln -s works" >&5
echo "configure:2370: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -2401,8 +2410,8 @@ test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
case "$host" in
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 2405 "configure"' > conftest.$ac_ext
if { (eval echo configure:2406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
echo '#line 2414 "configure"' > conftest.$ac_ext
if { (eval echo configure:2415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case "`/usr/bin/file conftest.o`" in
*32-bit*)
LD="${LD-ld} -32"
......@@ -2423,19 +2432,19 @@ case "$host" in
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
echo "configure:2427: checking whether the C compiler needs -belf" >&5
echo "configure:2436: checking whether the C compiler needs -belf" >&5
if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2432 "configure"
#line 2441 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if { (eval echo configure:2439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
lt_cv_cc_needs_belf=yes
else
......@@ -2550,12 +2559,12 @@ esac
echo $ac_n "checking for inet_ntop""... $ac_c" 1>&6
echo "configure:2554: checking for inet_ntop" >&5
echo "configure:2563: checking for inet_ntop" >&5
if eval "test \"`echo '$''{'ac_cv_func_inet_ntop'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2559 "configure"
#line 2568 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char inet_ntop(); below. */
......@@ -2578,7 +2587,7 @@ inet_ntop();
; return 0; }
EOF
if { (eval echo configure:2582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_inet_ntop=yes"
else
......@@ -2596,7 +2605,7 @@ if eval "test \"`echo '$ac_cv_func_'inet_ntop`\" = yes"; then
else
echo "$ac_t""no" 1>&6
ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c"
cat >> confdefs.h <<\EOF
#define NEED_INET_NTOP 1
EOF
......@@ -2605,12 +2614,12 @@ EOF
fi
echo $ac_n "checking for inet_pton""... $ac_c" 1>&6
echo "configure:2609: checking for inet_pton" >&5
echo "configure:2618: checking for inet_pton" >&5
if eval "test \"`echo '$''{'ac_cv_func_inet_pton'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2614 "configure"
#line 2623 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char inet_pton(); below. */
......@@ -2633,7 +2642,7 @@ inet_pton();
; return 0; }
EOF
if { (eval echo configure:2637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_inet_pton=yes"
else
......@@ -2651,7 +2660,7 @@ if eval "test \"`echo '$ac_cv_func_'inet_pton`\" = yes"; then
else
echo "$ac_t""no" 1>&6
ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O"
ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_pton.c"
cat >> confdefs.h <<\EOF
#define NEED_INET_PTON 1
EOF
......@@ -2660,12 +2669,12 @@ EOF
fi
echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
echo "configure:2664: checking for inet_aton" >&5
echo "configure:2673: checking for inet_aton" >&5
if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2669 "configure"
#line 2678 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char inet_aton(); below. */
......@@ -2688,7 +2697,7 @@ inet_aton();
; return 0; }
EOF
if { (eval echo configure:2692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_inet_aton=yes"
else
......@@ -2706,7 +2715,7 @@ if eval "test \"`echo '$ac_cv_func_'inet_aton`\" = yes"; then
else
echo "$ac_t""no" 1>&6
ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_aton.$O"
ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_aton.c"
cat >> confdefs.h <<\EOF
#define NEED_INET_ATON 1
EOF
......@@ -2717,6 +2726,7 @@ fi
BIND9_TOP_BUILDDIR=`pwd`
......@@ -2835,6 +2845,7 @@ ac_given_INSTALL="$INSTALL"
trap 'rm -fr `echo "make/rules
Makefile
make/Makefile
make/mkdep
lib/Makefile
lib/isc/Makefile
lib/isc/include/Makefile
......@@ -2916,6 +2927,9 @@ s%@STD_CWARNINGS@%$STD_CWARNINGS%g
s%@CC@%$CC%g
s%@YACC@%$YACC%g
s%@CPP@%$CPP%g
s%@MKDEPCC@%$MKDEPCC%g
s%@MKDEPCFLAGS@%$MKDEPCFLAGS%g
s%@MKDEPPROG@%$MKDEPPROG%g
s%@ISC_NET_HAVESALEN@%$ISC_NET_HAVESALEN%g
s%@ISC_NET_NEEDAFINET6@%$ISC_NET_NEEDAFINET6%g
s%@ISC_NET_HAVEIPV6@%$ISC_NET_HAVEIPV6%g
......@@ -2932,6 +2946,7 @@ s%@LIBTOOL@%$LIBTOOL%g
s%@O@%$O%g
s%@A@%$A%g
s%@ISC_EXTRA_OBJS@%$ISC_EXTRA_OBJS%g
s%@ISC_EXTRA_SRCS@%$ISC_EXTRA_SRCS%g
s%@BIND9_TOP_BUILDDIR@%$BIND9_TOP_BUILDDIR%g
/@BIND9_MAKE_RULES@/r $BIND9_MAKE_RULES
s%@BIND9_MAKE_RULES@%%g
......@@ -2985,6 +3000,7 @@ cat >> $CONFIG_STATUS <<EOF
CONFIG_FILES=\${CONFIG_FILES-"make/rules
Makefile
make/Makefile
make/mkdep
lib/Makefile
lib/isc/Makefile
lib/isc/include/Makefile
......
......@@ -13,7 +13,7 @@ dnl PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
dnl ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
dnl SOFTWARE.
AC_REVISION($Revision: 1.38 $)
AC_REVISION($Revision: 1.39 $)
AC_PREREQ(2.13)
......@@ -203,6 +203,8 @@ case "$host" in
;;
esac
MKDEPCC="$CC"
MKDEPCFLAGS="-M"
if test "X$GCC" = "Xyes"; then
STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes"
case "$host" in
......@@ -214,15 +216,22 @@ else
case "$host" in
*-dec-osf*)
CC="$CC -pthread"
MKDEPCC="$CC"
;;
*-sun-solaris*)
CC="$CC -mt"
MKDEPCC="$CC"
MKDEPCFLAGS="-xM"
;;
*-hp-hpux*)
CC="$CC -Ae -z +w1"
MKDEPPROG='cc -E -Wp,-M >/dev/null 2>>$TMP'
;;
esac
fi
AC_SUBST(MKDEPCC)
AC_SUBST(MKDEPCFLAGS)
AC_SUBST(MKDEPPROG)
dnl
dnl Networking specifics.
......@@ -308,20 +317,21 @@ dnl the files.
dnl
AC_CHECK_FUNC(inet_ntop, ,
[ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
AC_SUBST(ISC_EXTRA_OBJS)
ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c"
AC_DEFINE(NEED_INET_NTOP)]
)
AC_CHECK_FUNC(inet_pton, ,
[ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O"
AC_SUBST(ISC_EXTRA_OBJS)
ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_pton.c"
AC_DEFINE(NEED_INET_PTON)]
)
AC_CHECK_FUNC(inet_aton, ,
[ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_aton.$O"
AC_SUBST(ISC_EXTRA_OBJS)
ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_aton.c"
AC_DEFINE(NEED_INET_ATON)]
)
AC_SUBST(ISC_EXTRA_OBJS)
AC_SUBST(ISC_EXTRA_SRCS)
AC_SUBST(BIND9_TOP_BUILDDIR)
BIND9_TOP_BUILDDIR=`pwd`
......@@ -342,6 +352,7 @@ AC_OUTPUT(
make/rules
Makefile
make/Makefile
make/mkdep
lib/Makefile
lib/isc/Makefile
lib/isc/include/Makefile
......
......@@ -113,15 +113,25 @@ OBJS = callbacks.@O@ compress.@O@ db.@O@ dbiterator.@O@ \
ttl.@O@ tcpmsg.@O@ \
${DSTOBJS} ${OPENSSLOBJS} ${DNSSAFEOBJS}
OSRC = callbacks.c compress.c db.c dbiterator.c dbtable.c dispatch.c \
lib.c master.c name.c rbt.c rbtdb.c rbtdb64.c \
rdata.c rdatalist.c rdataset.c rdatasetiter.c rdataslab.c \
resolver.c result.c version.c masterdump.c time.c ttl.c
SRCS = callbacks.c compress.c db.c dbiterator.c \
dbtable.c dispatch.c lib.c master.c message.c \
name.c rbt.c rbtdb.c rbtdb64.c rdata.c \
rdatalist.c rdataset.c rdatasetiter.c rdataslab.c \
resolver.c result.c version.c masterdump.c time.c \
ttl.c tcpmsg.c
SUBDIRS = include sec
TARGETS = include/dns/enumtype.h include/dns/enumclass.h \
include/dns/rdatastruct.h timestamp
#
# These two dependencies need to be before BIND9_MAKE_RULES.
#
depend:: include/dns/enumtype.h include/dns/enumclass.h \
include/dns/rdatastruct.h code.h
sec:: include/dns/enumtype.h include/dns/enumclass.h \
include/dns/rdatastruct.h code.h
@BIND9_MAKE_RULES@
version.@O@: version.c
......@@ -158,8 +168,6 @@ clean distclean::
rm -f gen code.h include/dns/enumtype.h include/dns/enumclass.h
rm -f include/dns/rdatastruct.h
sec: include/dns/enumtype.h include/dns/enumclass.h include/dns/rdatastruct.h
rdata.@O@: code.h
include/dns/enumtype.h: gen
......
......@@ -57,6 +57,28 @@ OBJS = ahchdig.@O@ ahchencr.@O@ ahchgen.@O@ ahchrand.@O@ \
kirsapub.@O@ md5.@O@ md5rand.@O@ prime.@O@ random.@O@ \
rsa.@O@ rsakeygn.@O@ seccbcd.@O@ seccbce.@O@ surrendr.@O@
SRCS = ahchdig.c ahchencr.c ahchgen.c ahchrand.c \
ahdigest.c ahencryp.c ahgen.c ahrandom.c \
ahrsaenc.c ahrsaepr.c ahrsaepu.c aichdig.c \
aichenc8.c aichencn.c aichencr.c aichgen.c \
aichrand.c aimd5.c aimd5ran.c ainfotyp.c \
ainull.c airsaepr.c airsaepu.c airsakgn.c \
airsaprv.c airsapub.c algchoic.c algobj.c \
amcrte.c ammd5.c ammd5r.c amrkg.c amrsae.c \
balg.c bgclrbit.c bgmdmpyx.c bgmdsqx.c \
bgmodexp.c bgpegcd.c big2exp.c bigabs.c \
bigacc.c bigarith.c bigcmp.c bigconst.c \
biginv.c biglen.c bigmodx.c bigmpy.c \
bigpdiv.c bigpmpy.c bigpmpyh.c bigpmpyl.c \
bigpsq.c bigqrx.c bigsmod.c bigtocan.c \
bigu.c bigunexp.c binfocsh.c bkey.c \
bmempool.c cantobig.c crt2.c digest.c \
digrand.c encrypt.c generate.c intbits.c \
intitem.c keyobj.c ki8byte.c kiitem.c \
kinfotyp.c kifulprv.c kipkcrpr.c kirsacrt.c \
kirsapub.c md5.c md5rand.c prime.c random.c \
rsa.c rsakeygn.c seccbcd.c seccbce.c surrendr.c
SUBDIRS =
TARGETS = ${OBJS}
......
......@@ -41,6 +41,9 @@ LIBS = @LIBS@
OBJS = bsafe_link.@O@ dst_api.@O@ dst_parse.@O@ hmac_link.@O@ \
openssl_link.@O@ dst_result.@O@ dst_support.@O@ dst_lib.@O@
SRCS = bsafe_link.c dst_api.c dst_parse.c hmac_link.c \
openssl_link.c dst_result.c dst_support.c dst_lib.c
SUBDIRS = include
TARGETS = ${OBJS}
......
......@@ -46,6 +46,17 @@ OBJS = bn_add.@O@ bn_asm.@O@ bn_comba.@O@ bn_div.@O@ \
rand_lib.@O@ sha1_one.@O@ sha1dgst.@O@ stack.@O@ \
th-lock.@O@
SRCS = bn_add.c bn_asm.c bn_comba.c bn_div.c \
bn_err.c bn_exp.c bn_exp2.c bn_gcd.c \
bn_lib.c bn_m.c bn_mont.c bn_mul.c \
bn_prime.c bn_rand.c bn_recp.c \
bn_shift.c bn_sqr.c bn_word.c buffer.c \
cryptlib.c dsa_asn1.c dsa_err.c dsa_gen.c \
dsa_key.c dsa_lib.c dsa_sign.c dsa_vrf.c \
err.c lhash.c md_rand.c md5_dgst.c mem.c \
rand_lib.c sha1_one.c sha1dgst.c stack.c \
th-lock.c
SUBDIRS = include
TARGETS = ${OBJS}
......
......@@ -41,6 +41,12 @@ OBJS = @ISC_EXTRA_OBJS@ \
task.@O@ timer.@O@ version.@O@ \
${UNIXOBJS} ${NLSOBJS} ${PTHREADOBJS}
SRCS = @ISC_EXTRA_SRCS@ \
assertions.c base64.c buffer.c error.c \
heap.c lex.c lib.c mem.c result.c \
rwlock.c sockaddr.c symtab.c str.c event.c \
task.c timer.c version.c
LIBS = @LIBS@
SUBDIRS = include unix nls pthreads
......
......@@ -24,6 +24,8 @@ CWARNINGS =
OBJS = msgcat.@O@
SRCS = msgcat.c
SUBDIRS =
TARGETS = ${OBJS}
......
......@@ -25,6 +25,8 @@ CWARNINGS =
OBJS = condition.@O@
SRCS = condition.c
SUBDIRS = include
TARGETS = ${OBJS}
......
......@@ -27,6 +27,9 @@ CWARNINGS =
OBJS = app.@O@ time.@O@ stdtime.@O@ socket.@O@ \
interfaceiter.@O@ net.@O@
SRCS = app.c time.c stdtime.c socket.c \
interfaceiter.c net.c
SUBDIRS = include
TARGETS = ${OBJS}
......
......@@ -23,4 +23,4 @@ TARGETS=
@BIND9_MAKE_RULES@
distclean::
rm -f rules
rm -f rules mkdep
#!/bin/sh -
## ++Copyright++ 1987
## -
## Copyright (c) 1987 Regents of the University of California.
## All rights reserved.
##
## Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions
## are met:
## 1. Redistributions of source code must retain the above copyright
## notice, this list of conditions and the following disclaimer.
## 2. Redistributions in binary form must reproduce the above copyright
## notice, this list of conditions and the following disclaimer in the
## documentation and/or other materials provided with the distribution.
## 3. All advertising materials mentioning features or use of this software
## must display the following acknowledgement:
## This product includes software developed by the University of
## California, Berkeley and its contributors.
## 4. Neither the name of the University nor the names of its contributors
## may be used to endorse or promote products derived from this software
## without specific prior written permission.
## THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
## ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
## ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
## FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
## DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
## OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
## HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
## LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
## OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
## SUCH DAMAGE.
## -
## Portions Copyright (c) 1993 by Digital Equipment Corporation.
##
## Permission to use, copy, modify, and distribute this software for any
## purpose with or without fee is hereby granted, provided that the above
## copyright notice and this permission notice appear in all copies, and that
## the name of Digital Equipment Corporation not be used in advertising or
## publicity pertaining to distribution of the document or software without
## specific, written prior permission.
##
## THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
## WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
## OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
## CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
## DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
## PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
## SOFTWARE.
## -
## --Copyright--
#
# @(#)mkdep.sh 5.12 (Berkeley) 6/30/88
#
MAKE=Makefile # default makefile name is "Makefile"
while :
do case "$1" in
# -f allows you to select a makefile name
-f)
MAKE=$2
shift; shift ;;
# the -p flag produces "program: program.c" style dependencies
# so .o's don't get produced
-p)
SED='s;\.o;;'
shift ;;
*)
break ;;
esac
done
if [ $# = 0 ] ; then
echo 'usage: mkdep [-p] [-f makefile] [flags] file ...'
exit 1
fi
if [ ! -w $MAKE ]; then
echo "mkdep: no writeable file \"$MAKE\""
exit 1
fi
TMP=mkdep$$
trap 'rm -f $TMP ; exit 1' 1 2 3 13 15
cp $MAKE ${MAKE}.bak
sed -e '/DO NOT DELETE THIS LINE/,$d' < $MAKE > $TMP
cat << _EOF_ >> $TMP
# DO NOT DELETE THIS LINE -- mkdep uses it.