buildtools/wafsamba: fix build group ordering
authorThomas Nagy <tnagy1024@gmail.com>
Thu, 13 May 2010 17:23:37 +0000 (19:23 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 13 May 2010 17:23:37 +0000 (19:23 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
buildtools/wafsamba/samba_utils.py

index f0360688ba0e5b28d276d8c8c40ebb8f9aa1ab66..79b0ca3f5acb658c3afde19c81b1177bbb8bca9a 100644 (file)
@@ -238,6 +238,7 @@ def ENFORCE_GROUP_ORDERING(bld):
        a target with --target'''
     if Options.options.compile_targets:
         @feature('*')
+        @before('exec_rule', 'apply_core', 'collect')
         def force_previous_groups(self):
             if getattr(self.bld, 'enforced_group_ordering', False) == True:
                 return
@@ -262,12 +263,14 @@ def ENFORCE_GROUP_ORDERING(bld):
             if stop is None:
                 return
 
-            for g in bld.task_manager.groups:
+            for i in xrange(len(bld.task_manager.groups)):
+                g = bld.task_manager.groups[i]
+                bld.task_manager.current_group = i
                 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:
+                    if not getattr(t, 'forced_groups', False):
                         debug('group: Posting %s', t.name or t.target)
                         t.forced_groups = True
                         t.post()