Skip to content

Commit 2972666

Browse files
committed
kconfig: replace $(UNAME_RELEASE) with function call
Now that 'shell' function is supported, this can be self-contained in Kconfig. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Kees Cook <keescook@chromium.org> Reviewed-by: Ulf Magnusson <ulfalizer@gmail.com>
1 parent 2fd5b09 commit 2972666

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,7 @@ include scripts/Kbuild.include
284284
# Read KERNELRELEASE from include/config/kernel.release (if it exists)
285285
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
286286
KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
287-
UNAME_RELEASE := $(shell uname --release)
288-
export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION UNAME_RELEASE
287+
export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION
289288

290289
# SUBARCH tells the usermode build what the underlying arch is. That is set
291290
# first, and if a usermode build is happening, the "ARCH=um" on the command

init/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ config DEFCONFIG_LIST
22
string
33
depends on !UML
44
option defconfig_list
5-
default "/lib/modules/$(UNAME_RELEASE)/.config"
5+
default "/lib/modules/$(shell,uname --release)/.config"
66
default "/etc/kernel-config"
7-
default "/boot/config-$(UNAME_RELEASE)"
7+
default "/boot/config-$(shell,uname --release)"
88
default ARCH_DEFCONFIG
99
default "arch/$(ARCH)/defconfig"
1010

0 commit comments

Comments
 (0)