aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKarel Kočí <karel.koci@nic.cz>2020-11-13 08:07:02 +0100
committerPaul Spooren <mail@aparcar.org>2020-11-27 18:02:40 -1000
commit501123eb7ae7ad06b16ba127fbe67cdf9d65a4da (patch)
tree7bdd8150f55945561775352491e60229848842c5 /include
parent1db9b5b6d65052eea7819cf0aee5163846a36bed (diff)
downloadupstream-501123eb7ae7ad06b16ba127fbe67cdf9d65a4da.tar.gz
upstream-501123eb7ae7ad06b16ba127fbe67cdf9d65a4da.tar.bz2
upstream-501123eb7ae7ad06b16ba127fbe67cdf9d65a4da.zip
include/subdir: on build failure always print error
It is impossible to locate package that failed the build just from log once more build is run in parallel (that is more than one make job). The only way is to scout log files for failed package going back trough log. This change makes it so error is printed for package that failed every time. Signed-off-by: Karel Kočí <karel.koci@nic.cz>
Diffstat (limited to 'include')
-rw-r--r--include/subdir.mk6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/subdir.mk b/include/subdir.mk
index 6512e24c2e..f01cd55f30 100644
--- a/include/subdir.mk
+++ b/include/subdir.mk
@@ -23,7 +23,7 @@ define subtarget
endef
define ERROR
- ($(call MESSAGE, $(2)); $(if $(BUILD_LOG), echo "$(2)" >> $(BUILD_LOG_DIR)/$(1)/error.txt))
+ ($(call MESSAGE, $(2)); $(if $(BUILD_LOG), echo "$(2)" >> $(BUILD_LOG_DIR)/$(1)/error.txt;) $(if $(3),, exit 1;))
endef
lastdir=$(word $(words $(subst /, ,$(1))),$(subst /, ,$(1)))
@@ -66,7 +66,7 @@ define subdir
$(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))) \
- $(if $(findstring $(bd),$($(1)/builddirs-ignore-$(btype)-$(target))), || $(call ERROR,$(1), ERROR: $(1)/$(bd) [$(btype)] failed to build.))
+ || $(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))))
@@ -74,7 +74,7 @@ define subdir
$(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 $(findstring $(bd),$($(1)/builddirs-ignore-$(target))), || $(call ERROR,$(1), ERROR: $(1)/$(bd) failed to build$(if $(filter-out __default,$(variant)), (build variant: $(variant))).))
+ || $(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),,
# aliases