Bug 1168251 - Do a partial recursion when doing make -C some/path compile. r=gps

This commit is contained in:
Mike Hommey 2015-05-26 17:38:15 +09:00
parent 0af0779f16
commit 655e5f2988

View File

@ -65,9 +65,10 @@ CURRENT_DIRS := $($(CURRENT_TIER)_dirs)
# Need a list of compile targets because we can't use pattern rules:
# https://savannah.gnu.org/bugs/index.php?42833
# Only recurse the paths starting with RECURSE_BASE_DIR when provided.
.PHONY: $(compile_targets)
$(compile_targets):
$(call SUBMAKE,$(@F),$(@D))
$(if $(filter $(RECURSE_BASE_DIR)%,$@),$(call SUBMAKE,$(@F),$(@D)))
# The compile tier has different rules from other tiers.
ifneq ($(CURRENT_TIER),compile)
@ -125,7 +126,8 @@ $(foreach subtier,$(filter-out compile,$(TIERS)),$(eval $(call CREATE_SUBTIER_TR
ifndef TOPLEVEL_BUILD
ifdef COMPILE_ENVIRONMENT
libs:: target host
compile::
@$(MAKE) -C $(DEPTH) compile RECURSE_BASE_DIR=$(relativesrcdir)/
endif # COMPILE_ENVIRONMENT
endif