aboutsummaryrefslogtreecommitdiffstats
path: root/include/subdir.mk
diff options
context:
space:
mode:
Diffstat (limited to 'include/subdir.mk')
-rw-r--r--include/subdir.mk10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/subdir.mk b/include/subdir.mk
index be080859b7..d33b947fdf 100644
--- a/include/subdir.mk
+++ b/include/subdir.mk
@@ -29,12 +29,14 @@ diralias=$(if $(findstring $(1),$(call lastdir,$(1))),,$(call lastdir,$(1)))
subdir_make_opts = \
-r -C $(1) \
BUILD_SUBDIR="$(1)" \
- BUILD_VARIANT="$(4)"
+ BUILD_VARIANT="$(4)" \
+ ALL_VARIANTS="$(5)"
# 1: subdir
# 2: target
# 3: build type
# 4: build variant
+# 5: all variants
log_make = \
$(if $(call debug,$(1),v),,@)+ \
$(if $(BUILD_LOG), \
@@ -62,15 +64,15 @@ define subdir
$(foreach target,$(SUBTARGETS) $($(1)/subtargets),
$(foreach btype,$(buildtypes-$(bd)),
$(call warn_eval,$(1)/$(bd),t,T,$(1)/$(bd)/$(btype)/$(target): $(if $(NO_DEPS)$(QUILT),,$($(1)/$(bd)/$(btype)/$(target)) $(call $(1)//$(btype)/$(target),$(1)/$(bd)/$(btype))))
- $(call log_make,$(1)/$(bd),$(target),$(btype),$(filter-out __default,$(variant))) \
+ $(call log_make,$(1)/$(bd),$(target),$(btype),$(filter-out __default,$(variant)),$($(1)/$(bd)/variants)) \
|| $(call ERROR,$(2), ERROR: $(1)/$(bd) [$(btype)] failed to build.,$(findstring $(bd),$($(1)/builddirs-ignore-$(btype)-$(target))))
$(if $(call diralias,$(bd)),$(call warn_eval,$(1)/$(bd),l,T,$(1)/$(call diralias,$(bd))/$(btype)/$(target): $(1)/$(bd)/$(btype)/$(target)))
)
$(call warn_eval,$(1)/$(bd),t,T,$(1)/$(bd)/$(target): $(if $(NO_DEPS)$(QUILT),,$($(1)/$(bd)/$(target)) $(call $(1)//$(target),$(1)/$(bd))))
$(foreach variant,$(if $(BUILD_VARIANT),$(BUILD_VARIANT),$(if $(strip $($(1)/$(bd)/variants)),$($(1)/$(bd)/variants),$(if $($(1)/$(bd)/default-variant),$($(1)/$(bd)/default-variant),__default))),
$(if $(BUILD_LOG),@mkdir -p $(BUILD_LOG_DIR)/$(1)/$(bd)/$(filter-out __default,$(variant)))
- $(if $($(1)/autoremove),$(call rebuild_check,$(1)/$(bd),$(target),,$(filter-out __default,$(variant))))
- $(call log_make,$(1)/$(bd),$(target),,$(filter-out __default,$(variant))) \
+ $(if $($(1)/autoremove),$(call rebuild_check,$(1)/$(bd),$(target),,$(filter-out __default,$(variant)),$($(1)/$(bd)/variants)))
+ $(call log_make,$(1)/$(bd),$(target),,$(filter-out __default,$(variant)),$($(1)/$(bd)/variants)) \
|| $(call ERROR,$(1), ERROR: $(1)/$(bd) failed to build$(if $(filter-out __default,$(variant)), (build variant: $(variant))).,$(findstring $(bd),$($(1)/builddirs-ignore-$(target))))
)
$(if $(PREREQ_ONLY)$(DUMP_TARGET_DB),,