[PATCH v3 6/7] kbuild: build the tools selected in tools/Kconfig as part of "make all"

From: Sasha Levin

Date: Sun Nov 01 2026 - 21:19:37 EST


With CONFIG_TOOLS_BUILD set, make "all" depend on tools_build, so the
selected tools are built with every kernel build, and allmodconfig and
allyesconfig builds catch changes that break them.

"make vmlinux", "make modules", single target and external module
builds are unaffected.

Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
---
Makefile | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/Makefile b/Makefile
index 7919263484f0a..2a69f4c73a641 100644
--- a/Makefile
+++ b/Makefile
@@ -1650,6 +1650,10 @@ PHONY += tools_build
tools_build: headers
$(Q)$(MAKE) -f $(srctree)/tools/Makefile.kbuild

+ifdef CONFIG_TOOLS_BUILD
+all: tools_build
+endif
+
# ---------------------------------------------------------------------------
# Kernel selftest

--
2.53.0