From ec31f868ec674edfcf653cc7c82b365c6f570cd9 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Sun, 22 Jan 2023 23:14:25 +0900 Subject: setlocalversion: absorb $(KERNELVERSION) Print $(KERNELVERSION) in setlocalversion so that the callers get simpler. Signed-off-by: Masahiro Yamada --- scripts/setlocalversion | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'scripts/setlocalversion') diff --git a/scripts/setlocalversion b/scripts/setlocalversion index b8e1018d611e..ad72ea2c8228 100755 --- a/scripts/setlocalversion +++ b/scripts/setlocalversion @@ -102,6 +102,11 @@ if ! test -e include/config/auto.conf; then exit 1 fi +if [ -z "${KERNELVERSION}" ]; then + echo "KERNELVERSION is not set" >&2 + exit 1 +fi + # localversion* files in the build and source directory res="$(collect_files localversion*)" if test ! "$srctree" -ef .; then @@ -127,4 +132,4 @@ elif [ "${LOCALVERSION+set}" != "set" ]; then res="$res$(scm_version --short)" fi -echo "$res" +echo "${KERNELVERSION}${res}" -- cgit v1.2.3