Bug 916257 - part 1 - convert ipdlsrcs.mk writing to use mozbuild.makeutil; r=gps
☠☠ backed out by 853f3f44cb3b ☠ ☠
authorNathan Froyd <froydnj@mozilla.com>
Fri, 13 Sep 2013 14:57:32 -0400
changeset 147179 a8da12b9e73f
parent 147178 59f890ddd95f
child 147180 e9a59bc50ffb
push id33790
push usernfroyd@mozilla.com
push date2013-09-14 01:57 +0000
treeherdermozilla-inbound@e068176c4814 [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 1 - convert ipdlsrcs.mk writing to use mozbuild.makeutil; r=gps
python/mozbuild/mozbuild/backend/recursivemake.py
--- a/python/mozbuild/mozbuild/backend/recursivemake.py
+++ b/python/mozbuild/mozbuild/backend/recursivemake.py
@@ -4,16 +4,17 @@
 
 from __future__ import unicode_literals
 
 import errno
 import logging
 import os
 import types
 
+import mozbuild.makeutil as mozmakeutil
 from mozpack.copier import FilePurger
 from mozpack.manifests import (
     InstallManifest,
     PurgeManifest,
 )
 import mozpack.path as mozpath
 
 from .common import CommonBackend
@@ -281,31 +282,35 @@ class RecursiveMakeBackend(CommonBackend
 
             self._update_from_avoid_write(bf.close())
             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):
-            ipdls.write('ALL_IPDLSRCS += %s\n' % p)
+            mk.add_statement('ALL_IPDLSRCS += %s\n' % p)
             base = os.path.basename(p)
             root, ext = os.path.splitext(base)
 
             # Both .ipdl and .ipdlh become .cpp files
-            ipdls.write('CPPSRCS += %s.cpp\n' % root)
+            mk.add_statement('CPPSRCS += %s.cpp\n' % root)
             if ext == '.ipdl':
                 # .ipdl also becomes Child/Parent.cpp files
-                ipdls.write('CPPSRCS += %sChild.cpp\n' % root)
-                ipdls.write('CPPSRCS += %sParent.cpp\n' % root)
+                mk.add_statement('CPPSRCS += %sChild.cpp\n' % root)
+                mk.add_statement('CPPSRCS += %sParent.cpp\n' % root)
 
-        ipdls.write('IPDLDIRS := %s\n' % ' '.join(sorted(set(os.path.dirname(p)
+        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
 
         # Write out master lists of WebIDL source files.
         webidls = FileAvoidWrite(os.path.join(self.environment.topobjdir,
               'dom', 'bindings', 'webidlsrcs.mk'))
 
         for webidl in sorted(self._webidl_sources):