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.

Assisted-by: LLM
Signed-off-by: Sasha Levin <[email protected]>
---
 Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Makefile b/Makefile
index af5d0a9d51df9..1c55086ea5c8b 100644
--- a/Makefile
+++ b/Makefile
@@ -1638,6 +1638,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


Reply via email to