]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2367] Conditionally include DNS and DHCP components (use AM conditionals)
authorMukund Sivaraman <muks@isc.org>
Wed, 26 Feb 2014 00:28:40 +0000 (05:58 +0530)
committerMukund Sivaraman <muks@isc.org>
Wed, 26 Feb 2014 00:45:13 +0000 (06:15 +0530)
src/Makefile.am
src/bin/Makefile.am
src/bin/cfgmgr/plugins/Makefile.am
src/bin/cfgmgr/plugins/tests/Makefile.am
src/lib/Makefile.am
src/lib/python/isc/Makefile.am
tests/lettuce/README
tests/tools/Makefile.am

index 0e0109a9d7e84a74f003344b381c5dabad2e7b51..d3f99e32d2d50935d3fbf45d4dea5f37b5365038 100644 (file)
@@ -1,6 +1,10 @@
-SUBDIRS = lib bin
-# @todo hooks lib could be a configurable switch
-SUBDIRS += hooks
+if WANT_DHCP
+
+want_hooks = hooks
+
+endif # WANT_DHCP
+
+SUBDIRS = lib bin $(want_hooks)
 
 EXTRA_DIST = \
        cppcheck-suppress.lst           \
index 2e0e32f03ae59c063c6b09f0deb1e3b1118e1565..4238c7f2ce38e6e0dda4c09eb9352a9a68602e57 100644 (file)
@@ -1,16 +1,38 @@
+if WANT_DHCP
+
+want_d2 = d2
+want_dhcp4 = dhcp4
+want_dhcp6 = dhcp6
+
+endif # WANT_DHCP
+
+if WANT_DNS
+
+want_auth = auth
+want_dbutil = dbutil
+want_ddns = ddns
+want_loadzone = loadzone
+want_xfrin = xfrin
+want_xfrout = xfrout
+want_zonemgr = zonemgr
+
 if WANT_EXPERIMENTAL_RESOLVER
-# Build resolver only with --enable-experimental-resolver
-experimental_resolver = resolver
+want_resolver = resolver
 endif
 
-SUBDIRS = bind10 bindctl cfgmgr ddns loadzone msgq cmdctl auth xfrin \
-       xfrout usermgr zonemgr stats tests $(experimental_resolver) \
-       sockcreator dhcp4 dhcp6 d2 dbutil sysinfo
-
 if USE_SHARED_MEMORY
 # Build the memory manager only if we have shared memory.
 # It is useless without it.
-SUBDIRS += memmgr
+want_memmgr = memmgr
 endif
 
+endif # WANT_DNS
+
+# The following build order must be maintained. So we create the
+# variables above and add directories in that order to SUBDIRS.
+SUBDIRS = bind10 bindctl cfgmgr $(want_ddns) $(want_loadzone) msgq cmdctl \
+       $(want_auth) $(want_xfrin) $(want_xfrout) usermgr $(want_zonemgr) \
+       stats tests $(want_resolver) sockcreator $(want_dhcp4) $(want_dhcp6) \
+       $(want_d2) $(want_dbutil) sysinfo $(want_memmgr)
+
 check-recursive: all-recursive
index 5967abd4ace5e1e4e7faca9ff167a19b53bf9dd5..df6f44b6aa54537acdca029f2a20bd034893ae84 100644 (file)
@@ -6,13 +6,20 @@ datasrc.spec: datasrc.spec.pre
        $(SED) -e "s|@@STATIC_ZONE_FILE@@|$(pkgdatadir)/static.zone|;s|@@SQLITE3_DATABASE_FILE@@|$(localstatedir)/$(PACKAGE)/zone.sqlite3|" datasrc.spec.pre >$@
 
 config_plugindir = @prefix@/share/@PACKAGE@/config_plugins
-config_plugin_DATA = logging.spec tsig_keys.spec datasrc.spec
+config_plugin_DATA = logging.spec tsig_keys.spec
 
-python_PYTHON = b10logging.py tsig_keys.py datasrc_config_plugin.py
+python_PYTHON = b10logging.py tsig_keys.py
 pythondir = $(config_plugindir)
 
 CLEANFILES = b10logging.pyc tsig_keys.pyc datasrc.spec
 CLEANDIRS = __pycache__
 
+if WANT_DNS
+
+config_plugin_DATA += datasrc.spec
+python_PYTHON += datasrc_config_plugin.py
+
+endif
+
 clean-local:
        rm -rf $(CLEANDIRS)
index 978dc4bf9602436643dd2e83ca6f8ae46c517ed2..00c1cdef6e79445ec1dc2b905708e4c000fcf4da 100644 (file)
@@ -1,5 +1,13 @@
 PYCOVERAGE_RUN = @PYCOVERAGE_RUN@
-PYTESTS = tsig_keys_test.py logging_test.py datasrc_test.py
+PYTESTS = tsig_keys_test.py logging_test.py
+
+if WANT_DNS
+
+PYTESTS += datasrc_test.py
+
+endif
+
+
 
 EXTRA_DIST = $(PYTESTS)
 
index df0c57ca5f5b38fa8e4340cf1d46a8999e4101b5..1b14cc430e7305a6cd37ad786990e92b71c5e3c0 100644 (file)
@@ -1,8 +1,33 @@
+if WANT_DHCP
+
+want_dhcp = dhcp
+want_dhcp_ddns = dhcp_ddns
+want_dhcpsrv = dhcpsrv
+want_hooks = hooks
+
+endif # WANT_DHCP
+
+if WANT_DNS
+
+want_acl = acl
+want_bench = bench
+want_datasrc = datasrc
+want_nsas = nsas
+want_server_common = server_common
+want_statistics = statistics
+want_xfr = xfr
+
 if WANT_EXPERIMENTAL_RESOLVER
-# Build resolver only with --enable-experimental-resolver
-experimental_resolver = resolve
+want_cache = cache
+want_resolve = resolve
 endif
 
-SUBDIRS = exceptions util log hooks cryptolink dns cc config acl xfr bench \
-          asiolink asiodns nsas cache $(experimental_resolver) testutils \
-          datasrc server_common python dhcp dhcp_ddns dhcpsrv statistics
+endif # WANT_DNS
+
+# The following build order must be maintained. So we create the
+# variables above and add directories in that order to SUBDIRS.
+SUBDIRS = exceptions util log $(want_hooks) cryptolink dns cc config \
+          $(want_acl) $(want_xfr) $(want_bench) asiolink asiodns \
+          $(want_nsas) $(want_cache) $(want_resolve) testutils \
+          $(want_datasrc) $(want_server_common) python $(want_dhcp) \
+          $(want_dhcp_ddns) $(want_dhcpsrv) $(want_statistics)
index 9d0a8ce0d89efdbf5592998c49fb8d4eb311bfb7..a60dae78453d09b55fef429749a06389701b5dfa 100644 (file)
@@ -1,10 +1,28 @@
-SUBDIRS = datasrc util cc config dns log net notify testutils acl bind10
-SUBDIRS += xfrin log_messages server_common ddns sysinfo statistics
+if WANT_DNS
+
+want_acl = acl
+want_datasrc = datasrc
+want_ddns = ddns
+want_notify = notify
+want_server_common = server_common
+want_statistics = statistics
+want_xfrin = xfrin
+
 if USE_SHARED_MEMORY
-# The memory manager is useless without shared memory support
-SUBDIRS += memmgr
+# Build the memory manager only if we have shared memory.
+# It is useless without it.
+want_memmgr = memmgr
 endif
 
+endif # WANT_DNS
+
+# The following build order must be maintained. So we create the
+# variables above and add directories in that order to SUBDIRS.
+SUBDIRS = $(want_datasrc) util cc config dns log net $(want_notify) \
+       testutils $(want_acl) bind10 $(want_xfrin) log_messages \
+       $(want_server_common) $(want_ddns) sysinfo $(want_statistics) \
+       $(want_memmgr)
+
 python_PYTHON = __init__.py
 
 pythondir = $(pyexecdir)/isc
index 786fe0220a0411ac1934fc91e05899a0a679c625..f44ac9bf48824c39b3e2ee6916f55feb24e12d84 100644 (file)
@@ -7,7 +7,7 @@ tests could be separated, so that we can test other systems as well.
 
 Prerequisites:
 - BIND 10 must be compiled or installed (even when testing in-tree build;
-  see below)
+  see below) with both DNS and DHCP components enabled
 - dig
 - lettuce (http://lettuce.it)
 
index ac10c40b8c2492deacdecbd4ea78c065afc80bb4..8a132e764ec5907de2c1fcbe809515f30b26d983 100644 (file)
@@ -1 +1,9 @@
-SUBDIRS = badpacket perfdhcp
+if WANT_DNS
+want_badpacket = badpacket
+endif
+
+if WANT_DHCP
+want_perfdhcp = perfdhcp
+endif
+
+SUBDIRS = . $(want_badpacket) $(want_perfdhcp)