Don't expose BIND libraries and their headers to the public by default,

but have a knob (WANT_BIND_LIBS) to build and install them in /usr/lib
and /usr/include.  Rumors are that this may be useful at a later point,
let's see.

What this really means is that all BIND libraries are now internal to
buildworld (by default, unless WANT_BIND_LIBS is defined), and linked
statically into various BIND executables.

While here, removed redundant -I's from CFLAGS in lib/bind makefiles.

Sponsored by:	des
OK'ed by:	dougb
This commit is contained in:
ru 2004-09-24 13:42:00 +00:00
parent 5586535f4c
commit ed405e2415
20 changed files with 94 additions and 32 deletions

View File

@ -1,9 +1,14 @@
# $FreeBSD$
BIND_DIR= ${.CURDIR}/../../../contrib/bind9
LIB_BIND_DIR= ${.CURDIR}/..
LIB_BIND_REL= ..
LIB_BIND_DIR= ${.CURDIR}/${LIB_BIND_REL}
SRCDIR= ${BIND_DIR}/lib/bind
# XXX These should come before -I's from config.mk.
CFLAGS+= -I${SRCDIR}/port/freebsd/include -I${SRCDIR}/include
CFLAGS+= -I${.CURDIR}
.include "${LIB_BIND_DIR}/config.mk"
LIB= bind
@ -57,12 +62,10 @@ SRCS+= herror.c res_comp.c res_data.c \
res_mkquery.c res_mkupdate.c res_query.c \
res_send.c res_sendsigned.c res_update.c
CFLAGS+= -I${SRCDIR}/port/freebsd/include -I${SRCDIR}/include
CFLAGS+= -I${.CURDIR} -I${.CURDIR}/..
DPADD= ${PTHREAD_DPADD}
LDADD= ${PTHREAD_LDADD}
#.if defined(WANT_BIND_LIBS)
#INCS= ${SRCDIR}/include/isc/assertions.h \
# ${SRCDIR}/include/isc/ctl.h \
# ${SRCDIR}/include/isc/dst.h \
@ -76,5 +79,6 @@ LDADD= ${PTHREAD_LDADD}
# ${SRCDIR}/include/isc/tree.h
#
#INCSDIR= ${INCLUDEDIR}/isc
#.endif
.include <bsd.lib.mk>

View File

@ -1,7 +1,8 @@
# $FreeBSD$
BIND_DIR= ${.CURDIR}/../../../contrib/bind9
LIB_BIND_DIR= ${.CURDIR}/..
LIB_BIND_REL= ..
LIB_BIND_DIR= ${.CURDIR}/${LIB_BIND_REL}
SRCDIR= ${BIND_DIR}/lib/bind9
.include "${LIB_BIND_DIR}/config.mk"
@ -11,15 +12,17 @@ LIB= bind9
.PATH: ${SRCDIR}
SRCS= check.c getaddresses.c version.c
CFLAGS+= -I${SRCDIR}/include -I${.CURDIR} -I${.CURDIR}/..
CFLAGS+= -I${SRCDIR}/include
DPADD= ${PTHREAD_DPADD}
LDADD= ${PTHREAD_LDADD}
.if defined(WANT_BIND_LIBS)
INCS= ${SRCDIR}/include/bind9/check.h \
${SRCDIR}/include/bind9/getaddresses.h \
${SRCDIR}/include/bind9/version.h
INCSDIR= ${INCLUDEDIR}/bind9
.endif
.include <bsd.lib.mk>

View File

@ -13,10 +13,14 @@ CFLAGS+= -DHAVE_CONFIG_H
.if defined(SRCDIR) && exists(${SRCDIR}/api)
.include "${SRCDIR}/api"
CFLAGS+= -DLIBINTERFACE=${LIBINTERFACE}
SHLIB_MAJOR= ${LIBINTERFACE}
CFLAGS+= -DLIBREVISION=${LIBREVISION}
SHLIB_MINOR= ${LIBINTERFACE}
CFLAGS+= -DLIBAGE=${LIBAGE}
.if defined(WANT_BIND_LIBS)
SHLIB_MAJOR= ${LIBINTERFACE}
SHLIB_MINOR= ${LIBINTERFACE}
.else
INTERNALLIB= YES
.endif
.endif
# GSSAPI support is incomplete in 9.3.0
@ -57,9 +61,34 @@ CFLAGS+= -I${LIB_BIND_DIR}
.endif
# Link against BIND libraries
.if !defined(WANT_BIND_LIBS)
LIBBIND9= ${LIB_BIND_REL}/bind9/libbind9.a
CFLAGS+= -I${BIND_DIR}/lib/bind9/include
LIBDNS= ${LIB_BIND_REL}/dns/libdns.a
CFLAGS+= -I${BIND_DIR}/lib/dns/sec/dst/include \
-I${BIND_DIR}/lib/dns/include \
-I${LIB_BIND_DIR}/dns
LIBISCCC= ${LIB_BIND_REL}/isccc/libisccc.a
CFLAGS+= -I${BIND_DIR}/lib/isccc/include
LIBISCCFG= ${LIB_BIND_REL}/isccfg/libisccfg.a
CFLAGS+= -I${BIND_DIR}/lib/isccfg/include
LIBISC= ${LIB_BIND_REL}/isc/libisc.a
CFLAGS+= -I${BIND_DIR}/lib/isc/unix/include \
-I${BIND_DIR}/lib/isc/pthreads/include \
-I${BIND_DIR}/lib/isc/include \
-I${LIB_BIND_DIR}/isc
LIBLWRES= ${LIB_BIND_REL}/lwres/liblwres.a
CFLAGS+= -I${BIND_DIR}/lib/lwres/unix/include \
-I${BIND_DIR}/lib/lwres/include \
-I${LIB_BIND_DIR}/lwres
.endif
BIND_DPADD= ${LIBBIND9} ${LIBDNS} ${LIBISCCC} ${LIBISCCFG} \
${LIBISC} ${LIBLWRES}
.if defined(WANT_BIND_LIBS)
BIND_LDADD= -lbind9 -ldns -lisccc -lisccfg -lisc -llwres
.else
BIND_LDADD= ${BIND_DPADD}
.endif
# Link against crypto library
.if !defined(NOCRYPT)

View File

@ -1,7 +1,8 @@
# $FreeBSD$
BIND_DIR= ${.CURDIR}/../../../contrib/bind9
LIB_BIND_DIR= ${.CURDIR}/..
LIB_BIND_REL= ..
LIB_BIND_DIR= ${.CURDIR}/${LIB_BIND_REL}
SRCDIR= ${BIND_DIR}/lib/dns
.include "${LIB_BIND_DIR}/config.mk"
@ -34,11 +35,12 @@ SRCS+= acl.c adb.c byaddr.c \
version.c view.c xfrin.c zone.c zonekey.c zt.c
CFLAGS+= -I${SRCDIR}/sec/dst/include -I${SRCDIR}/include -I${SRCDIR}
CFLAGS+= -I${.CURDIR} -I${.CURDIR}/..
CFLAGS+= -I${.CURDIR}
DPADD= ${CRYPTO_DPADD} ${PTHREAD_DPADD}
LDADD= ${CRYPTO_LDADD} ${PTHREAD_LDADD}
.if defined(WANT_BIND_LIBS)
DNSINCS= ${SRCDIR}/include/dns/acl.h \
${SRCDIR}/include/dns/adb.h \
${SRCDIR}/include/dns/bit.h \
@ -121,6 +123,7 @@ DSTINCS= ${SRCDIR}/sec/dst/include/dst/dst.h \
DSTINCSDIR= ${INCLUDEDIR}/dst
INCSGROUPS= DNSINCS DSTINCS
.endif
.if defined(MAINTAINER_MODE)
generate: ${.CURDIR}/dns/enumtype.h ${.CURDIR}/dns/enumclass.h \

View File

@ -1,7 +1,8 @@
# $FreeBSD$
BIND_DIR= ${.CURDIR}/../../../contrib/bind9
LIB_BIND_DIR= ${.CURDIR}/..
LIB_BIND_REL= ..
LIB_BIND_DIR= ${.CURDIR}/${LIB_BIND_REL}
SRCDIR= ${BIND_DIR}/lib/isc
.include "${LIB_BIND_DIR}/config.mk"
@ -35,11 +36,12 @@ SRCS+= inet_pton.c \
symtab.c task.c taskpool.c timer.c version.c
CFLAGS+= -I${SRCDIR}/unix/include -I${SRCDIR}/pthreads/include
CFLAGS+= -I${SRCDIR}/include -I${.CURDIR} -I${.CURDIR}/..
CFLAGS+= -I${SRCDIR}/include -I${.CURDIR}
DPADD= ${PTHREAD_DPADD}
LDADD= ${PTHREAD_LDADD}
.if defined(WANT_BIND_LIBS)
INCS= ${SRCDIR}/include/isc/app.h \
${SRCDIR}/include/isc/assertions.h \
${SRCDIR}/include/isc/base64.h \
@ -120,5 +122,6 @@ INCS= ${SRCDIR}/include/isc/app.h \
isc/platform.h
INCSDIR= ${INCLUDEDIR}/isc
.endif
.include <bsd.lib.mk>

View File

@ -1,7 +1,8 @@
# $FreeBSD$
BIND_DIR= ${.CURDIR}/../../../contrib/bind9
LIB_BIND_DIR= ${.CURDIR}/..
LIB_BIND_REL= ..
LIB_BIND_DIR= ${.CURDIR}/${LIB_BIND_REL}
SRCDIR= ${BIND_DIR}/lib/isccc
.include "${LIB_BIND_DIR}/config.mk"
@ -13,11 +14,12 @@ SRCS= alist.c base64.c cc.c ccmsg.c \
lib.c \
result.c sexpr.c symtab.c version.c
CFLAGS+= -I${SRCDIR}/include -I${.CURDIR} -I${.CURDIR}/..
CFLAGS+= -I${SRCDIR}/include
DPADD= ${PTHREAD_DPADD}
LDADD= ${PTHREAD_LDADD}
.if defined(WANT_BIND_LIBS)
INCS= ${SRCDIR}/include/isccc/alist.h \
${SRCDIR}/include/isccc/base64.h \
${SRCDIR}/include/isccc/cc.h \
@ -33,5 +35,6 @@ INCS= ${SRCDIR}/include/isccc/alist.h \
${SRCDIR}/include/isccc/version.h
INCSDIR= ${INCLUDEDIR}/isccc
.endif
.include <bsd.lib.mk>

View File

@ -1,7 +1,8 @@
# $FreeBSD$
BIND_DIR= ${.CURDIR}/../../../contrib/bind9
LIB_BIND_DIR= ${.CURDIR}/..
LIB_BIND_REL= ..
LIB_BIND_DIR= ${.CURDIR}/${LIB_BIND_REL}
SRCDIR= ${BIND_DIR}/lib/isccfg
.include "${LIB_BIND_DIR}/config.mk"
@ -11,11 +12,12 @@ LIB= isccfg
.PATH: ${SRCDIR}
SRCS= log.c namedconf.c parser.c version.c
CFLAGS+= -I${SRCDIR}/include -I${.CURDIR} -I${.CURDIR}/..
CFLAGS+= -I${SRCDIR}/include -I${.CURDIR}
DPADD= ${PTHREAD_DPADD}
LDADD= ${PTHREAD_LDADD}
.if defined(WANT_BIND_LIBS)
INCS= ${SRCDIR}/include/isccfg/cfg.h \
${SRCDIR}/include/isccfg/grammar.h \
${SRCDIR}/include/isccfg/log.h \
@ -23,5 +25,6 @@ INCS= ${SRCDIR}/include/isccfg/cfg.h \
${SRCDIR}/include/isccfg/version.h
INCSDIR= ${INCLUDEDIR}/isccfg
.endif
.include <bsd.lib.mk>

View File

@ -1,7 +1,8 @@
# $FreeBSD$
BIND_DIR= ${.CURDIR}/../../../contrib/bind9
LIB_BIND_DIR= ${.CURDIR}/..
LIB_BIND_REL= ..
LIB_BIND_DIR= ${.CURDIR}/${LIB_BIND_REL}
SRCDIR= ${BIND_DIR}/lib/lwres
.include "${LIB_BIND_DIR}/config.mk"
@ -16,11 +17,12 @@ SRCS+= context.c gai_strerror.c getaddrinfo.c gethost.c \
lwinetaton.c lwinetpton.c lwinetntop.c print.c
CFLAGS+= -I${SRCDIR}/unix/include -I${SRCDIR}/include
CFLAGS+= -I${.CURDIR} -I${.CURDIR}/..
CFLAGS+= -I${.CURDIR}
DPADD= ${PTHREAD_DPADD}
LDADD= ${PTHREAD_LDADD}
.if defined(WANT_BIND_LIBS)
INCS= ${SRCDIR}/include/lwres/context.h \
${SRCDIR}/include/lwres/int.h \
${SRCDIR}/include/lwres/ipv6.h \
@ -36,5 +38,6 @@ INCS= ${SRCDIR}/include/lwres/context.h \
lwres/platform.h
INCSDIR= ${INCLUDEDIR}/lwres
.endif
.include <bsd.lib.mk>

View File

@ -14,7 +14,7 @@ LIBALIAS?= ${DESTDIR}${LIBDIR}/libalias.a
LIBARCHIVE?= ${DESTDIR}${LIBDIR}/libarchive.a
LIBASN1?= ${DESTDIR}${LIBDIR}/libasn1.a
LIBATM?= ${DESTDIR}${LIBDIR}/libatm.a
.if !defined(NO_BIND)
.if !defined(NO_BIND) && defined(WANT_BIND_LIBS)
LIBBIND?= ${DESTDIR}${LIBDIR}/libbind.a
LIBBIND9?= ${DESTDIR}${LIBDIR}/libbind9.a
.endif
@ -52,7 +52,7 @@ LIBHDB?= ${DESTDIR}${LIBDIR}/libhdb.a
LIBHISTORY?= ${DESTDIR}${LIBDIR}/libhistory.a
LIBIPSEC?= ${DESTDIR}${LIBDIR}/libipsec.a
LIBIPX?= ${DESTDIR}${LIBDIR}/libipx.a
.if !defined(NO_BIND)
.if !defined(NO_BIND) && defined(WANT_BIND_LIBS)
LIBISC?= ${DESTDIR}${LIBDIR}/libisc.a
LIBISCCC?= ${DESTDIR}${LIBDIR}/libisccc.a
LIBISCCFG?= ${DESTDIR}${LIBDIR}/libisccfg.a
@ -66,7 +66,7 @@ LIBKRB5?= ${DESTDIR}${LIBDIR}/libkrb5.a
LIBKVM?= ${DESTDIR}${LIBDIR}/libkvm.a
LIBL?= ${DESTDIR}${LIBDIR}/libl.a
LIBLN?= "don't use LIBLN, use LIBL"
.if !defined(NO_BIND)
.if !defined(NO_BIND) && defined(WANT_BIND_LIBS)
LIBLWRES?= ${DESTDIR}${LIBDIR}/liblwres.a
.endif
LIBM?= ${DESTDIR}${LIBDIR}/libm.a

View File

@ -1,7 +1,8 @@
# $FreeBSD$
BIND_DIR= ${.CURDIR}/../../contrib/bind9
LIB_BIND_DIR= ${.CURDIR}/../../lib/bind
LIB_BIND_REL= ../../lib/bind
LIB_BIND_DIR= ${.CURDIR}/${LIB_BIND_REL}
SRCDIR= ${BIND_DIR}/bin/dig
.include "${LIB_BIND_DIR}/config.mk"

View File

@ -1,7 +1,8 @@
# $FreeBSD$
BIND_DIR= ${.CURDIR}/../../contrib/bind9
LIB_BIND_DIR= ${.CURDIR}/../../lib/bind
LIB_BIND_REL= ../../lib/bind
LIB_BIND_DIR= ${.CURDIR}/${LIB_BIND_REL}
SRCDIR= ${BIND_DIR}/bin/dig
.include "${LIB_BIND_DIR}/config.mk"

View File

@ -1,7 +1,8 @@
# $FreeBSD$
BIND_DIR= ${.CURDIR}/../../contrib/bind9
LIB_BIND_DIR= ${.CURDIR}/../../lib/bind
LIB_BIND_REL= ../../lib/bind
LIB_BIND_DIR= ${.CURDIR}/${LIB_BIND_REL}
SRCDIR= ${BIND_DIR}/bin/dig
.include "${LIB_BIND_DIR}/config.mk"

View File

@ -1,7 +1,8 @@
# $FreeBSD$
BIND_DIR= ${.CURDIR}/../../contrib/bind9
LIB_BIND_DIR= ${.CURDIR}/../../lib/bind
LIB_BIND_REL= ../../lib/bind
LIB_BIND_DIR= ${.CURDIR}/${LIB_BIND_REL}
SRCDIR= ${BIND_DIR}/bin/nsupdate
.include "${LIB_BIND_DIR}/config.mk"

View File

@ -1,7 +1,8 @@
# $FreeBSD$
BIND_DIR= ${.CURDIR}/../../contrib/bind9
LIB_BIND_DIR= ${.CURDIR}/../../lib/bind
LIB_BIND_REL= ../../lib/bind
LIB_BIND_DIR= ${.CURDIR}/${LIB_BIND_REL}
SRCDIR= ${BIND_DIR}/bin/dnssec
.include "${LIB_BIND_DIR}/config.mk"

View File

@ -1,7 +1,8 @@
# $FreeBSD$
BIND_DIR= ${.CURDIR}/../../contrib/bind9
LIB_BIND_DIR= ${.CURDIR}/../../lib/bind
LIB_BIND_REL= ../../lib/bind
LIB_BIND_DIR= ${.CURDIR}/${LIB_BIND_REL}
SRCDIR= ${BIND_DIR}/bin/dnssec
.include "${LIB_BIND_DIR}/config.mk"

View File

@ -1,7 +1,8 @@
# $FreeBSD$
BIND_DIR= ${.CURDIR}/../../contrib/bind9
LIB_BIND_DIR= ${.CURDIR}/../../lib/bind
LIB_BIND_REL= ../../lib/bind
LIB_BIND_DIR= ${.CURDIR}/${LIB_BIND_REL}
SRCDIR= ${BIND_DIR}/bin/check
.include "${LIB_BIND_DIR}/config.mk"

View File

@ -1,7 +1,8 @@
# $FreeBSD$
BIND_DIR= ${.CURDIR}/../../contrib/bind9
LIB_BIND_DIR= ${.CURDIR}/../../lib/bind
LIB_BIND_REL= ../../lib/bind
LIB_BIND_DIR= ${.CURDIR}/${LIB_BIND_REL}
SRCDIR= ${BIND_DIR}/bin/check
.include "${LIB_BIND_DIR}/config.mk"

View File

@ -1,7 +1,8 @@
# $FreeBSD$
BIND_DIR= ${.CURDIR}/../../contrib/bind9
LIB_BIND_DIR= ${.CURDIR}/../../lib/bind
LIB_BIND_REL= ../../lib/bind
LIB_BIND_DIR= ${.CURDIR}/${LIB_BIND_REL}
SRCDIR= ${BIND_DIR}/bin/named
.include "${LIB_BIND_DIR}/config.mk"

View File

@ -1,7 +1,8 @@
# $FreeBSD$
BIND_DIR= ${.CURDIR}/../../contrib/bind9
LIB_BIND_DIR= ${.CURDIR}/../../lib/bind
LIB_BIND_REL= ../../lib/bind
LIB_BIND_DIR= ${.CURDIR}/${LIB_BIND_REL}
SRCDIR= ${BIND_DIR}/bin/rndc
.include "${LIB_BIND_DIR}/config.mk"

View File

@ -1,7 +1,8 @@
# $FreeBSD$
BIND_DIR= ${.CURDIR}/../../contrib/bind9
LIB_BIND_DIR= ${.CURDIR}/../../lib/bind
LIB_BIND_REL= ../../lib/bind
LIB_BIND_DIR= ${.CURDIR}/${LIB_BIND_REL}
SRCDIR= ${BIND_DIR}/bin/rndc
.include "${LIB_BIND_DIR}/config.mk"