diff options
author | Internet Software Consortium, Inc <@isc.org> | 2007-09-07 14:16:27 -0600 |
---|---|---|
committer | LaMont Jones <lamont@debian.org> | 2007-09-07 14:16:27 -0600 |
commit | 09dd476a8ab6c1337ed0479ad6d6d0e63e38d35b (patch) | |
tree | 5bc17beba1e8847d6f3b8301ae11bab5789a3328 /make | |
parent | 8dc48682f6d0e38c23f5832207823849031cfc00 (diff) | |
download | bind9-09dd476a8ab6c1337ed0479ad6d6d0e63e38d35b.tar.gz |
9.5.0a5
Diffstat (limited to 'make')
-rw-r--r-- | make/includes.in | 2 | ||||
-rw-r--r-- | make/mkdep.in | 33 | ||||
-rw-r--r-- | make/rules.in | 48 |
3 files changed, 64 insertions, 19 deletions
diff --git a/make/includes.in b/make/includes.in index 304305da..a5a3f003 100644 --- a/make/includes.in +++ b/make/includes.in @@ -13,7 +13,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: includes.in,v 1.17.18.2 2005/06/04 06:23:47 jinmei Exp $ +# $Id: includes.in,v 1.19 2005/06/04 05:32:50 jinmei Exp $ # Search for machine-generated header files in the build tree, # and for normal headers in the source tree (${top_srcdir}). diff --git a/make/mkdep.in b/make/mkdep.in index fc3e2506..bb536c95 100644 --- a/make/mkdep.in +++ b/make/mkdep.in @@ -1,5 +1,13 @@ #!/bin/sh - +## +## Modified to handle -vpath <path> option by Michael Graff, ISC. +## The purpose of this is to allow this script to run outside of the +## source directory, for instance when running configure with +## ../bind9-mainline/configure +## and still have "make depend" work. +## + ## ++Copyright++ 1987 ## - ## Copyright (c) 1987 Regents of the University of California. @@ -60,6 +68,10 @@ MAKE=Makefile # default makefile name is "Makefile" while : do case "$1" in + # -vpath allows one to select a virtual path for .c files + -vpath) + VPATH=$2; + shift; shift ;; # -f allows you to select a makefile name -f) MAKE=$2 @@ -76,7 +88,7 @@ while : done if [ $# = 0 ] ; then - echo 'usage: mkdep [-p] [-f makefile] [flags] file ...' + echo 'usage: mkdep [-vpath path] [-p] [-f makefile] [flags] file ...' exit 1 fi @@ -107,11 +119,26 @@ _EOF_ # egrep '^#include[ ]*".*"' /dev/null $* | # sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' -e 's/\.c/.o/' | +if [ X"${VPATH}" != X ] ; then + for arg in $* ; do + case "$arg" in + -*) + newargs="$newargs $arg" + ;; + *) + newargs="$newargs $VPATH/$arg" + ;; + esac + done +else + newargs="$*"; +fi + MKDEPPROG="@MKDEPPROG@" if [ X"${MKDEPPROG}" != X ]; then - @SHELL@ -c "${MKDEPPROG} $*" + @SHELL@ -c "${MKDEPPROG} ${newargs}" else - @MKDEPCC@ @MKDEPCFLAGS@ $* | + @MKDEPCC@ @MKDEPCFLAGS@ ${newargs} | sed " s; \./; ;g @LIBTOOL_MKDEP_SED@ diff --git a/make/rules.in b/make/rules.in index 9a860a3d..5ee44abc 100644 --- a/make/rules.in +++ b/make/rules.in @@ -13,7 +13,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: rules.in,v 1.47.18.12 2007/01/29 23:57:21 marka Exp $ +# $Id: rules.in,v 1.61 2007/03/28 22:36:26 explorer Exp $ ### ### Common Makefile rules for BIND 9. @@ -150,20 +150,38 @@ depend: (cd $$i; ${MAKE} ${MAKEDEFS} DESTDIR="${DESTDIR}" $@) || exit 1; \ fi; \ done - @if [ X"${SRCS}" != X -a X"${PSRCS}" != X ] ; then \ - echo ${MKDEP} ${ALL_CPPFLAGS} ${SRCS}; \ - ${MKDEP} ${ALL_CPPFLAGS} ${SRCS}; \ - echo ${MKDEP} -ap ${ALL_CPPFLAGS} ${PSRCS}; \ - ${MKDEP} -ap ${ALL_CPPFLAGS} ${PSRCS}; \ - ${DEPENDEXTRA} \ - elif [ X"${SRCS}" != X ] ; then \ - echo ${MKDEP} ${ALL_CPPFLAGS} ${SRCS}; \ - ${MKDEP} ${ALL_CPPFLAGS} ${SRCS}; \ - ${DEPENDEXTRA} \ - elif [ X"${PSRCS}" != X ] ; then \ - echo ${MKDEP} ${ALL_CPPFLAGS} ${PSRCS}; \ - ${MKDEP} -p ${ALL_CPPFLAGS} ${PSRCS}; \ - ${DEPENDEXTRA} \ + @if [ X"${VPATH}" != X ] ; then \ + if [ X"${SRCS}" != X -a X"${PSRCS}" != X ] ; then \ + echo ${MKDEP} -vpath ${VPATH} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \ + ${MKDEP} -vpath ${VPATH} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \ + echo ${MKDEP} -vpath ${VPATH} -ap ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \ + ${MKDEP} -vpath ${VPATH} -ap ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \ + ${DEPENDEXTRA} \ + elif [ X"${SRCS}" != X ] ; then \ + echo ${MKDEP} -vpath ${VPATH} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \ + ${MKDEP} -vpath ${VPATH} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \ + ${DEPENDEXTRA} \ + elif [ X"${PSRCS}" != X ] ; then \ + echo ${MKDEP} -vpath ${VPATH} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \ + ${MKDEP} -vpath ${VPATH} -p ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \ + ${DEPENDEXTRA} \ + fi \ + else \ + if [ X"${SRCS}" != X -a X"${PSRCS}" != X ] ; then \ + echo ${MKDEP} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \ + ${MKDEP} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \ + echo ${MKDEP} -ap ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \ + ${MKDEP} -ap ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \ + ${DEPENDEXTRA} \ + elif [ X"${SRCS}" != X ] ; then \ + echo ${MKDEP} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \ + ${MKDEP} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${SRCS}; \ + ${DEPENDEXTRA} \ + elif [ X"${PSRCS}" != X ] ; then \ + echo ${MKDEP} ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \ + ${MKDEP} -p ${ALL_CPPFLAGS} ${ALL_CFLAGS} ${PSRCS}; \ + ${DEPENDEXTRA} \ + fi \ fi FORCE: |