diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-03-20 22:55:04 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-04-06 20:26:58 +1000 |
commit | 584986e392a799075d79277fc37ea5e0573b9c0c (patch) | |
tree | aaefdc67cb3d4613af1ce3e8ee3c90abdc038582 /buildtools/wafsamba/samba_deps.py | |
parent | 88db935f56fc0bfdbcda8eadc74ff95ae9538158 (diff) | |
download | samba-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/samba_deps.py')
-rw-r--r-- | buildtools/wafsamba/samba_deps.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/buildtools/wafsamba/samba_deps.py b/buildtools/wafsamba/samba_deps.py index b737e65e86..a475b448a2 100644 --- a/buildtools/wafsamba/samba_deps.py +++ b/buildtools/wafsamba/samba_deps.py @@ -197,14 +197,20 @@ def add_init_functions(self): sentinal = getattr(self, 'init_function_sentinal', 'NULL') + targets = LOCAL_CACHE(bld, 'TARGET_TYPE') + cflags = getattr(self, 'samba_cflags', [])[:] for m in modules: bld.ASSERT(m in subsystems, "No init_function defined for module '%s' in target '%s'" % (m, self.sname)) init_fn_list = [] for d in subsystems[m]: - init_fn_list.append(d['INIT_FUNCTION']) - cflags.append('-DSTATIC_%s_MODULES=%s' % (m, ','.join(init_fn_list) + ',' + sentinal)) + if targets[d['TARGET']] != 'DISABLED': + init_fn_list.append(d['INIT_FUNCTION']) + if init_fn_list == []: + cflags.append('-DSTATIC_%s_MODULES=%s' % (m, sentinal)) + else: + cflags.append('-DSTATIC_%s_MODULES=%s' % (m, ','.join(init_fn_list) + ',' + sentinal)) self.ccflags = cflags |