linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Makefile: fix usage of kernelrelease with M=foo
@ 2023-03-14 13:02 nvidia
  2023-03-14 13:02 ` [PATCH] Makefile: Make kernelrelease target work with M= nvidia
  0 siblings, 1 reply; 3+ messages in thread
From: nvidia @ 2023-03-14 13:02 UTC (permalink / raw)
  To: linux-kbuild
  Cc: linux-kernel, Masahiro Yamada, Nathan Chancellor,
	Nick Desaulniers, Nicolas Schier

Commit 1cb86b6c3136 ("kbuild: save overridden KERNELRELEASE in
include/config/kernel.release") set the command that is used for
printing the output of kernelrelease only when KBUILD_EXTMOD is not set.

Test:

make M=$PWD -s kernelversion
make M=$PWD -s kernelrelease

Should print both. Prints only kernelversion and an empty line for
kernelrelease. Included a simple patch that fixes this test.



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

* [PATCH] Makefile: Make kernelrelease target work with M=
  2023-03-14 13:02 Makefile: fix usage of kernelrelease with M=foo nvidia
@ 2023-03-14 13:02 ` nvidia
  2023-03-14 14:14   ` Masahiro Yamada
  0 siblings, 1 reply; 3+ messages in thread
From: nvidia @ 2023-03-14 13:02 UTC (permalink / raw)
  To: linux-kbuild
  Cc: linux-kernel, Masahiro Yamada, Nathan Chancellor,
	Nick Desaulniers, Nicolas Schier, Tzafrir Cohen

From: Tzafrir Cohen <nvidia@cohens.org.il>

Fixes: commit 1cb86b6c3136 ("kbuild: save overridden KERNELRELEASE in include/config/kernel.release")

That commit required the use of filechk_kernel.release for the
kernelrelease Makefile target. It is currently only being set when
KBUILD_EXTMOD is not set. Make sure it is set in that case as well.

Signed-off-by: Tzafrir Cohen <nvidia@cohens.org.il>
---
 Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Makefile b/Makefile
index 3e7f96f12f08..e0859c608147 100644
--- a/Makefile
+++ b/Makefile
@@ -1880,6 +1880,8 @@ endif
 
 else # KBUILD_EXTMOD
 
+filechk_kernel.release = echo $(KERNELRELEASE)
+
 ###
 # External module support.
 # When building external modules the kernel used as basis is considered
-- 
2.39.2


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

* Re: [PATCH] Makefile: Make kernelrelease target work with M=
  2023-03-14 13:02 ` [PATCH] Makefile: Make kernelrelease target work with M= nvidia
@ 2023-03-14 14:14   ` Masahiro Yamada
  0 siblings, 0 replies; 3+ messages in thread
From: Masahiro Yamada @ 2023-03-14 14:14 UTC (permalink / raw)
  To: nvidia
  Cc: linux-kbuild, linux-kernel, Nathan Chancellor, Nick Desaulniers,
	Nicolas Schier

On Tue, Mar 14, 2023 at 10:04 PM <nvidia@cohens.org.il> wrote:
>
> From: Tzafrir Cohen <nvidia@cohens.org.il>
>
> Fixes: commit 1cb86b6c3136 ("kbuild: save overridden KERNELRELEASE in include/config/kernel.release")
>
> That commit required the use of filechk_kernel.release for the
> kernelrelease Makefile target. It is currently only being set when
> KBUILD_EXTMOD is not set. Make sure it is set in that case as well.
>
> Signed-off-by: Tzafrir Cohen <nvidia@cohens.org.il>


Applied to linux-kbuild/fixes. Thanks.

> ---
>  Makefile | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index 3e7f96f12f08..e0859c608147 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1880,6 +1880,8 @@ endif
>
>  else # KBUILD_EXTMOD
>
> +filechk_kernel.release = echo $(KERNELRELEASE)
> +
>  ###
>  # External module support.
>  # When building external modules the kernel used as basis is considered
> --
> 2.39.2
>


-- 
Best Regards
Masahiro Yamada

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

end of thread, other threads:[~2023-03-14 14:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-14 13:02 Makefile: fix usage of kernelrelease with M=foo nvidia
2023-03-14 13:02 ` [PATCH] Makefile: Make kernelrelease target work with M= nvidia
2023-03-14 14:14   ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).