util/kconfig: Uprev to Linux 6.2's kconfig
The upstream build system uses a newly introduced function `read-file`, so copy that in from Linux 6.2. TEST=`util/abuild/abuild -C` output (config.h and config.build) remains the same Change-Id: Ic100bf189ebd3eaa0eb26904ae8602910329a180 Signed-off-by: Patrick Georgi <patrick@coreboot.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79179 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
This commit is contained in:
@@ -25,6 +25,20 @@ $(objk)/Makefile.real: $(dir $(lastword $(MAKEFILE_LIST)))Makefile
|
||||
|
||||
kecho := echo
|
||||
|
||||
###
|
||||
# Read a file, replacing newlines with spaces
|
||||
#
|
||||
# Make 4.2 or later can read a file by using its builtin function.
|
||||
#
|
||||
# Imported from Linux upstream:
|
||||
# commit 6768fa4bcb6c1618248f135d04b9287ba2724ae0
|
||||
# Author: Masahiro Yamada <masahiroy@kernel.org>
|
||||
ifneq ($(filter-out 3.% 4.0 4.1, $(MAKE_VERSION)),)
|
||||
read-file = $(subst $(newline),$(space),$(file < $1))
|
||||
else
|
||||
read-file = $(shell cat $1 2>/dev/null)
|
||||
endif
|
||||
|
||||
-include $(objk)/Makefile.real
|
||||
unexport KCONFIG_DEFCONFIG_LIST
|
||||
|
||||
|
Reference in New Issue
Block a user