summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorFrancis Dupont <fdupont@isc.org>2015-04-14 12:44:29 +0200
committerFrancis Dupont <fdupont@isc.org>2015-04-14 12:44:29 +0200
commit6913a589b97fc5d035a0285e7b4b4a702c3452cf (patch)
tree62a703afdee72239c655e7d00e6fd4c5118c56cc /util
parentcba7bc1cf3d0fa3e6efb108675743ba405610abd (diff)
downloadisc-dhcp-6913a589b97fc5d035a0285e7b4b4a702c3452cf.tar.gz
new config option: build ATF stuff from bind [#38754]
Diffstat (limited to 'util')
-rw-r--r--util/Makefile.bind.in (renamed from util/Makefile.bind)48
-rw-r--r--util/bind.sh2
-rw-r--r--util/bindcus.sh39
-rw-r--r--util/bindlib.sh58
4 files changed, 34 insertions, 113 deletions
diff --git a/util/Makefile.bind b/util/Makefile.bind.in
index bd68319e..f972c71a 100644
--- a/util/Makefile.bind
+++ b/util/Makefile.bind.in
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2009-2012 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2009-2012, 2015 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
@@ -13,14 +13,12 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.bind,v 1.8 2012/04/05 22:16:47 sar Exp $
-
# Configure and build the bind libraries for use by DHCP
include ./version.tmp
version=${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}
-# bindvar.tmp is constructed by configure, it has the paths for
+# bindvar.tmp is constructed by configure, it has the paths for bind
# if GMAKE is blank the shell script couldn't find a gmake to use.
# binddir=
# GMAKE=
@@ -28,6 +26,16 @@ include ./bindvar.tmp
bindsrcdir=bind-${version}
+bindconfig = --disable-kqueue --disable-epoll --disable-devpoll
+bindconfig += --without-openssl --without-libxml2 --enable-exportlib
+bindconfig += --enable-threads=no --with-export-includedir=${binddir}/include
+bindconfig += --with-export-libdir=${binddir}/lib --with-gssapi=no
+bindconfig += @BINDCONFIG@
+
+cleandirs = ./lib ./include
+@BIND_ATF_TRUE@cleandirs += ./atf
+cleanfiles = ./configure.log ./build.log ./install.log
+
all:
# Extract the source from the tarball, if it hasn't been already.
@if test -d ${bindsrcdir} ; then \
@@ -42,19 +50,30 @@ all:
fi
# Configure the export libraries
-# Currently disable the epoll and devpoll options as they don't interact
-# well with the DHCP code.
+# Currently disable the epoll, devpoll and kqueue options as they
+# don't interact well with the DHCP code.
# If the top-level Bind Makefile exists we skip the configuration step
# as we assume it's done and won't change. Doing a make clean will
# reset things if necessary.
- @if test -f ${bindsrcdir}/Makefile ; then \
- echo Bind export libraries already configured ; \
- else \
- echo Configuring BIND Export libraries for DHCP. ; \
- rm -rf ./lib ./include ./configure.log ./build.log ./install.log ; \
- (cd ${bindsrcdir} && ./configure --disable-kqueue --disable-epoll --disable-devpoll --without-openssl --without-libxml2 --enable-exportlib --enable-threads=no --with-export-includedir=${binddir}/include --with-export-libdir=${binddir}/lib --with-gssapi=no > ${binddir}/configure.log); \
+ @if test -f ${bindsrcdir}/Makefile ; then \
+ echo Bind export libraries already configured ; \
+ else \
+ echo Configuring BIND Export libraries for DHCP. ; \
+ rm -rf ${cleandirs} ${cleanfiles} ; \
+ (cd ${bindsrcdir} && \
+ ./configure ${bindconfig} > ${binddir}/configure.log); \
fi
+# Build and copy the ATF support if not yet installed.
+@BIND_ATF_TRUE@ @if test -d ./atf ; then \
+@BIND_ATF_TRUE@ echo ATF support already installed ; \
+@BIND_ATF_TRUE@ else \
+@BIND_ATF_TRUE@ echo Building ATF support ; \
+@BIND_ATF_TRUE@ (cd ${bindsrcdir}/unit; \
+@BIND_ATF_TRUE@ MAKE=${GMAKE} ${GMAKE} atf > ${binddir}/build.log ; \
+@BIND_ATF_TRUE@ cp -rp atf ${binddir}) ; \
+@BIND_ATF_TRUE@ fi
+
# Build and install the export libraries
# No need to do anything if we already have something installed.
@if test -d ${binddir}/lib ; then \
@@ -63,7 +82,7 @@ all:
echo Building BIND Export libraries - this takes some time. ;\
(cd ${bindsrcdir}/lib/export ; \
echo building in `pwd` ; \
- MAKE=${GMAKE} ${GMAKE} > ${binddir}/build.log) ; \
+ MAKE=${GMAKE} ${GMAKE} >> ${binddir}/build.log) ; \
\
echo Installing BIND Export libraries to ${binddir}. ; \
(cd ${bindsrcdir}/lib/export ; \
@@ -72,8 +91,7 @@ all:
clean:
@echo Cleaning BIND export library.
- rm -rf ${bindsrcdir} ./lib ./include ./configure.log ./build.log \
- ./install.log
+ rm -rf ${bindsrcdir} ${cleandirs} ${cleanfiles}
# Include the following so that this Makefile is happy when the parent
# tries to use them.
diff --git a/util/bind.sh b/util/bind.sh
index c03639f5..81e4d9a4 100644
--- a/util/bind.sh
+++ b/util/bind.sh
@@ -99,7 +99,7 @@ rm -rf bind
# Make and move to our directory for all things bind
mkdir $binddir
-cp util/Makefile.bind bind/Makefile
+cp util/Makefile.bind.in bind/Makefile.in
cd $binddir
# Get the bind version file and move it to version.tmp
diff --git a/util/bindcus.sh b/util/bindcus.sh
deleted file mode 100644
index 6f0388ac..00000000
--- a/util/bindcus.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
-#
-# Permission to use, copy, modify, and/or 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.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
-# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS. IN NO EVENT SHALL ISC 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.
-
-# $Id: bindcus.sh,v 1.2 2009/10/28 04:12:30 sar Exp $
-
-# Configure and build the bind libraries for use by DHCP
-#
-# Usage: sh bindcus.sh
-#
-# Currently no arguments
-#
-
-
-topdir=`pwd`
-binddir=$topdir/bind
-cd bind
-
-. ./version.tmp
-version=${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}
-bindsrcdir=bind-$version
-
-# Extract the source from the tarball
-gunzip -c bind.tar.gz | tar xf -
-
-# Run the script to build and install the export libraries
-sh $topdir/util/bindlib.sh $binddir $bindsrcdir
diff --git a/util/bindlib.sh b/util/bindlib.sh
deleted file mode 100644
index 23cafef7..00000000
--- a/util/bindlib.sh
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
-#
-# Permission to use, copy, modify, and/or 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.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
-# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS. IN NO EVENT SHALL ISC 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.
-
-# $Id: bindlib.sh,v 1.5 2009/11/19 23:49:57 sar Exp $
-
-# Configure, build and install the bind export libraries for use by DHCP
-#
-# Usage: sh bindlib.sh <bind directory> <bind source directory>
-# The intention is for this script to be called by other scrips
-# (bind.sh or bindcus.sh) rather than be called directly.
-#
-# <bind directory> = directory for bind stuff within DHCP, typically
-# <dhcp>/bind
-#
-# <bind source directory> = directory for the unpacked bind source code
-# typically <dhcp>/bind/bind-<version>
-#
-
-binddir="$1"
-bindsrcdir="$2"
-
-gmake=
-for x in gmake gnumake make; do
- if $x --version 2>/dev/null | grep GNU > /dev/null; then
- gmake=$x
- break;
- fi
-done
-if test -z "$gmake"; then
- echo "unable to find gmake" 1>&2
- exit 1;
-fi
-
-# Configure the export libraries
-# Currently disable the epoll and devpoll options as they don't interact
-# well with the DHCP code.
-cd $bindsrcdir
-./configure --disable-epoll --disable-devpoll --without-openssl --without-libxml2 --enable-exportlib --enable-threads=no --with-export-includedir=$binddir/include --with-export-libdir=$binddir/lib > $binddir/configure.log
-
-# Build the export libraries
-cd lib/export
-MAKE=$gmake $gmake > $binddir/build.log
-
-# Install the libraries and includes
-MAKE=$gmake $gmake install > $binddir/install.log