lkml.org 
[lkml]   [2022]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] kbuild: ensure Make >= 3.82 is used
Date
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
\
 
 \ /
  Last update: 2022-12-11 04:05    [W:0.085 / U:0.636 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site