summaryrefslogtreecommitdiff
path: root/buildtools
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2015-01-17 00:24:53 +0100
committerStefan Metzmacher <metze@samba.org>2015-01-19 02:24:03 +0100
commit85a30cc44070b09de963961ccfa3d7c40144317b (patch)
tree7c7619b04cc992a6b41193a3e342c311c3b866de /buildtools
parent7668e457a6463fb2c1d7499659f37d10ca322190 (diff)
downloadsamba-85a30cc44070b09de963961ccfa3d7c40144317b.tar.gz
wafsamba: passing 'subsystem' to SAMBA_MODULE() is not optional
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10112 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Diffstat (limited to 'buildtools')
-rw-r--r--buildtools/wafsamba/wafsamba.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index fb5934df44d..9a38900d5fc 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -445,13 +445,15 @@ def SAMBA_MODULE(bld, modname, source,
):
'''define a Samba module.'''
+ bld.ASSERT(subsystem, "You must specify a subsystem for SAMBA_MODULE(%s)" % modname)
+
source = bld.EXPAND_VARIABLES(source, vars=vars)
if subdir:
source = bld.SUBDIR(subdir, source)
if internal_module or BUILTIN_LIBRARY(bld, modname):
# Do not create modules for disabled subsystems
- if subsystem and GET_TARGET_TYPE(bld, subsystem) == 'DISABLED':
+ if GET_TARGET_TYPE(bld, subsystem) == 'DISABLED':
return
bld.SAMBA_SUBSYSTEM(modname, source,
deps=deps,
@@ -472,18 +474,17 @@ def SAMBA_MODULE(bld, modname, source,
return
# Do not create modules for disabled subsystems
- if subsystem and GET_TARGET_TYPE(bld, subsystem) == 'DISABLED':
+ if GET_TARGET_TYPE(bld, subsystem) == 'DISABLED':
return
obj_target = modname + '.objlist'
realname = modname
- if subsystem is not None:
- deps += ' ' + subsystem
- while realname.startswith("lib"+subsystem+"_"):
- realname = realname[len("lib"+subsystem+"_"):]
- while realname.startswith(subsystem+"_"):
- realname = realname[len(subsystem+"_"):]
+ deps += ' ' + subsystem
+ while realname.startswith("lib"+subsystem+"_"):
+ realname = realname[len("lib"+subsystem+"_"):]
+ while realname.startswith(subsystem+"_"):
+ realname = realname[len(subsystem+"_"):]
realname = bld.make_libname(realname)
while realname.startswith("lib"):