Bug 925894 - Normalize cl generated dependencies before testing for spaces in them. r=gps, a=NPOTB
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 16 Oct 2013 14:13:14 -0400
changeset 148648 58fb08e34722c5d1f99fbe25808e94d38c5b4911
parent 148647 51517c1a190a77ea97bafc34e71f8bd5c5200843
child 148649 9104d31f7a88039703600e20166b2a084d624ac2
push id54
push userryanvm@gmail.com
push dateFri, 08 Nov 2013 20:44:01 +0000
reviewersgps, NPOTB
bugs925894
milestone24.1.0
Bug 925894 - Normalize cl generated dependencies before testing for spaces in them. r=gps, a=NPOTB
build/cl.py
js/src/build/cl.py
--- a/build/cl.py
+++ b/build/cl.py
@@ -67,18 +67,19 @@ def InvokeClWithDependencyGeneration(cmd
     for line in cl.stdout:
         # cl -showIncludes prefixes every header with "Note: including file:"
         # and an indentation corresponding to the depth (which we don't need)
         if line.startswith(CL_INCLUDES_PREFIX):
             dep = line[len(CL_INCLUDES_PREFIX):].strip()
             # We can't handle pathes with spaces properly in mddepend.pl, but
             # we can assume that anything in a path with spaces is a system
             # header and throw it away.
+            dep = normcase(dep)
             if ' ' not in dep:
-                deps.add(normcase(dep).replace(os.sep, '/'))
+                deps.add(dep.replace(os.sep, '/'))
         else:
             sys.stdout.write(line) # Make sure we preserve the relevant output
                                    # from cl
 
     ret = cl.wait()
     if ret != 0 or target == "":
         sys.exit(ret)
 
--- a/js/src/build/cl.py
+++ b/js/src/build/cl.py
@@ -67,18 +67,19 @@ def InvokeClWithDependencyGeneration(cmd
     for line in cl.stdout:
         # cl -showIncludes prefixes every header with "Note: including file:"
         # and an indentation corresponding to the depth (which we don't need)
         if line.startswith(CL_INCLUDES_PREFIX):
             dep = line[len(CL_INCLUDES_PREFIX):].strip()
             # We can't handle pathes with spaces properly in mddepend.pl, but
             # we can assume that anything in a path with spaces is a system
             # header and throw it away.
+            dep = normcase(dep)
             if ' ' not in dep:
-                deps.add(normcase(dep).replace(os.sep, '/'))
+                deps.add(dep.replace(os.sep, '/'))
         else:
             sys.stdout.write(line) # Make sure we preserve the relevant output
                                    # from cl
 
     ret = cl.wait()
     if ret != 0 or target == "":
         sys.exit(ret)