-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 \
+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
$(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)
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)
+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)
-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
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)
-SUBDIRS = badpacket perfdhcp
+if WANT_DNS
+want_badpacket = badpacket
+endif
+
+if WANT_DHCP
+want_perfdhcp = perfdhcp
+endif
+
+SUBDIRS = . $(want_badpacket) $(want_perfdhcp)