diff --git a/src/Makefile.am b/src/Makefile.am index 0e0109a9d7..d3f99e32d2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 \ diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am index 2e0e32f03a..4238c7f2ce 100644 --- a/src/bin/Makefile.am +++ b/src/bin/Makefile.am @@ -1,16 +1,38 @@ -if WANT_EXPERIMENTAL_RESOLVER -# Build resolver only with --enable-experimental-resolver -experimental_resolver = resolver -endif +if WANT_DHCP -SUBDIRS = bind10 bindctl cfgmgr ddns loadzone msgq cmdctl auth xfrin \ - xfrout usermgr zonemgr stats tests $(experimental_resolver) \ - sockcreator dhcp4 dhcp6 d2 dbutil sysinfo +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 +want_resolver = resolver +endif 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 diff --git a/src/bin/cfgmgr/plugins/Makefile.am b/src/bin/cfgmgr/plugins/Makefile.am index 5967abd4ac..df6f44b6aa 100644 --- a/src/bin/cfgmgr/plugins/Makefile.am +++ b/src/bin/cfgmgr/plugins/Makefile.am @@ -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) diff --git a/src/bin/cfgmgr/plugins/tests/Makefile.am b/src/bin/cfgmgr/plugins/tests/Makefile.am index 978dc4bf96..00c1cdef6e 100644 --- a/src/bin/cfgmgr/plugins/tests/Makefile.am +++ b/src/bin/cfgmgr/plugins/tests/Makefile.am @@ -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) diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am index df0c57ca5f..1b14cc430e 100644 --- a/src/lib/Makefile.am +++ b/src/lib/Makefile.am @@ -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) diff --git a/src/lib/python/isc/Makefile.am b/src/lib/python/isc/Makefile.am index 9d0a8ce0d8..a60dae7845 100644 --- a/src/lib/python/isc/Makefile.am +++ b/src/lib/python/isc/Makefile.am @@ -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 diff --git a/tests/lettuce/README b/tests/lettuce/README index 786fe0220a..f44ac9bf48 100644 --- a/tests/lettuce/README +++ b/tests/lettuce/README @@ -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) diff --git a/tests/tools/Makefile.am b/tests/tools/Makefile.am index ac10c40b8c..8a132e764e 100644 --- a/tests/tools/Makefile.am +++ b/tests/tools/Makefile.am @@ -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)