Bug 1063874 - Move the parts of XPIDL_SOURCES handling in misc to export. r=gps
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 11 Feb 2015 08:44:31 +0900
changeset 228577 75bab86b7ea97db6616be066d41118e598bbdba6
parent 228576 88c4ddf14434cdeaf24870994f35bfd1ef180d8c
child 228578 df2290db92d0240942dad2e14b7ea7f302b07015
push id55459
push usermh@glandium.org
push dateWed, 11 Feb 2015 08:37:07 +0000
treeherdermozilla-inbound@75bab86b7ea9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1063874
milestone38.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 1063874 - Move the parts of XPIDL_SOURCES handling in misc to export. r=gps
config/rules.mk
python/mozbuild/mozbuild/backend/recursivemake.py
python/mozbuild/mozbuild/frontend/context.py
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -1153,17 +1153,17 @@ endif
 
 ################################################################################
 # Install a linked .xpt into the appropriate place.
 # This should ideally be performed by the non-recursive idl make file. Some day.
 ifdef XPT_NAME #{
 
 ifndef NO_DIST_INSTALL
 ifndef NO_INTERFACES_MANIFEST
-misc:: $(call mkdir_deps,$(FINAL_TARGET)/components)
+export:: $(call mkdir_deps,$(FINAL_TARGET)/components)
 	$(call py_action,buildlist,$(FINAL_TARGET)/components/interfaces.manifest 'interfaces $(XPT_NAME)')
 	$(call py_action,buildlist,$(FINAL_TARGET)/chrome.manifest 'manifest components/interfaces.manifest')
 endif
 endif
 
 endif #} XPT_NAME
 
 ################################################################################
--- a/python/mozbuild/mozbuild/backend/recursivemake.py
+++ b/python/mozbuild/mozbuild/backend/recursivemake.py
@@ -271,16 +271,17 @@ class RecursiveMakeBackend(CommonBackend
     However, as long as there are Makefile.in files in the tree, we are tied to
     recursive make and thus will need this backend.
     """
 
     def _init(self):
         CommonBackend._init(self)
 
         self._backend_files = {}
+        self._idl_dirs = set()
 
         def detailed(summary):
             s = '{:d} total backend files; ' \
                 '{:d} created; {:d} updated; {:d} unchanged; ' \
                 '{:d} deleted; {:d} -> {:d} Makefile'.format(
                 summary.created_count + summary.updated_count +
                 summary.unchanged_count,
                 summary.created_count,
@@ -342,16 +343,17 @@ class RecursiveMakeBackend(CommonBackend
 
         CommonBackend.consume_object(self, obj)
 
         # CommonBackend handles XPIDLFile and TestManifest, but we want to do
         # some extra things for them.
         if isinstance(obj, XPIDLFile):
             backend_file.idls.append(obj)
             backend_file.xpt_name = '%s.xpt' % obj.module
+            self._idl_dirs.add(obj.relobjdir)
 
         elif isinstance(obj, TestManifest):
             self._process_test_manifest(obj, backend_file)
 
         # If CommonBackend acknowledged the object, we're done with it.
         if obj._ack:
             return
 
@@ -571,19 +573,23 @@ class RecursiveMakeBackend(CommonBackend
 
         root_deps_mk = Makefile()
 
         # Fill the dependencies for traversal of each tier.
         for tier, filter in filters:
             main, all_deps = \
                 self._traversal.compute_dependencies(filter)
             for dir, deps in all_deps.items():
-                if deps is not None:
+                if deps is not None or (dir in self._idl_dirs \
+                                        and tier == 'export'):
                     rule = root_deps_mk.create_rule(['%s/%s' % (dir, tier)])
+                if deps:
                     rule.add_dependencies('%s/%s' % (d, tier) for d in deps if d)
+                if dir in self._idl_dirs and tier == 'export':
+                    rule.add_dependencies(['xpcom/xpidl/%s' % tier])
             rule = root_deps_mk.create_rule(['recurse_%s' % tier])
             if main:
                 rule.add_dependencies('%s/%s' % (d, tier) for d in main)
 
         all_compile_deps = reduce(lambda x,y: x|y,
             self._compile_graph.values()) if self._compile_graph else set()
         compile_roots = set(self._compile_graph.keys()) - all_compile_deps
 
--- a/python/mozbuild/mozbuild/frontend/context.py
+++ b/python/mozbuild/mozbuild/frontend/context.py
@@ -891,17 +891,17 @@ VARIABLES = {
 
     # IDL Generation.
     'XPIDL_SOURCES': (StrictOrderingOnAppendList, list,
         """XPCOM Interface Definition Files (xpidl).
 
         This is a list of files that define XPCOM interface definitions.
         Entries must be files that exist. Entries are almost certainly ``.idl``
         files.
-        """, 'misc'),
+        """, 'export'),
 
     'XPIDL_MODULE': (unicode, unicode,
         """XPCOM Interface Definition Module Name.
 
         This is the name of the ``.xpt`` file that is created by linking
         ``XPIDL_SOURCES`` together. If unspecified, it defaults to be the same
         as ``MODULE``.
         """, None),