Bug 1470552 - Update Makefile.in to refer to stub file target for buildid.h and source-repo.h generated in backend.mk draft
authorChris Manchester <cmanchester@mozilla.com>
Fri, 22 Jun 2018 15:07:28 -0700
changeset 809755 d94195e55aceea6c65fcff57adaafdb2b7323a6c
parent 809559 6b6f3f6ecf142908b3e437d3bc3fac75540a9bcb
push id113800
push userbmo:cmanchester@mozilla.com
push dateFri, 22 Jun 2018 22:08:21 +0000
bugs1470552
milestone62.0a1
Bug 1470552 - Update Makefile.in to refer to stub file target for buildid.h and source-repo.h generated in backend.mk MozReview-Commit-ID: EKM5Y6bLYM3
Makefile.in
python/mozbuild/mozbuild/test/backend/test_build.py
--- a/Makefile.in
+++ b/Makefile.in
@@ -30,17 +30,23 @@ DIST_GARBAGE = config.cache config.log c
    netwerk/necko-config.h xpcom/xpcom-config.h xpcom/xpcom-private.h \
    .mozconfig.mk
 
 ifndef MOZ_PROFILE_USE
 # Automation builds should always have a new buildid, but for the sake of not
 # re-linking libxul on every incremental build we do not enforce this for
 # developer builds.  Tests always need a new buildid as well.
 ifneq (,$(MOZ_AUTOMATION)$(MOZ_BUILD_DATE)$(TEST_MOZBUILD))
-buildid.h source-repo.h: FORCE
+$(MDDEPDIR)/buildid.h.stub $(MDDEPDIR)/source-repo.h.stub: FORCE
+endif
+# Additionally, provide a dummy target during tests, because
+# faster/rules.mk will expect these targets to exist.
+ifdef TEST_MOZBUILD
+source-repo.h: $(MDDEPDIR)/source-repo.h.stub
+buildid.h: $(MDDEPDIR)/buildid.h.stub
 endif
 endif
 
 ifdef JS_STANDALONE
 configure_dir = $(topsrcdir)/js/src
 else
 configure_dir = $(topsrcdir)
 endif
--- a/python/mozbuild/mozbuild/test/backend/test_build.py
+++ b/python/mozbuild/mozbuild/test/backend/test_build.py
@@ -117,16 +117,17 @@ class TestBuild(unittest.TestCase):
                                 silent=False, line_handler=handle_make_line)
 
             self.validate(config)
 
     def test_faster_make(self):
         substs = list(BASE_SUBSTS) + [
             ('MOZ_BUILD_APP', 'dummy_app'),
             ('MOZ_WIDGET_TOOLKIT', 'dummy_widget'),
+            ('BUILD_BACKENDS', 'FasterMake+RecursiveMake'),
         ]
         with self.do_test_backend(RecursiveMakeBackend, FasterMakeBackend,
                                   substs=substs) as config:
             buildid = mozpath.join(config.topobjdir, 'config', 'buildid')
             ensureParentDir(buildid)
             with open(buildid, 'w') as fh:
                 fh.write('20100101012345\n')