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
--- 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: