From f1dc3f5c2d615c28ca6008709933d55861c1ff21 Mon Sep 17 00:00:00 2001 From: Gregory Szorc Date: Tue, 18 Jun 2013 12:22:56 -0700 Subject: [PATCH] Bug 879809 - Don't export MOZBUILD_BACKEND_CHECKED to independent build systems; r=ted --- config/rules.mk | 20 ++++++++++---------- js/src/config/rules.mk | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/config/rules.mk b/config/rules.mk index 5f97168a1a3a..deb86b3e8dce 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -416,15 +416,20 @@ ifdef MOZ_UPDATE_XTERM UPDATE_TITLE = printf "\033]0;%s in %s\007" $(1) $(shell $(BUILD_TOOLS)/print-depth-path.sh)/$(2) ; endif -define SUBMAKE # $(call SUBMAKE,target,directory) +# Static directories are largely independent of our build system. But, they +# could share the same build mechanism (like moz.build files). We need to +# prevent leaking of our backend state to these independent build systems. This +# is why MOZBUILD_BACKEND_CHECKED isn't exported to make invocations for static +# directories. +define SUBMAKE # $(call SUBMAKE,target,directory,static) +@$(UPDATE_TITLE) -+$(MAKE) $(if $(2),-C $(2)) $(1) ++$(if $(3), MOZBUILD_BACKEND_CHECKED=,) $(MAKE) $(if $(2),-C $(2)) $(1) endef # The extra line is important here! don't delete it define TIER_DIR_SUBMAKE @echo "BUILDSTATUS TIERDIR_START $(2)" -$(call SUBMAKE,$(1),$(2)) +$(call SUBMAKE,$(1),$(2),$(3)) @echo "BUILDSTATUS TIERDIR_FINISH $(2)" endef # Ths empty line is important. @@ -441,11 +446,6 @@ LOOP_OVER_PARALLEL_DIRS = \ $(foreach dir,$(PARALLEL_DIRS),$(call SUBMAKE,$@,$(dir))) endif -ifneq (,$(strip $(STATIC_DIRS))) -LOOP_OVER_STATIC_DIRS = \ - $(foreach dir,$(STATIC_DIRS),$(call SUBMAKE,$@,$(dir))) -endif - ifneq (,$(strip $(TOOL_DIRS))) LOOP_OVER_TOOL_DIRS = \ $(foreach dir,$(TOOL_DIRS),$(call SUBMAKE,$@,$(dir))) @@ -671,7 +671,7 @@ else default all:: ifneq (,$(strip $(STATIC_DIRS))) - $(foreach dir,$(STATIC_DIRS),$(call SUBMAKE,,$(dir))) + $(foreach dir,$(STATIC_DIRS),$(call SUBMAKE,,$(dir),1)) endif $(MAKE) export $(MAKE) libs @@ -715,7 +715,7 @@ endif @echo "BUILDSTATUS DIRS $$($$@_dirs)" ifneq (,$(tier_$(1)_staticdirs)) @echo "BUILDSTATUS SUBTIER_START $(1) static" - $$(foreach dir,$$($$@_staticdirs),$$(call TIER_DIR_SUBMAKE,,$$(dir))) + $$(foreach dir,$$($$@_staticdirs),$$(call TIER_DIR_SUBMAKE,,$$(dir),1)) @echo "BUILDSTATUS SUBTIER_FINISH $(1) static" endif ifneq (,$(tier_$(1)_dirs)) diff --git a/js/src/config/rules.mk b/js/src/config/rules.mk index 5f97168a1a3a..deb86b3e8dce 100644 --- a/js/src/config/rules.mk +++ b/js/src/config/rules.mk @@ -416,15 +416,20 @@ ifdef MOZ_UPDATE_XTERM UPDATE_TITLE = printf "\033]0;%s in %s\007" $(1) $(shell $(BUILD_TOOLS)/print-depth-path.sh)/$(2) ; endif -define SUBMAKE # $(call SUBMAKE,target,directory) +# Static directories are largely independent of our build system. But, they +# could share the same build mechanism (like moz.build files). We need to +# prevent leaking of our backend state to these independent build systems. This +# is why MOZBUILD_BACKEND_CHECKED isn't exported to make invocations for static +# directories. +define SUBMAKE # $(call SUBMAKE,target,directory,static) +@$(UPDATE_TITLE) -+$(MAKE) $(if $(2),-C $(2)) $(1) ++$(if $(3), MOZBUILD_BACKEND_CHECKED=,) $(MAKE) $(if $(2),-C $(2)) $(1) endef # The extra line is important here! don't delete it define TIER_DIR_SUBMAKE @echo "BUILDSTATUS TIERDIR_START $(2)" -$(call SUBMAKE,$(1),$(2)) +$(call SUBMAKE,$(1),$(2),$(3)) @echo "BUILDSTATUS TIERDIR_FINISH $(2)" endef # Ths empty line is important. @@ -441,11 +446,6 @@ LOOP_OVER_PARALLEL_DIRS = \ $(foreach dir,$(PARALLEL_DIRS),$(call SUBMAKE,$@,$(dir))) endif -ifneq (,$(strip $(STATIC_DIRS))) -LOOP_OVER_STATIC_DIRS = \ - $(foreach dir,$(STATIC_DIRS),$(call SUBMAKE,$@,$(dir))) -endif - ifneq (,$(strip $(TOOL_DIRS))) LOOP_OVER_TOOL_DIRS = \ $(foreach dir,$(TOOL_DIRS),$(call SUBMAKE,$@,$(dir))) @@ -671,7 +671,7 @@ else default all:: ifneq (,$(strip $(STATIC_DIRS))) - $(foreach dir,$(STATIC_DIRS),$(call SUBMAKE,,$(dir))) + $(foreach dir,$(STATIC_DIRS),$(call SUBMAKE,,$(dir),1)) endif $(MAKE) export $(MAKE) libs @@ -715,7 +715,7 @@ endif @echo "BUILDSTATUS DIRS $$($$@_dirs)" ifneq (,$(tier_$(1)_staticdirs)) @echo "BUILDSTATUS SUBTIER_START $(1) static" - $$(foreach dir,$$($$@_staticdirs),$$(call TIER_DIR_SUBMAKE,,$$(dir))) + $$(foreach dir,$$($$@_staticdirs),$$(call TIER_DIR_SUBMAKE,,$$(dir),1)) @echo "BUILDSTATUS SUBTIER_FINISH $(1) static" endif ifneq (,$(tier_$(1)_dirs))