diff options
Diffstat (limited to 'buildtools')
-rw-r--r-- | buildtools/wafsamba/samba_utils.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py index 069d578847..40a7536b4c 100644 --- a/buildtools/wafsamba/samba_utils.py +++ b/buildtools/wafsamba/samba_utils.py @@ -241,3 +241,31 @@ def to_list(str): def SUBST_ENV_VAR(conf, varname): '''Substitute an environment variable for any embedded variables''' return Utils.subst_vars(conf.env[varname], conf.env) + + +def ENFORCE_GROUP_ORDERING(bld): + '''enforce group ordering for the project. This + makes the group ordering apply even when you specify + a target with --target''' + if Options.options.compile_targets: + @feature('*') + def force_previous_groups(self): + 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) + break + if stop is None: + return + + for g in bld.task_manager.groups: + if id(g) == stop: + break + for t in g.tasks_gen: + t.post() +Build.BuildContext.ENFORCE_GROUP_ORDERING = ENFORCE_GROUP_ORDERING + |