Bug 920896 - Strip ./ from targets and dependencies in includedeps files. r=gps
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 26 Sep 2013 16:43:53 +0900
changeset 355 3ef1b1059c5c
parent 354 6410fa823a22
child 356 498a23902260
push id225
push usermh@glandium.org
push dateThu, 26 Sep 2013 07:49:34 +0000
reviewersgps
bugs920896
Bug 920896 - Strip ./ from targets and dependencies in includedeps files. r=gps
pymake/parserdata.py
tests/includedeps-stripdotslash.deps
tests/includedeps-stripdotslash.mk
--- a/pymake/parserdata.py
+++ b/pymake/parserdata.py
@@ -166,18 +166,18 @@ class Rule(Statement):
         If the context is weak (we're just handling dependencies) we can make a number of assumptions here.
         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)
-        rule = data.Rule(deps, self.doublecolon, loc=self.targetexp.loc, weakdeps=True)
+        targets = data.stripdotslashes(self.targetexp.resolvesplit(makefile, makefile.variables))
+        rule = data.Rule(list(data.stripdotslashes(deps)), self.doublecolon, loc=self.targetexp.loc, weakdeps=True)
         for target in targets:
             makefile.gettarget(target).addrule(rule)
             makefile.foundtarget(target)
         context.currule = rule
 
     def _execute(self, makefile, context):
         assert not context.weak
 
new file mode 100644
--- /dev/null
+++ b/tests/includedeps-stripdotslash.deps
@@ -0,0 +1,1 @@
+./test: TEST-PASS
new file mode 100644
--- /dev/null
+++ b/tests/includedeps-stripdotslash.mk
@@ -0,0 +1,8 @@
+#T gmake skip
+
+test:
+	@echo $<
+
+includedeps $(TESTPATH)/includedeps-stripdotslash.deps
+
+TEST-PASS: