Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/bind Improve how the various helper libraries are a...
details: https://anonhg.NetBSD.org/src/rev/2ae2a4c2617a
branches: trunk
changeset: 566883:2ae2a4c2617a
user: lukem <lukem%NetBSD.org@localhost>
date: Sun May 23 03:16:40 2004 +0000
description:
Improve how the various helper libraries are added to LDADD/DPADD, including
supporting caching the OBJDIRS (via .MAKEOVERRIDES) to speed up subdir makes.
(Based on similar work in gnu/usr.sbin/postfix)
diffstat:
usr.sbin/bind/Makefile | 4 +++-
usr.sbin/bind/Makefile.inc | 39 ++++++++++++++++-----------------------
2 files changed, 19 insertions(+), 24 deletions(-)
diffs (83 lines):
diff -r 22a86a927d34 -r 2ae2a4c2617a usr.sbin/bind/Makefile
--- a/usr.sbin/bind/Makefile Sun May 23 02:49:26 2004 +0000
+++ b/usr.sbin/bind/Makefile Sun May 23 03:16:40 2004 +0000
@@ -1,6 +1,8 @@
-# $NetBSD: Makefile,v 1.12 2004/05/19 10:29:21 itojun Exp $
+# $NetBSD: Makefile,v 1.13 2004/05/23 03:16:40 lukem Exp $
SUBDIR= libbind9 libdns libisc libisccc libisccfg liblwres .WAIT \
dig host named nslookup nsupdate rndc rndc-confgen
+.include "Makefile.inc"
+
.include <bsd.subdir.mk>
diff -r 22a86a927d34 -r 2ae2a4c2617a usr.sbin/bind/Makefile.inc
--- a/usr.sbin/bind/Makefile.inc Sun May 23 02:49:26 2004 +0000
+++ b/usr.sbin/bind/Makefile.inc Sun May 23 03:16:40 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.17 2004/05/23 02:49:26 lukem Exp $
+# $NetBSD: Makefile.inc,v 1.18 2004/05/23 03:16:40 lukem Exp $
.if !defined(BIND9_MAKEFILE_INC)
BIND9_MAKEFILE_INC=yes
@@ -9,14 +9,15 @@
.include <bsd.own.mk>
-IDIST= ${NETBSDSRCDIR}/dist/bind
+IDIST= ${NETBSDSRCDIR}/dist/bind
+BIND_SRCDIR= ${NETBSDSRCDIR}/usr.sbin/bind
.include "${IDIST}/version"
VERSION=${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}
SYSCONFDIR=/etc
LOCALSTATEDIR=/var
-CPPFLAGS+=-I${.CURDIR}/../include \
+CPPFLAGS+=-I${BIND_SRCDIR}/include \
-I${IDIST}/lib/dns/include -I${IDIST}/lib/dns/unix/include \
-I${IDIST}/lib/isc/include -I${IDIST}/lib/isc/unix/include \
-I${IDIST}/lib/bind9/include \
@@ -28,30 +29,22 @@
-DNS_SYSCONFDIR=\"${SYSCONFDIR}\" \
-DVERSION=\"${VERSION}\"
-.if !defined(LIB) || empty(LIB)
-LIBBIND9OBJDIR!=cd ${.CURDIR}/../libbind9 && ${PRINTOBJDIR}
-LDADD+= -L${LIBBIND9OBJDIR} -lbind9
-DPADD+= ${LIBBIND9OBJDIR}/libbind9.a
-LIBDNSOBJDIR!=cd ${.CURDIR}/../libdns && ${PRINTOBJDIR}
-LDADD+= -L${LIBDNSOBJDIR} -ldns
-DPADD+= ${LIBDNSOBJDIR}/libdns.a
-LIBLWRESOBJDIR!=cd ${.CURDIR}/../liblwres && ${PRINTOBJDIR}
-LDADD+= -L${LIBLWRESOBJDIR} -llwres
-DPADD+= ${LIBLWRESOBJDIR}/liblwres.a
-LIBISCCFGOBJDIR!=cd ${.CURDIR}/../libisccfg && ${PRINTOBJDIR}
-LDADD+= -L${LIBISCCFGOBJDIR} -lisccfg
-DPADD+= ${LIBISCCFGOBJDIR}/libisccfg.a
-LIBISCCCOBJDIR!=cd ${.CURDIR}/../libisccc && ${PRINTOBJDIR}
-LDADD+= -L${LIBISCCCOBJDIR} -lisccc
-DPADD+= ${LIBISCCCOBJDIR}/libisccc.a
-LIBISCOBJDIR!=cd ${.CURDIR}/../libisc && ${PRINTOBJDIR}
-LDADD+= -L${LIBISCOBJDIR} -lisc
-DPADD+= ${LIBISCOBJDIR}/libisc.a
+.if !defined(LIB) || empty(LIB) # {
+# NOTE: the order of these libraries is important...
+.for _LL in bind9 dns lwres isccfg isccc isc
+.if !defined(BOBJDIR.${_LL})
+BOBJDIR.${_LL}!=cd ${BIND_SRCDIR}/lib${_LL} && ${PRINTOBJDIR}
+.MAKEOVERRIDES+=BOBJDIR.${_LL}
+.endif
+LDADD+= -L${BOBJDIR.${_LL}} -l${_LL}
+DPADD+= ${BOBJDIR.${_LL}}/lib${_LL}.a
+.endfor
+
.if ${NAMED_USE_PTHREADS} == "yes"
LDADD+= -lpthread
DPADD+= ${LIBPTHREAD}
.endif
-.else
+.else # }
MKPRIVATELIB=yes
CPPFLAGS+= -DLIBINTERFACE=${LIBINTERFACE} \
-DLIBREVISION=${LIBREVISION} -DLIBAGE=${LIBAGE}
Home |
Main Index |
Thread Index |
Old Index