Bug 912971 - Strip ./ from targets given to pymake on the command line. r=ted
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 06 Sep 2013 09:21:04 +0900
changeset 351 2b0f505e953c
parent 350 0e8c0eada030
child 352 5809e5d90994
push id223
push usermh@glandium.org
push dateWed, 11 Sep 2013 23:23:02 +0000
reviewersted
bugs912971
Bug 912971 - Strip ./ from targets given to pymake on the command line. r=ted
pymake/parserdata.py
tests/cmd-stripdotslash.mk
--- a/pymake/parserdata.py
+++ b/pymake/parserdata.py
@@ -88,17 +88,17 @@ def parsecommandlineargs(args):
             vname = vname.strip()
             vnameexp = data.Expansion.fromstring(vname, "Command-line argument")
 
             stmts.append(ExportDirective(vnameexp, concurrent_set=True))
             stmts.append(SetVariable(vnameexp, token=t,
                                      value=val, valueloc=Location('<command-line>', i, len(vname) + len(t)),
                                      targetexp=None, source=data.Variables.SOURCE_COMMANDLINE))
         else:
-            r.append(a)
+            r.append(data.stripdotslash(a))
 
     return stmts, r, ' '.join(overrides)
 
 class Statement(object):
     """
     Represents parsed make file syntax.
 
     This is an abstract base class. Child classes are expected to implement
new file mode 100644
--- /dev/null
+++ b/tests/cmd-stripdotslash.mk
@@ -0,0 +1,5 @@
+all:
+	$(MAKE) -f $(TESTPATH)/cmd-stripdotslash.mk ./foo
+
+./foo:
+	@echo TEST-PASS