kbuild: add read-file macro
authorMasahiro Yamada <masahiroy@kernel.org>
Sun, 11 Dec 2022 02:54:47 +0000 (11:54 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Tue, 13 Dec 2022 13:29:10 +0000 (22:29 +0900)
commit6768fa4bcb6c1618248f135d04b9287ba2724ae0
tree0d49fcbba647b32e81d9da19192092dce67485e4
parenta5db80c65dbf9144de155f8a0f08becc9c307db0
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>
Makefile
scripts/Kbuild.include
scripts/Makefile.modfinal
scripts/Makefile.modinst