From 05a7163507930b56804896818c80e92a2454ef4d Mon Sep 17 00:00:00 2001 From: Arnaldo Garcia Rincon Date: Wed, 22 Jun 2022 19:26:43 +0000 Subject: [PATCH] Revert "kbuild: hide tools/ build targets from external module builds" This reverts commit 1bb0b18a06dceee1fdc32161a72e28eab6f011c4 in which the targets to build "tools/*" were hidden for external modules, but they are required by the kmod kit since the 'tools/*' binaries are not distributed as part of the archive. Signed-off-by: Arnaldo Garcia Rincon --- Makefile | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 346b898eb..e3d39f7c3 100644 --- a/Makefile +++ b/Makefile @@ -1421,19 +1421,6 @@ ifneq ($(wildcard $(resolve_btfids_O)),) $(Q)$(MAKE) -sC $(srctree)/tools/bpf/resolve_btfids O=$(resolve_btfids_O) clean endif -# Clear a bunch of variables before executing the submake -ifeq ($(quiet),silent_) -tools_silent=s -endif - -tools/: FORCE - $(Q)mkdir -p $(objtree)/tools - $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(tools_silent) $(filter --j% -j,$(MAKEFLAGS))" O=$(abspath $(objtree)) subdir=tools -C $(srctree)/tools/ - -tools/%: FORCE - $(Q)mkdir -p $(objtree)/tools - $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(tools_silent) $(filter --j% -j,$(MAKEFLAGS))" O=$(abspath $(objtree)) subdir=tools -C $(srctree)/tools/ $* - # --------------------------------------------------------------------------- # Kernel selftest @@ -2124,6 +2111,20 @@ kernelversion: image_name: @echo $(KBUILD_IMAGE) +# Clear a bunch of variables before executing the submake + +ifeq ($(quiet),silent_) +tools_silent=s +endif + +tools/: FORCE + $(Q)mkdir -p $(objtree)/tools + $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(tools_silent) $(filter --j% -j,$(MAKEFLAGS))" O=$(abspath $(objtree)) subdir=tools -C $(srctree)/tools/ + +tools/%: FORCE + $(Q)mkdir -p $(objtree)/tools + $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(tools_silent) $(filter --j% -j,$(MAKEFLAGS))" O=$(abspath $(objtree)) subdir=tools -C $(srctree)/tools/ $* + quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files))) cmd_rmfiles = rm -rf $(rm-files) -- 2.39.1