summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba/samba_deps.py
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-10-30 16:37:27 +1100
committerAndrew Tridgell <tridge@samba.org>2010-10-30 23:49:02 +1100
commit55063cddd574ecca6a51b20a10fa979d55d6b70a (patch)
tree72d2d3d77a3066a1f8d243a865acbe5ada263542 /buildtools/wafsamba/samba_deps.py
parentb2a565488ef0b2aad7401a0a2c61dd5853038a28 (diff)
downloadsamba-55063cddd574ecca6a51b20a10fa979d55d6b70a.tar.gz
samba-55063cddd574ecca6a51b20a10fa979d55d6b70a.tar.bz2
samba-55063cddd574ecca6a51b20a10fa979d55d6b70a.zip
waf: fixed building of non-shared binaries that contain modules
we need to incorporate the module objects too
Diffstat (limited to 'buildtools/wafsamba/samba_deps.py')
-rw-r--r--buildtools/wafsamba/samba_deps.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/buildtools/wafsamba/samba_deps.py b/buildtools/wafsamba/samba_deps.py
index 0c9add2e06..7471118722 100644
--- a/buildtools/wafsamba/samba_deps.py
+++ b/buildtools/wafsamba/samba_deps.py
@@ -763,6 +763,9 @@ def calculate_final_deps(bld, tgt_list, loops):
# handle any non-shared binaries
for t in tgt_list:
if t.samba_type == 'BINARY' and bld.NONSHARED_BINARY(t.sname):
+ subsystem_list = LOCAL_CACHE(bld, 'INIT_FUNCTIONS')
+ targets = LOCAL_CACHE(bld, 'TARGET_TYPE')
+
# replace lib deps with objlist deps
for l in t.final_libs:
objname = l + '.objlist'
@@ -772,6 +775,22 @@ def calculate_final_deps(bld, tgt_list, loops):
sys.exit(1)
t.final_objects.add(objname)
t.final_objects = t.final_objects.union(extended_objects(bld, t2, set()))
+ if l in subsystem_list:
+ # its a subsystem - we also need the contents of any modules
+ for d in subsystem_list[l]:
+ module_name = d['TARGET']
+ if targets[module_name] == 'LIBRARY':
+ objname = module_name + '.objlist'
+ elif targets[module_name] == 'SUBSYSTEM':
+ objname = module_name
+ else:
+ continue
+ t2 = bld.name_to_obj(objname, bld.env)
+ if t2 is None:
+ Logs.error('ERROR: subsystem %s not found' % objname)
+ sys.exit(1)
+ t.final_objects.add(objname)
+ t.final_objects = t.final_objects.union(extended_objects(bld, t2, set()))
t.final_libs = set()
# find any library loops