[v2,5/5] kbuild: check Make version

Message ID 20221123151828.509565-5-masahiroy@kernel.org
State New
Headers
Series [v2,1/5] kbuild: add test-{le,ge,lt,gt} macros |

Commit Message

Masahiro Yamada Nov. 23, 2022, 3:18 p.m. UTC
  This is implemented based on test-le. It will work until GNU Make 10
is released.

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

(no changes since v1)

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

Comments

Nicolas Schier Nov. 23, 2022, 9:19 p.m. UTC | #1
On Thu 24 Nov 2022 00:18:28 GMT, Masahiro Yamada wrote:
> This is implemented based on test-le. It will work until GNU Make 10
> is released.

... and as long as nobody uses make versions w/ minor version numbers, 
cp. patch 3/5.

Kind regards,
Nicolas

> 
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
> 
> (no changes since v1)
> 
>  Makefile | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/Makefile b/Makefile
> index 60ce9dcafc72..797fafbc1b45 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -368,6 +368,9 @@ else # !mixed-build
>  
>  include $(srctree)/scripts/Kbuild.include
>  
> +# Check for the minimal Make version
> +$(if $(call test-lt, $(MAKE_VERSION), 3.82), $(error Make $(MAKE_VERSION) is too old))
> +
>  # Read KERNELRELEASE from include/config/kernel.release (if it exists)
>  KERNELRELEASE = $(call read-file, include/config/kernel.release)
>  KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
> -- 
> 2.34.1
  
Nicolas Schier Nov. 24, 2022, 7:08 a.m. UTC | #2
On Wed 23 Nov 2022 22:19:33 GMT, Nicolas Schier wrote:
> On Thu 24 Nov 2022 00:18:28 GMT, Masahiro Yamada wrote:
> > This is implemented based on test-le. It will work until GNU Make 10
> > is released.
> 
> ... and as long as nobody uses make versions w/ minor version numbers, 
> cp. patch 3/5.
> 

I had a wrong understanding of the ASCII sort and forgot to re-check my 
own assumptions.

Thanks for that whole patch set!

Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>


> 
> > 
> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > ---
> > 
> > (no changes since v1)
> > 
> >  Makefile | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/Makefile b/Makefile
> > index 60ce9dcafc72..797fafbc1b45 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -368,6 +368,9 @@ else # !mixed-build
> >  
> >  include $(srctree)/scripts/Kbuild.include
> >  
> > +# Check for the minimal Make version
> > +$(if $(call test-lt, $(MAKE_VERSION), 3.82), $(error Make $(MAKE_VERSION) is too old))
> > +
> >  # Read KERNELRELEASE from include/config/kernel.release (if it exists)
> >  KERNELRELEASE = $(call read-file, include/config/kernel.release)
> >  KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
> > -- 
> > 2.34.1
> 
> -- 
> epost|xmpp: nicolas@fjasle.eu          irc://oftc.net/nsc
> ↳ gpg: 18ed 52db e34f 860e e9fb  c82b 7d97 0932 55a0 ce7f
>      -- frykten for herren er opphav til kunnskap --
  

Patch

diff --git a/Makefile b/Makefile
index 60ce9dcafc72..797fafbc1b45 100644
--- a/Makefile
+++ b/Makefile
@@ -368,6 +368,9 @@  else # !mixed-build
 
 include $(srctree)/scripts/Kbuild.include
 
+# Check for the minimal Make version
+$(if $(call test-lt, $(MAKE_VERSION), 3.82), $(error Make $(MAKE_VERSION) is too old))
+
 # Read KERNELRELEASE from include/config/kernel.release (if it exists)
 KERNELRELEASE = $(call read-file, include/config/kernel.release)
 KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)