summaryrefslogtreecommitdiff
path: root/buildtools
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-08-19 09:22:54 +1000
committerJelmer Vernooij <jelmer@samba.org>2010-08-22 16:35:30 +0200
commitcfcfe3c1f5ab8f1cb919acbf8f215afdd9cc7d91 (patch)
tree0fbcd558f64ac9f2ebfe495d624ff1e7d9a3fcde /buildtools
parentde951249356a3705fc2a3c51575134415ac0ea05 (diff)
downloadsamba-cfcfe3c1f5ab8f1cb919acbf8f215afdd9cc7d91.tar.gz
samba-cfcfe3c1f5ab8f1cb919acbf8f215afdd9cc7d91.tar.bz2
samba-cfcfe3c1f5ab8f1cb919acbf8f215afdd9cc7d91.zip
s4-waf: re-use SAMBA_LIBRARY() in building shared modules
make SAMBA_MODULE() call SAMBA_LIBRARY() to do the heavy lifting. This fixes the problem with modules being a bit too slim :-) Pair-Programmed-With: Jelmer Vernooij <jelmer@samba.org>
Diffstat (limited to 'buildtools')
-rw-r--r--buildtools/wafsamba/wafsamba.py50
1 files changed, 15 insertions, 35 deletions
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index 21ed001372..c24d82b930 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -349,50 +349,30 @@ def SAMBA_MODULE(bld, modname, source,
SET_TARGET_TYPE(bld, modname, 'DISABLED')
return
- if not SET_TARGET_TYPE(bld, modname, 'MODULE'):
- return
-
obj_target = modname + '.objlist'
- bld.SAMBA_SUBSYSTEM(obj_target, source,
- deps=deps,
- includes=includes,
- autoproto=autoproto,
- autoproto_extra_source=autoproto_extra_source,
- cflags=cflags,
- local_include=local_include,
- enabled=enabled)
-
- deps = TO_LIST(deps)
- deps.append(obj_target)
realname = modname
if subsystem is not None:
- deps.append(subsystem)
+ deps += ' ' + subsystem
while realname.startswith("lib"+subsystem+"_"):
realname = realname[len("lib"+subsystem+"_"):]
while realname.startswith(subsystem+"_"):
realname = realname[len(subsystem+"_"):]
- while realname.startswith("lib"):
- realname = realname[len("lib"):]
- bld.SET_BUILD_GROUP('main')
- t = bld(
- features = 'cc cshlib install_lib',
- source = [],
- target = realname,
- name = modname,
- link_name = "modules/%s/%s.${SHLIBEXT}" % (subsystem, realname),
- samba_cflags = CURRENT_CFLAGS(bld, modname, cflags),
- samba_includes = includes,
- local_include = local_include,
- samba_deps = deps,
- install_path = None,
- samba_inst_path= "${MODULESDIR}/%s" % subsystem,
- samba_realname = realname+ ".${SHLIBEXT}",
- vnum = None,
- samba_install = True,
- is_bundled = False,
- )
+ realname = bld.env.shlib_PATTERN % realname
+ while realname.startswith("lib"):
+ realname = realname[len("lib"):]
+
+ bld.SAMBA_LIBRARY(modname,
+ source,
+ deps=deps,
+ cflags=cflags,
+ realname = realname,
+ autoproto = autoproto,
+ local_include=local_include,
+ vars=vars,
+ install_path="${MODULESDIR}/%s" % subsystem
+ )
Build.BuildContext.SAMBA_MODULE = SAMBA_MODULE