summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2024-06-11 20:24:47 +0200
committerMasahiro Yamada <masahiroy@kernel.org>2024-07-15 18:08:37 +0200
commitae4c4cee8110a986f5a884c5d91d137e2b994303 (patch)
tree656af0379e1a0cd69f134595a3af14ca1bda7b62 /init
parentkconfig: remember the current choice while parsing the choice block (diff)
downloadlinux-ae4c4cee8110a986f5a884c5d91d137e2b994303.tar.xz
linux-ae4c4cee8110a986f5a884c5d91d137e2b994303.zip
kbuild: move init/build-version to scripts/
At first, I thought this script would be needed only in init/Makefile. However, commit 5db8face97f8 ("kbuild: Restore .version auto-increment behaviour for Debian packages") and commit 1789fc912541 ("kbuild: rpm-pkg: invoke the kernel build from rpmbuild for binrpm-pkg") revealed that it was actually needed for scripts/package/mk* as well. After all, scripts/ is a better place for it. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Diffstat (limited to 'init')
-rw-r--r--init/Makefile2
-rwxr-xr-xinit/build-version10
2 files changed, 1 insertions, 11 deletions
diff --git a/init/Makefile b/init/Makefile
index ab71cedc5fd6..10b652d33e87 100644
--- a/init/Makefile
+++ b/init/Makefile
@@ -52,7 +52,7 @@ CFLAGS_version.o := -include $(obj)/utsversion-tmp.h
# Build version-timestamp.c with final UTS_VERSION
#
-include/generated/utsversion.h: build-version-auto = $(shell $(src)/build-version)
+include/generated/utsversion.h: build-version-auto = $(shell $(srctree)/scripts/build-version)
include/generated/utsversion.h: build-timestamp-auto = $(shell LC_ALL=C date)
include/generated/utsversion.h: FORCE
$(call filechk,uts_version)
diff --git a/init/build-version b/init/build-version
deleted file mode 100755
index 537d45815083..000000000000
--- a/init/build-version
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-# SPDX-License-Identifier: GPL-2.0-only
-
-prev_ver=$(cat .version 2>/dev/null) &&
-ver=$(expr ${prev_ver} + 1 2>/dev/null) ||
-ver=1
-
-echo ${ver} > .version
-
-echo ${ver}