[PATCH 1/3] tools/build: Deduplicate the descend commands
From: Thomas Weißschuh
Date: Mon Nov 02 2026 - 00:56:31 EST
The verbose and non-verbose variants of the descend command are nearly
identical. Only the 'echo DESCEND' is different.
Simplify the variable definitions to be more similar to the other QUIET
commands.
This will also simplify some other changes down the line.
Signed-off-by: Thomas Weißschuh <linux@xxxxxxxxxxxxxx>
---
tools/scripts/Makefile.include | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include
index 378387f62960..db989830bbac 100644
--- a/tools/scripts/Makefile.include
+++ b/tools/scripts/Makefile.include
@@ -206,7 +206,7 @@ export quiet Q
# Call by doing: $(call descend,directory[,target])
#
descend = \
- +mkdir -p $(OUTPUT)$(1) && \
+ +$(QUIET_DESCEND)mkdir -p $(OUTPUT)$(1) && \
$(MAKE) $(COMMAND_O) subdir=$(if $(subdir),$(subdir)/$(1),$(1)) $(PRINT_DIR) -C $(1) $(2)
QUIET_SUBDIR0 = +$(MAKE) $(COMMAND_O) -C # space to separate -C and subdir
@@ -229,10 +229,7 @@ ifneq ($(silent),1)
QUIET_BISON = @echo ' BISON '$@;
QUIET_GENSKEL = @echo ' GENSKEL '$@;
- descend = \
- +@echo ' DESCEND '$(1); \
- mkdir -p $(OUTPUT)$(1) && \
- $(MAKE) $(COMMAND_O) subdir=$(if $(subdir),$(subdir)/$(1),$(1)) $(PRINT_DIR) -C $(1) $(2)
+ QUIET_DESCEND = @echo ' DESCEND '$(1);
QUIET_CLEAN = @printf ' CLEAN %s\n' $1;
QUIET_INSTALL = @printf ' INSTALL %s\n' $1;
--
2.56.0