summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-08 20:34:15 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:26:46 +1000
commitcdf1a3d4bfa0c945b450e67f42e882a67699efd3 (patch)
tree6308b163cf1edbe04804bb36c926a7ecb2e7f03d /buildtools/wafsamba
parenta7c60e0b67c069d1e6e52207c35605016c3e9861 (diff)
downloadsamba-cdf1a3d4bfa0c945b450e67f42e882a67699efd3.tar.gz
samba-cdf1a3d4bfa0c945b450e67f42e882a67699efd3.tar.bz2
samba-cdf1a3d4bfa0c945b450e67f42e882a67699efd3.zip
build: added ENFORCE_GROUP_ORDERING()
Diffstat (limited to 'buildtools/wafsamba')
-rw-r--r--buildtools/wafsamba/samba_utils.py28
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
+