summaryrefslogtreecommitdiff
path: root/buildtools
diff options
context:
space:
mode:
Diffstat (limited to 'buildtools')
-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 4230d8066f..5bff769400 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 2f3120d6e9..3f48de4ca6 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')