[PATCH] libsubcmd: reduce headers install spam

Thomas Weißschuh posted 1 patch 1 month, 1 week ago
tools/lib/subcmd/Makefile | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
[PATCH] libsubcmd: reduce headers install spam
Posted by Thomas Weißschuh 1 month, 1 week ago
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@linutronix.de>
---
 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@linutronix.de>