[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250812-kbuild-hdrtest-fixes-v1-2-7ad2af66cd58@linutronix.de>
Date: Tue, 12 Aug 2025 07:33:05 +0200
From: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
To: Nathan Chancellor <nathan@...nel.org>,
Nicolas Schier <nicolas.schier@...ux.dev>
Cc: linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
Thomas Weißschuh <thomas.weissschuh@...utronix.de>
Subject: [PATCH 2/6] kbuild: uapi: only update hdrtest output on success
If a header test fails, the output should not be updated.
Otherwise the next make invocation will not rerun the test.
Also headers_check.pl should only run if the syntax check invocation
before succeeded.
Add explicit sequencening.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
---
usr/include/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/usr/include/Makefile b/usr/include/Makefile
index c7f164952b33acf6c7b8eb7ce91cd192bfc39ad2..6868d183f36d532cd3d4023b936c67b8a58a9ba5 100644
--- a/usr/include/Makefile
+++ b/usr/include/Makefile
@@ -81,8 +81,8 @@ always-y := $(patsubst $(obj)/%.h,%.hdrtest, $(shell find $(obj) -name '*.h' 2>/
quiet_cmd_hdrtest = HDRTEST $<
cmd_hdrtest = \
$(CC) $(c_flags) -fsyntax-only -x c /dev/null \
- $(if $(filter-out $(no-header-test), $*.h), -include $< -include $<); \
- $(PERL) $(src)/headers_check.pl $(obj) $<; \
+ $(if $(filter-out $(no-header-test), $*.h), -include $< -include $<) && \
+ $(PERL) $(src)/headers_check.pl $(obj) $< && \
touch $@
$(obj)/%.hdrtest: $(obj)/%.h $(src)/headers_check.pl FORCE
--
2.50.1
Powered by blists - more mailing lists