[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240819160309.2218114-4-vegard.nossum@oracle.com>
Date: Mon, 19 Aug 2024 18:03:00 +0200
From: Vegard Nossum <vegard.nossum@...cle.com>
To: Masahiro Yamada <masahiroy@...nel.org>, linux-kbuild@...r.kernel.org
Cc: Nathan Chancellor <nathan@...nel.org>, Nicolas Schier <nicolas@...sle.eu>,
Michael Ellerman <mpe@...erman.id.au>,
Morten Linderud <morten@...derud.pw>,
Haelwenn Monnier <contact@...odan.eu>, Jann Horn <jannh@...gle.com>,
Kees Cook <kees@...nel.org>,
James Bottomley <James.Bottomley@...senPartnership.com>,
Theodore Ts'o <tytso@....edu>, linux-hardening@...r.kernel.org,
Vegard Nossum <vegard.nossum@...cle.com>
Subject: [RFC PATCH 03/11] kbuild: pass KERNELVERSION and LOCALVERSION explicitly to setlocalversion
These environment variables are passed when invoking 'make', but if
running 'make -n' we need to pass them explicitly so they become part
of the printed command.
Signed-off-by: Vegard Nossum <vegard.nossum@...cle.com>
---
Makefile | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index f09c036daf2f5..58f3843ccfac6 100644
--- a/Makefile
+++ b/Makefile
@@ -1165,7 +1165,10 @@ vmlinux: vmlinux.o $(KBUILD_LDS) modpost
$(sort $(KBUILD_LDS) $(KBUILD_VMLINUX_OBJS) $(KBUILD_VMLINUX_LIBS)): . ;
ifeq ($(origin KERNELRELEASE),file)
-filechk_kernel.release = $(srctree)/scripts/setlocalversion $(srctree)
+filechk_kernel.release = \
+ KERNELVERSION="$(KERNELVERSION)" \
+ LOCALVERSION="$(LOCALVERSION)" \
+ $(srctree)/scripts/setlocalversion $(srctree)
else
filechk_kernel.release = echo $(KERNELRELEASE)
endif
--
2.34.1
Powered by blists - more mailing lists