From 399d530b9ba8ec9ad0efb5d87e8dfb0a57199811 Mon Sep 17 00:00:00 2001 From: Chris Manchester Date: Mon, 3 Jun 2019 20:33:36 +0000 Subject: [PATCH] Bug 1556185 - Ensure autoconf.mk is tracked as a dependency when preprocessing webidls. r=nalexander webidlsrcs.mk is treated specially by the build system, and this entire process should be supported better by moz.build, but in the meantime this fixes the clobber bug caused by not re-building these targets when defines are updated. Differential Revision: https://phabricator.services.mozilla.com/D33415 --HG-- extra : moz-landing-system : lando --- dom/bindings/Makefile.in | 9 +++++++++ python/mozbuild/mozbuild/backend/recursivemake.py | 5 ++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/dom/bindings/Makefile.in b/dom/bindings/Makefile.in index b304623b8b05..84518efde85f 100644 --- a/dom/bindings/Makefile.in +++ b/dom/bindings/Makefile.in @@ -6,6 +6,15 @@ webidl_base := $(topsrcdir)/dom/webidl ifdef COMPILE_ENVIRONMENT +# Akin to GLOBAL_DEPS, but set early enough that webidlsrcs.mk +# can make use of them as dependencies. +WEBIDL_PP_DEPS := \ + backend.mk \ + Makefile \ + $(DEPTH)/config/autoconf.mk \ + $(topsrcdir)/config/config.mk \ + $(NULL) + # Generated by moz.build include webidlsrcs.mk diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild/mozbuild/backend/recursivemake.py index 22c5c46d185e..1c8574104af3 100644 --- a/python/mozbuild/mozbuild/backend/recursivemake.py +++ b/python/mozbuild/mozbuild/backend/recursivemake.py @@ -1782,7 +1782,10 @@ class RecursiveMakeBackend(CommonBackend): for source in sorted(webidls.all_preprocessed_sources()): basename = os.path.basename(source) rule = mk.create_rule([basename]) - rule.add_dependencies([source, '$(GLOBAL_DEPS)']) + # GLOBAL_DEPS would be used here, but due to the include order of + # our makefiles it's not set early enough to be useful, so we use + # WEBIDL_PP_DEPS, which has analagous content. + rule.add_dependencies([source, '$(WEBIDL_PP_DEPS)']) rule.add_commands([ # Remove the file before writing so bindings that go from # static to preprocessed don't end up writing to a symlink,