From 6cf7c715fdbc30d4e074c1abd19c21346a52fb6a Mon Sep 17 00:00:00 2001 From: Mar Andrews Date: Sat, 17 Nov 2012 09:33:46 +0000 Subject: [PATCH] 3420. [bug] Address VPATH compilation issues. [RT #31879] --- CHANGES | 2 ++ bin/named/Makefile.in | 3 +++ configure | 10 +++++++++- configure.in | 10 +++++++++- lib/export/isc/nls/Makefile.in | 2 ++ lib/export/isc/nothreads/Makefile.in | 2 ++ lib/export/isc/pthreads/Makefile.in | 2 ++ lib/export/isc/unix/Makefile.in | 2 ++ make/rules.in | 10 +++++----- unit/unittest.sh.in | 2 +- 10 files changed, 37 insertions(+), 8 deletions(-) diff --git a/CHANGES b/CHANGES index fa5c0a3bcc..ad29563bb1 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +3420. [bug] Address VPATH compilation issues. [RT #31879] + 3419. [bug] Memory leak on validation cancel. [RT #31869] 3415. [bug] named could die with a REQUIRE failure if a valdation diff --git a/bin/named/Makefile.in b/bin/named/Makefile.in index 1ca21e8bf7..d02ec000ee 100644 --- a/bin/named/Makefile.in +++ b/bin/named/Makefile.in @@ -171,3 +171,6 @@ install:: named@EXEEXT@ lwresd@EXEEXT@ installdirs ${INSTALL_DATA} ${srcdir}/named.conf.5 ${DESTDIR}${mandir}/man5 @DLZ_DRIVER_RULES@ + +named-symtbl.@O@: named-symtbl.c + ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -c named-symtbl.c diff --git a/configure b/configure index 212f00fcdc..5c2e1752e2 100755 --- a/configure +++ b/configure @@ -29254,7 +29254,15 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} case $ac_file$ac_mode in - "atf-config":C) cd unit/atf-src; ${SHELL} ./configure MISSING=: --prefix $atfdir; cd ../.. ;; + "atf-config":C) ( + mkdir -p unit/atf-src; + cd unit/atf-src; + case "$srcdir" in + /*) ;; + *) srcdir="../../$srcdir";; + esac + ${SHELL} ${srcdir}${srcdir:+/unit/atf-src/}./configure MISSING=: --prefix $atfdir; + ) ;; "chmod":C) chmod a+x isc-config.sh doc/doxygen/doxygen-input-filter ;; esac diff --git a/configure.in b/configure.in index 0d6adfe70f..f97c6b55d4 100644 --- a/configure.in +++ b/configure.in @@ -3138,7 +3138,15 @@ if test "$atf" = yes; then ATFBUILD=atf-src AC_SUBST(ATFBUILD) AC_CONFIG_COMMANDS([atf-config], - [cd unit/atf-src; ${SHELL} ./configure MISSING=: --prefix $atfdir; cd ../..], + [( + mkdir -p unit/atf-src; + cd unit/atf-src; + case "$srcdir" in + /*) ;; + *) srcdir="../../$srcdir";; + esac + ${SHELL} ${srcdir}${srcdir:+/unit/atf-src/}./configure MISSING=: --prefix $atfdir; + ) ], [atfdir=`pwd`/unit/atf]) AC_MSG_RESULT(building ATF from bind9/unit/atf-src) fi diff --git a/lib/export/isc/nls/Makefile.in b/lib/export/isc/nls/Makefile.in index 25156854d1..16a6a863c6 100644 --- a/lib/export/isc/nls/Makefile.in +++ b/lib/export/isc/nls/Makefile.in @@ -16,10 +16,12 @@ top_srcdir = @top_srcdir@ srcdir = @top_srcdir@/lib/isc/nls +export_srcdir = @top_srcdir@/lib/export @BIND9_MAKE_INCLUDES@ CINCLUDES = -I${srcdir}/unix/include \ + -I${export_srcdir}/isc/include \ ${ISC_INCLUDES} CDEFINES = diff --git a/lib/export/isc/nothreads/Makefile.in b/lib/export/isc/nothreads/Makefile.in index 994da6362c..464099399c 100644 --- a/lib/export/isc/nothreads/Makefile.in +++ b/lib/export/isc/nothreads/Makefile.in @@ -16,11 +16,13 @@ top_srcdir = @top_srcdir@ srcdir = @top_srcdir@/lib/isc/nothreads +export_srcdir = @top_srcdir@/lib/export @BIND9_MAKE_INCLUDES@ CINCLUDES = -I${srcdir}/include \ -I${srcdir}/../unix/include \ + -I${export_srcdir}/isc/include \ -I../include \ -I${srcdir}/../include \ -I${srcdir}/.. diff --git a/lib/export/isc/pthreads/Makefile.in b/lib/export/isc/pthreads/Makefile.in index f08e5c630b..80c5e3bb20 100644 --- a/lib/export/isc/pthreads/Makefile.in +++ b/lib/export/isc/pthreads/Makefile.in @@ -16,11 +16,13 @@ top_srcdir = @top_srcdir@ srcdir = @top_srcdir@/lib/isc/pthreads +export_srcdir = @top_srcdir@/lib/export @BIND9_MAKE_INCLUDES@ CINCLUDES = -I${srcdir}/include \ -I${srcdir}/../unix/include \ + -I${export_srcdir}/isc/include \ -I../include \ -I${srcdir}/../include \ -I${srcdir}/.. diff --git a/lib/export/isc/unix/Makefile.in b/lib/export/isc/unix/Makefile.in index f5cf7e86ca..18732028ec 100644 --- a/lib/export/isc/unix/Makefile.in +++ b/lib/export/isc/unix/Makefile.in @@ -16,11 +16,13 @@ top_srcdir = @top_srcdir@ srcdir = @top_srcdir@/lib/isc/unix +export_srcdir = @top_srcdir@/lib/export @BIND9_MAKE_INCLUDES@ CINCLUDES = -I${srcdir}/include \ -I${srcdir}/../@ISC_THREAD_DIR@/include \ + -I${export_srcdir}/isc/include \ -I../include \ -I${srcdir}/../include \ -I${srcdir}/.. diff --git a/make/rules.in b/make/rules.in index cd4cf4f79e..ae02766604 100644 --- a/make/rules.in +++ b/make/rules.in @@ -193,24 +193,24 @@ MKDEP = ${SHELL} ${top_builddir}/make/mkdep ### See bin/check/Makefile.in for a complete example of the use of LIBS0. ### FINALBUILDCMD = if [ X"${MKSYMTBL_PROGRAM}" = X -o X"$${MAKE_SYMTABLE:-${ALWAYS_MAKE_SYMTABLE}}" = X ] ; then \ - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} \ + ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \ -o $@ $${BASEOBJS} $${LIBS0} ${LIBS}; \ else \ rm -f $@tmp0; \ - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} \ + ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \ -o $@tmp0 $${BASEOBJS} $${LIBS0} ${LIBS} || exit 1; \ rm -f $@-symtbl.c $@-symtbl.@O@; \ ${MKSYMTBL_PROGRAM} ${top_srcdir}/util/mksymtbl.pl \ -o $@-symtbl.c $@tmp0 || exit 1; \ $(MAKE) $@-symtbl.@O@ || exit 1; \ rm -f $@tmp1; \ - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} \ + ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \ -o $@tmp1 $${BASEOBJS} $@-symtbl.@O@ $${LIBS0} ${NOSYMLIBS} || exit 1; \ rm -f $@-symtbl.c $@-symtbl.@O@; \ ${MKSYMTBL_PROGRAM} ${top_srcdir}/util/mksymtbl.pl \ -o $@-symtbl.c $@tmp1 || exit 1; \ $(MAKE) $@-symtbl.@O@ || exit 1; \ - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} \ + ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} ${LDFLAGS} \ -o $@tmp2 $${BASEOBJS} $@-symtbl.@O@ $${LIBS0} ${NOSYMLIBS}; \ ${MKSYMTBL_PROGRAM} ${top_srcdir}/util/mksymtbl.pl \ -o $@-symtbl2.c $@tmp2; \ @@ -223,7 +223,7 @@ FINALBUILDCMD = if [ X"${MKSYMTBL_PROGRAM}" = X -o X"$${MAKE_SYMTABLE:-${ALWAYS_ ${MKSYMTBL_PROGRAM} ${top_srcdir}/util/mksymtbl.pl \ -o $@-symtbl.c $@tmp2 || exit 1; \ $(MAKE) $@-symtbl.@O@ || exit 1; \ - ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} \ + ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${ALL_CFLAGS} \ ${LDFLAGS} -o $@tmp2 $${BASEOBJS} $@-symtbl.@O@ \ $${LIBS0} ${NOSYMLIBS}; \ ${MKSYMTBL_PROGRAM} ${top_srcdir}/util/mksymtbl.pl \ diff --git a/unit/unittest.sh.in b/unit/unittest.sh.in index 356d2c8833..24d2006791 100644 --- a/unit/unittest.sh.in +++ b/unit/unittest.sh.in @@ -20,7 +20,7 @@ PATH=${PATH}:@ATFBIN@ export PATH status=0 -if [ -n "@ATFBIN@" ] +if [ -n "@ATFBIN@" -a -f Atffile ] then echo "I: unit tests" atf-run > atf.out