[PATCH] libsubcmd: reduce headers install spam

From: Thomas Weißschuh

Date: Tue Mar 03 2026 - 02:26:12 EST


The 'install_headers' target always prints 'INSTALL libsubcmd_headers',
even no command was actually updated. This also happens during a regular
kernel build when objtool is enabled. Such output is unnecessary and a
bit distracting.

Avoid the spurious output by using the header directory as intermediate
target which will inhibit the message when no headers are updated.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
---
tools/lib/subcmd/Makefile | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/lib/subcmd/Makefile b/tools/lib/subcmd/Makefile
index 8703ab487b68..282f3910b547 100644
--- a/tools/lib/subcmd/Makefile
+++ b/tools/lib/subcmd/Makefile
@@ -106,8 +106,12 @@ $(INSTALL_HDRS): $(INSTALL_HDRS_PFX)/%.h: %.h
$(call QUIET_INSTALL, $@) \
$(call do_install,$<,$(INSTALL_HDRS_PFX)/,644)

-install_headers: $(INSTALL_HDRS)
+$(INSTALL_HDRS_PFX): $(INSTALL_HDRS)
$(call QUIET_INSTALL, libsubcmd_headers)
+ @touch $@
+
+install_headers: $(INSTALL_HDRS_PFX)
+ @true

install: install_lib install_headers


---
base-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
change-id: 20260213-libsubcmd-spam-1f52f0d0c579

Best regards,
--
Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>