Bug 1416062 - Generated header files and wrappers should be in the installed-files group; r=chmanchester
authorMike Shal <mshal@mozilla.com>
Mon, 21 Nov 2016 15:52:42 -0500
changeset 446470 0806fc45779f5c88c0686f62cdf0ef0360f50b3c
parent 446469 c0a9377392b4d76c00a74577418450768b56ffc0
child 446471 32467b9838efbd3ea202238a55165ac8ab7d96fb
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschmanchester
bugs1416062
milestone59.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 1416062 - Generated header files and wrappers should be in the installed-files group; r=chmanchester We'll need all of these before compilation, so stick them all in the same group. MozReview-Commit-ID: Gl1zvnb1Bjt
python/mozbuild/mozbuild/backend/tup.py
--- a/python/mozbuild/mozbuild/backend/tup.py
+++ b/python/mozbuild/mozbuild/backend/tup.py
@@ -270,16 +270,21 @@ class TupOnly(CommonBackend, PartialBack
 
     def _process_generated_file(self, backend_file, obj):
         # TODO: These are directories that don't work in the tup backend
         # yet, because things they depend on aren't built yet.
         skip_directories = (
             'layout/style/test', # HostSimplePrograms
             'toolkit/library', # libxul.so
         )
+        install_exts = (
+            '.h',
+            '.inc',
+            'new', # 'new' is an output from make-stl-wrappers.py
+        )
         if obj.script and obj.method and obj.relobjdir not in skip_directories:
             backend_file.export_shell()
             cmd = self._py_action('file_generate')
             cmd.extend([
                 obj.script,
                 obj.method,
                 obj.outputs[0],
                 '%s.pp' % obj.outputs[0], # deps file required
@@ -287,21 +292,24 @@ class TupOnly(CommonBackend, PartialBack
             full_inputs = [f.full_path for f in obj.inputs]
             cmd.extend(full_inputs)
             cmd.extend(shell_quote(f) for f in obj.flags)
 
             outputs = []
             outputs.extend(obj.outputs)
             outputs.append('%s.pp' % obj.outputs[0])
 
+            extra_outputs = [self._installed_files] if any(f.endswith(install_exts) for f in obj.outputs) else None
+
             backend_file.rule(
                 display='python {script}:{method} -> [%o]'.format(script=obj.script, method=obj.method),
                 cmd=cmd,
                 inputs=full_inputs,
                 outputs=outputs,
+                extra_outputs=extra_outputs,
             )
 
     def _process_defines(self, backend_file, obj, host=False):
         defines = list(obj.get_defines())
         if defines:
             if host:
                 backend_file.host_defines = defines
             else: