summaryrefslogtreecommitdiffstats
path: root/buildtools/wafsamba
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-30 20:21:21 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:27:18 +1000
commitb498378c8fcb2f87f7cb296e4e81ac392b1e34ff (patch)
treed8ac3fdd2142bebf9fc8a29f0581fe564227aebf /buildtools/wafsamba
parent20a8574717aef8f946ac9d8f3284e7318eeb9bf8 (diff)
downloadsamba-b498378c8fcb2f87f7cb296e4e81ac392b1e34ff.tar.gz
samba-b498378c8fcb2f87f7cb296e4e81ac392b1e34ff.tar.xz
samba-b498378c8fcb2f87f7cb296e4e81ac392b1e34ff.zip
s4-waf: fixed some of the group ordering
We need to try to keep targets in the right groups
Diffstat (limited to 'buildtools/wafsamba')
-rw-r--r--buildtools/wafsamba/samba_utils.py28
-rw-r--r--buildtools/wafsamba/wafsamba.py9
2 files changed, 27 insertions, 10 deletions
diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py
index 4230d8066f5..5bff769400d 100644
--- a/buildtools/wafsamba/samba_utils.py
+++ b/buildtools/wafsamba/samba_utils.py
@@ -241,22 +241,36 @@ def ENFORCE_GROUP_ORDERING(bld):
if Options.options.compile_targets:
@feature('*')
def force_previous_groups(self):
- my_id = id(self)
+ if getattr(self.bld, 'enforced_group_ordering', False) == True:
+ return
+ self.bld.enforced_group_ordering = True
+
+ def group_name(g):
+ tm = self.bld.task_manager
+ return [x for x in tm.groups_names if id(tm.groups_names[x]) == id(g)][0]
+ my_id = id(self)
bld = self.bld
stop = None
for g in bld.task_manager.groups:
for t in g.tasks_gen:
if id(t) == my_id:
stop = id(g)
+ debug('group: Forcing up to group %s', group_name(g))
break
- if stop is None:
- return
+ if stop != None:
+ break
+ if stop is None:
+ return
- for g in bld.task_manager.groups:
- if id(g) == stop:
- break
- for t in g.tasks_gen:
+ for g in bld.task_manager.groups:
+ if id(g) == stop:
+ break
+ debug('group: Forcing group %s', group_name(g))
+ for t in g.tasks_gen:
+ if getattr(t, 'forced_groups', False) != True:
+ debug('group: Posting %s', t.name or t.target)
+ t.forced_groups = True
t.post()
Build.BuildContext.ENFORCE_GROUP_ORDERING = ENFORCE_GROUP_ORDERING
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index 2f3120d6e9c..3f48de4ca68 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -252,8 +252,6 @@ def SAMBA_BINARY(bld, binname, source,
if needs_python:
features += ' pyembed'
- bld.SET_BUILD_GROUP(group)
-
obj_target = binname + '.objlist'
source = bld.EXPAND_VARIABLES(source, vars=vars)
@@ -272,6 +270,8 @@ def SAMBA_BINARY(bld, binname, source,
needs_python = needs_python,
local_include = local_include)
+ bld.SET_BUILD_GROUP(group)
+
# the library itself will depend on that object target
deps = TO_LIST(deps)
deps.append(obj_target)
@@ -484,7 +484,7 @@ Build.BuildContext.SAMBA_SUBSYSTEM = SAMBA_SUBSYSTEM
def SAMBA_GENERATOR(bld, name, rule, source, target,
- group='build_source', enabled=True,
+ group='generators', enabled=True,
public_headers=None,
header_path=None,
vars=None):
@@ -535,6 +535,9 @@ def SETUP_BUILD_GROUPS(bld):
bld.add_group('setup')
bld.add_group('build_compiler_source')
bld.add_group('base_libraries')
+ bld.add_group('generators')
+ bld.add_group('compiler_prototypes')
+ bld.add_group('compiler_libraries')
bld.add_group('build_compilers')
bld.add_group('build_source')
bld.add_group('prototypes')