Bug 916257 - part 3 - write ALL_IPDLSRCS and CPPSRCS in one go; r=gps
authorNathan Froyd <froydnj@mozilla.com>
Fri, 13 Sep 2013 15:09:53 -0400
changeset 160105 60933bd9e217412963eefbd075282f8da02515ab
parent 160104 8dfc5c8b3c8bc355feb4294654d60d6e1265e399
child 160106 dbb0d3946a928fc064e9c40b175b5215d098254e
push id2961
push userlsblakk@mozilla.com
push dateMon, 28 Oct 2013 21:59:28 +0000
treeherdermozilla-beta@73ef4f13486f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs916257
milestone26.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 916257 - part 3 - write ALL_IPDLSRCS and CPPSRCS in one go; r=gps
python/mozbuild/mozbuild/backend/recursivemake.py
--- a/python/mozbuild/mozbuild/backend/recursivemake.py
+++ b/python/mozbuild/mozbuild/backend/recursivemake.py
@@ -283,31 +283,33 @@ class RecursiveMakeBackend(CommonBackend
             self.summary.managed_count += 1
 
 
         # Write out a master list of all IPDL source files.
         ipdls = FileAvoidWrite(os.path.join(self.environment.topobjdir,
             'ipc', 'ipdl', 'ipdlsrcs.mk'))
         mk = mozmakeutil.Makefile()
 
-        for p in sorted(self._ipdl_sources):
-            mk.add_statement('ALL_IPDLSRCS += %s\n' % p)
-            def files_from(ipdl):
-                base = os.path.basename(ipdl)
-                root, ext = os.path.splitext(base)
+        sorted_ipdl_sources = list(sorted(self._ipdl_sources))
+        mk.add_statement('ALL_IPDLSRCS := %s\n' % ' '.join(sorted_ipdl_sources))
+
+        def files_from(ipdl):
+            base = os.path.basename(ipdl)
+            root, ext = os.path.splitext(base)
 
-                # Both .ipdl and .ipdlh become .cpp files
-                files = ['%s.cpp' % root]
-                if ext == '.ipdl':
-                    # .ipdl also becomes Child/Parent.cpp files
-                    files.extend(['%sChild.cpp' % root,
-                                  '%sParent.cpp' % root])
-                return files
+            # Both .ipdl and .ipdlh become .cpp files
+            files = ['%s.cpp' % root]
+            if ext == '.ipdl':
+                # .ipdl also becomes Child/Parent.cpp files
+                files.extend(['%sChild.cpp' % root,
+                              '%sParent.cpp' % root])
+            return files
 
-            mk.add_statement('CPPSRCS += %s\n' % ' '.join(files_from(p)))
+        ipdl_cppsrcs = itertools.chain(*[files_from(p) for p in sorted_ipdl_sources])
+        mk.add_statement('CPPSRCS := %s\n' % ' '.join(ipdl_cppsrcs))
 
         mk.add_statement('IPDLDIRS := %s\n' % ' '.join(sorted(set(os.path.dirname(p)
             for p in self._ipdl_sources))))
 
         mk.dump(ipdls)
 
         self._update_from_avoid_write(ipdls.close())
         self.summary.managed_count += 1