summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba/wafsamba.py
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-20 22:55:04 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:26:58 +1000
commit584986e392a799075d79277fc37ea5e0573b9c0c (patch)
treeaaefdc67cb3d4613af1ce3e8ee3c90abdc038582 /buildtools/wafsamba/wafsamba.py
parent88db935f56fc0bfdbcda8eadc74ff95ae9538158 (diff)
downloadsamba-584986e392a799075d79277fc37ea5e0573b9c0c.tar.gz
samba-584986e392a799075d79277fc37ea5e0573b9c0c.tar.bz2
samba-584986e392a799075d79277fc37ea5e0573b9c0c.zip
build: cope with subsystems with no enabled modules
This happens for the notify subsystem on non-Linux systems
Diffstat (limited to 'buildtools/wafsamba/wafsamba.py')
-rw-r--r--buildtools/wafsamba/wafsamba.py14
1 files changed, 5 insertions, 9 deletions
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index acb8845295..7324f8ff48 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -278,6 +278,11 @@ def SAMBA_MODULE(bld, modname, source,
local_include=True,
enabled=True):
+ # we add the init function regardless of whether the module
+ # is enabled or not, as we need to generate a null list if
+ # all disabled
+ bld.ADD_INIT_FUNCTION(subsystem, modname, init_function)
+
if internal_module:
# treat internal modules as subsystems for now
SAMBA_SUBSYSTEM(bld, modname, source,
@@ -288,12 +293,6 @@ def SAMBA_MODULE(bld, modname, source,
cflags=cflags,
local_include=local_include,
enabled=enabled)
- # even though we're treating it as a subsystem, we need to
- # add it to the init_function list
- # TODO: we should also create an implicit dependency
- # between the subsystem target and this target
- if enabled:
- bld.ADD_INIT_FUNCTION(subsystem, modname, init_function)
return
if not enabled:
@@ -308,9 +307,6 @@ def SAMBA_MODULE(bld, modname, source,
if not SET_TARGET_TYPE(bld, modname, 'MODULE'):
return
-
- bld.ADD_INIT_FUNCTION(subsystem, modname, init_function)
-
if subsystem is not None:
deps += ' ' + subsystem