Bug 879809 - Don't export MOZBUILD_BACKEND_CHECKED to independent build systems; r=ted

This commit is contained in:
Gregory Szorc 2013-06-18 12:22:56 -07:00
parent 09024c5489
commit f1dc3f5c2d
2 changed files with 20 additions and 20 deletions

View File

@ -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))

View File

@ -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))