All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kbuild: ensure Make >= 3.82 is used
@ 2022-12-11  3:03 Masahiro Yamada
  2022-12-12 17:21 ` Nathan Chancellor
  0 siblings, 1 reply; 7+ messages in thread
From: Masahiro Yamada @ 2022-12-11  3:03 UTC (permalink / raw)
  To: linux-kbuild
  Cc: linux-kernel, Masahiro Yamada, Nathan Chancellor,
	Nick Desaulniers, Nicolas Schier

Documentation/process/changes.rst notes the minimal GNU Make version,
but it is not checked anywhere.

We could check $(MAKE_VERSION), but another simple way is to check
$(.FEATURES) since the feature list always grows although this way
is not always possible. For example Make 4.0 through 4.2 have the
same set of $(.FEATURES).

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

Changes in v3:
  - Check the version in a different way

 Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Makefile b/Makefile
index 2dda1e9a717a..66dfc5751470 100644
--- a/Makefile
+++ b/Makefile
@@ -11,6 +11,11 @@ NAME = Hurr durr I'ma ninja sloth
 # Comments in this file are targeted only to the developer, do not
 # expect to learn how to build the kernel reading this file.
 
+# Ensure Make >= 3.82
+ifeq ($(filter undefine,$(.FEATURES)),)
+$(error Make $(MAKE_VERSION) is too old)
+endif
+
 $(if $(filter __%, $(MAKECMDGOALS)), \
 	$(error targets prefixed with '__' are only for internal use))
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-12-16  4:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-11  3:03 [PATCH] kbuild: ensure Make >= 3.82 is used Masahiro Yamada
2022-12-12 17:21 ` Nathan Chancellor
2022-12-13  3:58   ` Nicolas Schier
2022-12-13 10:05     ` Nicolas Schier
2022-12-13 16:42       ` Nathan Chancellor
2022-12-14 11:05     ` David Laight
2022-12-16  4:30       ` Nicolas Schier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.