X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/9dd40f163d25c4e4262d21e4da5120e2e1560050..0b09e23cfc42d0d31c31cdee1a6a196045f1f4d3:/include/subdir.mk diff --git a/include/subdir.mk b/include/subdir.mk index afc95a442..a8a87b5e2 100644 --- a/include/subdir.mk +++ b/include/subdir.mk @@ -5,7 +5,7 @@ # See /LICENSE for more information. # -SUBTARGETS:=clean download prepare compile install update refresh prereq dist distcheck +SUBTARGETS:=clean download prepare compile install update refresh prereq dist distcheck configure subtarget-default = $(filter-out ., \ $(if $($(1)/builddirs-$(2)),$($(1)/builddirs-$(2)), \ @@ -35,7 +35,7 @@ define subdir ) $(call warn_eval,$(1)/$(bd),t,T,$(1)/$(bd)/$(target): $(if $(QUILT),,$($(1)/$(bd)/$(target)) $(call $(1)//$(target),$(1)/$(bd)))) $(if $(BUILD_LOG),@mkdir -p $(BUILD_LOG_DIR)/$(1)/$(bd)) - $(foreach variant,$(if $(BUILD_VARIANT),$(BUILD_VARIANT),$(if $($(1)/$(bd)/variants),$($(1)/$(bd)/variants),__default)), + $(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),set -o pipefail;) $$(SUBMAKE) -C $(1)/$(bd) $(target) BUILD_VARIANT="$(filter-out __default,$(variant))" $(if $(BUILD_LOG),SILENT= 2>&1 | tee $(BUILD_LOG_DIR)/$(1)/$(bd)/$(target).txt) $(if $(findstring $(bd),$($(1)/builddirs-ignore-$(target))), || $(call MESSAGE, ERROR: $(1)/$(bd) failed to build$(if $(filter-out __default,$(variant)), (build variant: $(variant))).)) ) $$(if $(call debug,$(1)/$(bd),v),,.SILENT: $(1)/$(bd)/$(target))