Skip to content

Commit

Permalink
kconfig: replace $(UNAME_RELEASE) with function call
Browse files Browse the repository at this point in the history
Now that 'shell' function is supported, this can be self-contained in
Kconfig.

Signed-off-by: Masahiro Yamada <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Reviewed-by: Ulf Magnusson <[email protected]>
  • Loading branch information
masahir0y committed May 28, 2018
1 parent 2fd5b09 commit 2972666
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,7 @@ include scripts/Kbuild.include
# Read KERNELRELEASE from include/config/kernel.release (if it exists)
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
UNAME_RELEASE := $(shell uname --release)
export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION UNAME_RELEASE
export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION

# SUBARCH tells the usermode build what the underlying arch is. That is set
# first, and if a usermode build is happening, the "ARCH=um" on the command
Expand Down
4 changes: 2 additions & 2 deletions init/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ config DEFCONFIG_LIST
string
depends on !UML
option defconfig_list
default "/lib/modules/$(UNAME_RELEASE)/.config"
default "/lib/modules/$(shell,uname --release)/.config"
default "/etc/kernel-config"
default "/boot/config-$(UNAME_RELEASE)"
default "/boot/config-$(shell,uname --release)"
default ARCH_DEFCONFIG
default "arch/$(ARCH)/defconfig"

Expand Down

0 comments on commit 2972666

Please sign in to comment.