Bug 1305157 - Fix buildid.h and create source-repo.h in make before tup runs; r=gps
authorMike Shal <mshal@mozilla.com>
Wed, 28 Sep 2016 13:51:34 -0400
changeset 358416 1e844b5048255469f65842edd1753882820cb3c3
parent 358415 f65ae87fe51a0af01b2f31f98c50c1aa76ba4b47
child 358417 c4e99e641104fa2d6d68646897f16845bc36dacc
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-beta@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1305157
milestone52.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 1305157 - Fix buildid.h and create source-repo.h in make before tup runs; r=gps MozReview-Commit-ID: CPYA1OJUfo8
Makefile.in
python/mozbuild/mozbuild/backend/tup.py
--- a/Makefile.in
+++ b/Makefile.in
@@ -167,17 +167,17 @@ install-manifests: $(addprefix install-,
 ifneq (,$(filter FasterMake+RecursiveMake,$(BUILD_BACKENDS)))
 install-manifests: faster
 .PHONY: faster
 faster: install-dist/idl
 	$(MAKE) -C faster FASTER_RECURSIVE_MAKE=1
 endif
 
 .PHONY: tup
-tup: install-manifests buildid.h
+tup: install-manifests buildid.h source-repo.h
 	@$(TUP) $(if $(findstring s,$(filter-out --%,$(MAKEFLAGS))),,--verbose)
 
 # process_install_manifest needs to be invoked with --no-remove when building
 # js as standalone because automated builds are building nspr separately and
 # that would remove the resulting files.
 # Eventually, a standalone js build would just be able to build nspr itself,
 # removing the need for the former.
 ifdef JS_STANDALONE
--- a/python/mozbuild/mozbuild/backend/tup.py
+++ b/python/mozbuild/mozbuild/backend/tup.py
@@ -134,16 +134,25 @@ class TupOnly(CommonBackend, PartialBack
         # Even if CommonBackend acknowledged the object, we still need to let
         # the RecursiveMake backend also handle these objects.
         if consumed:
             return False
 
         backend_file = self._get_backend_file_for(obj)
 
         if isinstance(obj, GeneratedFile):
+            # These files are already generated by make before tup runs.
+            skip_files = (
+                'buildid.h',
+                'source-repo.h',
+            )
+            if any(f in skip_files for f in obj.outputs):
+                # Let the RecursiveMake backend handle these.
+                return False
+
             self._process_generated_file(backend_file, obj)
         elif isinstance(obj, Defines):
             self._process_defines(backend_file, obj)
         elif isinstance(obj, HostDefines):
             self._process_defines(backend_file, obj, host=True)
 
         return True