Bug 914704 - Add WebIDL headers to dist/include install manifest; r=glandium
authorGregory Szorc <gps@mozilla.com>
Tue, 10 Sep 2013 17:07:59 -0700
changeset 159385 322e3797b68bfa76bf2866879b29f301209ad59b
parent 159384 3f2c2521a7ae4c9a46bf1ef783027a7b0d4aeb0a
child 159386 057ef596d743e8de54ad812462edebbe98813652
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)
reviewersglandium
bugs914704
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 914704 - Add WebIDL headers to dist/include install manifest; r=glandium
python/mozbuild/mozbuild/backend/recursivemake.py
--- a/python/mozbuild/mozbuild/backend/recursivemake.py
+++ b/python/mozbuild/mozbuild/backend/recursivemake.py
@@ -206,31 +206,35 @@ class RecursiveMakeBackend(CommonBackend
         elif isinstance(obj, Exports):
             self._process_exports(obj, obj.exports, backend_file)
 
         elif isinstance(obj, IPDLFile):
             self._ipdl_sources.add(mozpath.join(obj.srcdir, obj.basename))
 
         elif isinstance(obj, WebIDLFile):
             self._webidl_sources.add(mozpath.join(obj.srcdir, obj.basename))
+            self._process_webidl_basename(obj.basename)
 
         elif isinstance(obj, GeneratedEventWebIDLFile):
             self._generated_events_webidl_sources.add(mozpath.join(obj.srcdir, obj.basename))
 
         elif isinstance(obj, TestWebIDLFile):
             self._test_webidl_sources.add(mozpath.join(obj.srcdir,
                                                        obj.basename))
+            # Test WebIDL files are not exported.
 
         elif isinstance(obj, GeneratedWebIDLFile):
             self._generated_webidl_sources.add(mozpath.join(obj.srcdir,
                                                             obj.basename))
+            self._process_webidl_basename(obj.basename)
 
         elif isinstance(obj, PreprocessedWebIDLFile):
             self._preprocessed_webidl_sources.add(mozpath.join(obj.srcdir,
                                                                obj.basename))
+            self._process_webidl_basename(obj.basename)
 
         elif isinstance(obj, Program):
             self._process_program(obj.program, backend_file)
 
         elif isinstance(obj, XpcshellManifests):
             self._process_xpcshell_manifests(obj, backend_file)
 
         elif isinstance(obj, LocalInclude):
@@ -472,16 +476,20 @@ class RecursiveMakeBackend(CommonBackend
         # The Makefile can't regenerate itself because of custom substitution.
         # We need to list it here to ensure changes cause regeneration.
         self.backend_input_files.add(os.path.join(self.environment.topsrcdir,
             'config', 'makefiles', 'xpidl', 'Makefile.in'))
 
     def _process_program(self, program, backend_file):
         backend_file.write('PROGRAM = %s\n' % program)
 
+    def _process_webidl_basename(self, basename):
+        header = 'mozilla/dom/%sBinding.h' % os.path.splitext(basename)[0]
+        self._install_manifests['dist_include'].add_optional_exists(header)
+
     def _process_xpcshell_manifests(self, obj, backend_file, namespace=""):
         manifest = obj.xpcshell_manifests
         backend_file.write('XPCSHELL_TESTS += %s\n' % os.path.dirname(manifest))
         if obj.relativedir != '':
             manifest = '%s/%s' % (obj.relativedir, manifest)
         self.xpcshell_manifests.append(manifest)
 
     def _process_local_include(self, local_include, backend_file):