Bug 904743 - Allow multiple targets on the same rule with includedeps in pymake. r=gps
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 23 Aug 2013 08:08:11 +0900
changeset 349 2aaad4a880f9
parent 348 e43aa1231778
child 350 0e8c0eada030
push id222
push usermh@glandium.org
push dateThu, 22 Aug 2013 23:11:58 +0000
reviewersgps
bugs904743
Bug 904743 - Allow multiple targets on the same rule with includedeps in pymake. r=gps
pymake/parserdata.py
--- a/pymake/parserdata.py
+++ b/pymake/parserdata.py
@@ -167,21 +167,20 @@ class Rule(Statement):
         This lets us go really fast and is generally good.
         """
         assert context.weak
         deps = self.depexp.resolvesplit(makefile, makefile.variables)
         # Skip targets with no rules and no dependencies
         if not deps:
             return
         targets = self.targetexp.resolvesplit(makefile, makefile.variables)
-        assert len(targets) == 1
-        target = targets[0]
         rule = data.Rule(deps, self.doublecolon, loc=self.targetexp.loc, weakdeps=True)
-        makefile.gettarget(target).addrule(rule)
-        makefile.foundtarget(target)
+        for target in targets:
+            makefile.gettarget(target).addrule(rule)
+            makefile.foundtarget(target)
         context.currule = rule
 
     def _execute(self, makefile, context):
         assert not context.weak
 
         atargets = data.stripdotslashes(self.targetexp.resolvesplit(makefile, makefile.variables))
         targets = [data.Pattern(p) for p in _expandwildcards(makefile, atargets)]