ifndef INCLUDED_RULES_MK include $(topsrcdir)/config/rules.mk endif
ifeq (.,$(DEPTH))
include root.mk
$(TIERS):: $(call BUILDSTATUS,TIER_START $@) +$(MAKE) recurse_$@ $(call BUILDSTATUS,TIER_FINISH $@)
binaries:: +$(MAKE) recurse_compile
CURRENT_TIER := $(filter $(foreach tier,$(TIERS),recurse_$(tier) $(tier)-deps),$(MAKECMDGOALS)) ifneq (,$(filter-out 0 1,$(words $(CURRENT_TIER)))) $(error $(CURRENT_TIER) not supported on the same make command line) endif CURRENT_TIER := $(subst recurse_,,$(CURRENT_TIER:-deps=))
ifdef CURRENT_TIER ifeq (0,$(MAKELEVEL)) export NO_RECURSE_MAKELEVEL=1 else export NO_RECURSE_MAKELEVEL=$(word $(MAKELEVEL),2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20) endif endif
RECURSE = $(if $(RECURSE_TRACE_ONLY),@echo $2/$1,$(call SUBMAKE,$1,$2))
CURRENT_DIRS := $($(CURRENT_TIER)_dirs)
.PHONY: $(compile_targets) $(syms_targets) $(compile_targets) $(syms_targets): $(if $(filter $(RECURSE_BASE_DIR)%,$@),$(call RECURSE,$(@F),$(@D)))
$(syms_targets): %/syms: %/target
ifdef MOZ_AUTOMATION ifdef MOZ_CRASHREPORTER recurse_compile: $(syms_targets) endif endif
.PHONY: recurse_syms recurse_syms: $(syms_targets)
ifneq (,$(filter toolkit/crashreporter/google-breakpad/src/tools/%/dump_syms/host,$(compile_targets))) $(syms_targets): $(filter toolkit/crashreporter/google-breakpad/src/tools/%/dump_syms/host,$(compile_targets)) endif
ifneq ($(CURRENT_TIER),compile)
$(addsuffix /$(CURRENT_TIER),$(CURRENT_DIRS)): %/$(CURRENT_TIER): $(call RECURSE,$(CURRENT_TIER),$*)
.PHONY: $(addsuffix /$(CURRENT_TIER),$(CURRENT_DIRS))
$(addsuffix /Makefile,$(CURRENT_DIRS)) $(addsuffix /backend.mk,$(CURRENT_DIRS)):
ifeq ($(CURRENT_TIER),export)
$(addsuffix /$(CURRENT_TIER),$(filter-out config,$(CURRENT_DIRS))): config/$(CURRENT_TIER)
ifdef COMPILE_ENVIRONMENT ifneq (,$(filter config/host, $(compile_targets))) $(addsuffix /$(CURRENT_TIER),$(CURRENT_DIRS)): config/host endif endif endif
endif # ifeq ($(CURRENT_TIER),compile)
else
ifeq ($(NO_RECURSE_MAKELEVEL),$(MAKELEVEL))
$(TIERS)::
else
define CREATE_SUBTIER_TRAVERSAL_RULE .PHONY: $(1)
$(1):: $$(SUBMAKEFILES) $$(LOOP_OVER_DIRS)
endef
$(foreach subtier,$(filter-out compile,$(TIERS)),$(eval $(call CREATE_SUBTIER_TRAVERSAL_RULE,$(subtier))))
ifndef TOPLEVEL_BUILD ifdef COMPILE_ENVIRONMENT compile:: @$(MAKE) -C $(DEPTH) compile RECURSE_BASE_DIR=$(relativesrcdir)/ endif # COMPILE_ENVIRONMENT endif
endif # ifeq ($(NO_RECURSE_MAKELEVEL),$(MAKELEVEL))
endif # ifeq (.,$(DEPTH))
recurse: @$(RECURSED_COMMAND) $(LOOP_OVER_DIRS)
ifeq (.,$(DEPTH))
js/xpconnect/src/export: dom/bindings/export xpcom/xpidl/export accessible/xpcom/export: xpcom/xpidl/export
widget/android/bindings/export: build/annotationProcessors/export
xpcom/xpidl/export: xpcom/idl-parser/xpidl/export
ifdef ENABLE_CLANG_PLUGIN $(filter-out config/host build/unix/stdc++compat/% build/clang-plugin/%,$(compile_targets)): build/clang-plugin/target build/clang-plugin/tests/target build/clang-plugin/tests/target: build/clang-plugin/target endif
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk3) toolkit/library/target: widget/gtk/mozgtk/gtk3/target endif ifdef MOZ_LDAP_XPCOM ldap/target: security/target mozglue/build/target toolkit/library/target: ldap/target endif endif
$(addprefix build/unix/stdc++compat/,target host) build/clang-plugin/target: config/export