Print $(KERNELVERSION) in setlocalversion so that the callers get simpler. Signed-off-by: Masahiro Yamada <masahiroy@xxxxxxxxxx> --- Makefile | 5 ++--- scripts/setlocalversion | 4 +++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index ed3294c7be97..d0a95277f08a 100644 --- a/Makefile +++ b/Makefile @@ -1247,8 +1247,7 @@ vmlinux: vmlinux.o $(KBUILD_LDS) modpost # make sure no implicit rule kicks in $(sort $(KBUILD_LDS) $(KBUILD_VMLINUX_OBJS) $(KBUILD_VMLINUX_LIBS)): . ; -filechk_kernel.release = \ - echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))" +filechk_kernel.release = $(srctree)/scripts/setlocalversion $(srctree) # Store (new) KERNELRELEASE string in include/config/kernel.release include/config/kernel.release: FORCE @@ -2112,7 +2111,7 @@ checkstack: $(PERL) $(srctree)/scripts/checkstack.pl $(CHECKSTACK_ARCH) kernelrelease: - @echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))" + @$(srctree)/scripts/setlocalversion $(srctree) kernelversion: @echo $(KERNELVERSION) diff --git a/scripts/setlocalversion b/scripts/setlocalversion index a4c9a61b0665..7c7cbefa5aa4 100755 --- a/scripts/setlocalversion +++ b/scripts/setlocalversion @@ -113,8 +113,10 @@ if [ -z "${KERNELVERSION}" ]; then exit 1 fi +res="${KERNELVERSION}" + # localversion* files in the build and source directory -res="$(collect_files localversion*)" +res="${res}$(collect_files localversion*)" if test ! "$srctree" -ef .; then res="$res$(collect_files "$srctree"/localversion*)" fi -- 2.34.1