]>
Commit | Line | Data |
---|---|---|
95bba8b6 | 1 | # |
6913a589 | 2 | # Copyright (C) 2009-2012, 2015 Internet Systems Consortium, Inc. ("ISC") |
95bba8b6 SR |
3 | # |
4 | # Permission to use, copy, modify, and/or distribute this software for any | |
5 | # purpose with or without fee is hereby granted, provided that the above | |
6 | # copyright notice and this permission notice appear in all copies. | |
7 | # | |
8 | # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH | |
9 | # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | |
10 | # AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, | |
11 | # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | |
12 | # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE | |
13 | # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | |
14 | # PERFORMANCE OF THIS SOFTWARE. | |
15 | ||
95bba8b6 SR |
16 | # Configure and build the bind libraries for use by DHCP |
17 | ||
e94e7f23 FD |
18 | binddir=@BINDDIR@ |
19 | bindsrcdir=@BINDSRCDIR@ | |
95bba8b6 | 20 | |
f9e73c18 FD |
21 | prefix = @prefix@ |
22 | exec_prefix = @exec_prefix@ | |
23 | ||
ae91e4db | 24 | bindconfig = --without-openssl --without-libxml2 --without-libjson \ |
c87db1b1 | 25 | --without-gssapi --disable-threads \ |
f9e73c18 | 26 | --includedir=@includedir@ --libdir=@libdir@ \ |
13e5cc6c | 27 | @BINDLT@ @BINDIOMUX@ @BINDCONFIG@ --enable-full-report |
6913a589 | 28 | |
f9e73c18 FD |
29 | @BIND_ATF_FALSE@cleandirs = ./lib ./include |
30 | @BIND_ATF_TRUE@cleandirs = ./lib ./include ./atf | |
6913a589 FD |
31 | cleanfiles = ./configure.log ./build.log ./install.log |
32 | ||
bf6f8fce FD |
33 | # isccfg depends on isccc?! |
34 | bindlibs = isc dns isccc isccfg irs | |
f9e73c18 | 35 | installdirs = includedir=${binddir}/include libdir=${binddir}/lib |
f8137a46 | 36 | |
1b245c91 FD |
37 | @BIND_ATF_FALSE@all: bind1 bind2 |
38 | @BIND_ATF_TRUE@all: bind1 atf bind2 | |
39 | ||
40 | bind1: | |
95bba8b6 | 41 | # Extract the source from the tarball, if it hasn't been already. |
f8137a46 FD |
42 | @if test -d ${bindsrcdir} ; then \ |
43 | echo ${bindsrcdir} already unpacked... ; \ | |
44 | else \ | |
45 | gunzip -c bind.tar.gz | tar xf - ; \ | |
95bba8b6 SR |
46 | fi |
47 | ||
ae91e4db | 48 | # Configure the libraries |
6913a589 FD |
49 | # Currently disable the epoll, devpoll and kqueue options as they |
50 | # don't interact well with the DHCP code. | |
d81e9330 SR |
51 | # If the top-level Bind Makefile exists we skip the configuration step |
52 | # as we assume it's done and won't change. Doing a make clean will | |
53 | # reset things if necessary. | |
6913a589 | 54 | @if test -f ${bindsrcdir}/Makefile ; then \ |
ae91e4db | 55 | echo Bind libraries already configured ; \ |
6913a589 | 56 | else \ |
ae91e4db | 57 | echo Configuring BIND libraries for DHCP. ; \ |
6913a589 FD |
58 | rm -rf ${cleandirs} ${cleanfiles} ; \ |
59 | (cd ${bindsrcdir} && \ | |
60 | ./configure ${bindconfig} > ${binddir}/configure.log); \ | |
d81e9330 | 61 | fi |
95bba8b6 | 62 | |
1b245c91 | 63 | atf: |
6913a589 | 64 | # Build and copy the ATF support if not yet installed. |
f8137a46 FD |
65 | @if test -d ./atf ; then \ |
66 | echo ATF support already installed ; \ | |
67 | else \ | |
68 | echo Building ATF support ; \ | |
69 | (cd ${bindsrcdir}/unit; \ | |
70 | $(MAKE) atf > ${binddir}/build.log ; \ | |
71 | cp -rp atf ${binddir}) ; \ | |
1b245c91 | 72 | fi |
6913a589 | 73 | |
ae91e4db FD |
74 | bind2: |
75 | # Build and install the libraries | |
d81e9330 | 76 | # No need to do anything if we already have something installed. |
ae91e4db FD |
77 | @if test -d ${binddir}/lib ; then \ |
78 | echo Bind libraries already installed ; \ | |
79 | else \ | |
80 | echo Building BIND libraries - this takes some time. ; \ | |
f8137a46 FD |
81 | for libdir in ${bindlibs} ; do \ |
82 | (cd ${bindsrcdir}/lib/$$libdir ; \ | |
83 | echo Building $$libdir library in `pwd` ; \ | |
84 | $(MAKE) >> ${binddir}/build.log) ; \ | |
85 | done ; \ | |
86 | \ | |
ae91e4db | 87 | echo Installing BIND libraries to ${binddir}. ; \ |
f8137a46 FD |
88 | for libdir in ${bindlibs} ; do \ |
89 | (cd ${bindsrcdir}/lib/$$libdir ; \ | |
f9e73c18 FD |
90 | $(MAKE) ${installdirs} install >> \ |
91 | ${binddir}/install.log) ; \ | |
f8137a46 | 92 | done ; \ |
d81e9330 | 93 | fi |
95bba8b6 SR |
94 | |
95 | clean: | |
ae91e4db | 96 | @echo Cleaning BIND library. |
6913a589 | 97 | rm -rf ${bindsrcdir} ${cleandirs} ${cleanfiles} |
95bba8b6 | 98 | |
f9741514 FD |
99 | @INSTALL_BIND_FALSE@install: |
100 | @INSTALL_BIND_TRUE@install: install-bind | |
101 | @INSTALL_BIND_FALSE@uninstall: | |
102 | @INSTALL_BIND_TRUE@uninstall: uninstall-bind | |
103 | ||
104 | install-bind: all | |
105 | @for libdir in ${bindlibs} ; do \ | |
106 | (cd ${bindsrcdir}/lib/$$libdir ; \ | |
107 | $(MAKE) install) ; \ | |
108 | done | |
109 | ||
110 | uninstall-bind: all | |
111 | @for libdir in ${bindlibs} ; do \ | |
112 | (cd ${bindsrcdir}/lib/$$libdir ; \ | |
113 | $(MAKE) uninstall) ; \ | |
114 | done | |
115 | ||
b3745bf5 SR |
116 | # Include the following so that this Makefile is happy when the parent |
117 | # tries to use them. | |
118 | ||
f9741514 | 119 | check distdir distclean dvi installcheck: |