summaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.modinst
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2022-12-11 03:54:47 +0100
committerMasahiro Yamada <masahiroy@kernel.org>2022-12-13 14:29:10 +0100
commit6768fa4bcb6c1618248f135d04b9287ba2724ae0 (patch)
tree0d49fcbba647b32e81d9da19192092dce67485e4 /scripts/Makefile.modinst
parentkbuild: do not sort after reading modules.order (diff)
downloadlinux-6768fa4bcb6c1618248f135d04b9287ba2724ae0.tar.xz
linux-6768fa4bcb6c1618248f135d04b9287ba2724ae0.zip
kbuild: add read-file macro
Since GNU Make 4.2, $(file ...) supports the read operater '<', which is useful to read a file without forking a new process. No warning is shown even if the input file is missing. For older Make versions, it falls back to the cat command. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu> Reviewed-by: Alexander Lobakin <alexandr.lobakin@intel.com> Tested-by: Alexander Lobakin <alexandr.lobakin@intel.com>
Diffstat (limited to 'scripts/Makefile.modinst')
-rw-r--r--scripts/Makefile.modinst2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst
index f4cff42069ad..65aac6be78ec 100644
--- a/scripts/Makefile.modinst
+++ b/scripts/Makefile.modinst
@@ -9,7 +9,7 @@ __modinst:
include include/config/auto.conf
include $(srctree)/scripts/Kbuild.include
-modules := $(shell cat $(MODORDER))
+modules := $(call read-file, $(MODORDER))
ifeq ($(KBUILD_EXTMOD),)
dst := $(MODLIB)/kernel