[PATCH 2/3] kbuild: move preparation checks out of single-build
From: Vincent Mailhol
Date: Wed Nov 11 2026 - 08:47:02 EST
The missing-syscalls check and the atomic-checks are currently set as
preparation dependencies. However, these are not needed to compile, for
example, a single object.
Add a new prepare_checks target to group those checks and call it
conditionally only if we are not doing a single-build so that the
prepare target does not trigger that dependency anymore.
Signed-off-by: Vincent Mailhol <mailhol@xxxxxxxxxx>
---
Kbuild | 7 +++++--
Makefile | 2 +-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/Kbuild b/Kbuild
index 5a65be2d51b0..5151e32985c6 100644
--- a/Kbuild
+++ b/Kbuild
@@ -86,8 +86,11 @@ $(atomic-checks): $(obj)/.checked-%: include/linux/atomic/% FORCE
# A phony target that depends on all the preparation targets
-PHONY += prepare
-prepare: $(rq-offsets-file) missing-syscalls $(atomic-checks)
+PHONY += prepare prepare_checks
+prepare: $(rq-offsets-file)
+ @:
+
+prepare_checks: missing-syscalls $(atomic-checks)
@:
# Ordinary directory descending
diff --git a/Makefile b/Makefile
index f895752d4b05..2c1289a44c56 100644
--- a/Makefile
+++ b/Makefile
@@ -1413,8 +1413,8 @@ archprepare: outputmakefile archheaders archscripts scripts include/config/kerne
include/generated/rustc_cfg remove-stale-files
prepare0: archprepare
+ $(Q)$(MAKE) $(build)=. prepare $(if $(single-build),,prepare_checks)
$(Q)$(MAKE) $(build)=scripts/mod
- $(Q)$(MAKE) $(build)=. prepare
# All the preparing..
prepare: prepare0
--
2.56.1