build: log failed host builds in the error file of the subdir

Commit 501123eb7a ("include/subdir: on build failure always print
error") passes $(2) instead of $(1) to ERROR for the builds of a build
type, such as host builds. subdir has no second parameter, so with
BUILD_LOG set a failed host build is written to logs/error.txt instead
of logs/package/error.txt, where the other errors of the subdir go.

Fixes: 501123eb7a ("include/subdir: on build failure always print error")
Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
John Crispin committed 2026-09-22 18:18:58 +02:00
1 parent 39ed48c8f1
commit 1315d21949
1 file changed
+1 -1
+1 -1
View File
@@ -68,7 +68,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)),$($(1)/$(bd)/variants)) \
|| $(call ERROR,$(2), ERROR: $(1)/$(bd) [$(btype)] failed to build.,$(findstring $(bd),$($(1)/builddirs-ignore-$(btype)-$(target))))
|| $(call ERROR,$(1), 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))))