diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2022-07-14 07:02:42 +0200 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2022-07-27 14:18:00 +0200 |
commit | 9a68fd7fd8b05050b27ae67a829a2035b2b7a993 (patch) | |
tree | 35eeea3c5ff711190a3ac855cb3e833cc022f98f /Makefile | |
parent | kbuild: rpm-pkg: pass 'linux' to --target option of rpmbuild (diff) | |
download | linux-9a68fd7fd8b05050b27ae67a829a2035b2b7a993.tar.xz linux-9a68fd7fd8b05050b27ae67a829a2035b2b7a993.zip |
kbuild: error out if $(KBUILD_EXTMOD) contains % or :
If the directory path given to KBUILD_EXTMOD (or M=) contains % or :,
the module fails to build.
% is used in pattern rules, and : as the separator of dependencies.
Bail out with a clearer error message.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <n.schier@avm.de>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -129,6 +129,9 @@ endif $(if $(word 2, $(KBUILD_EXTMOD)), \ $(error building multiple external modules is not supported)) +$(foreach x, % :, $(if $(findstring $x, $(KBUILD_EXTMOD)), \ + $(error module directory path cannot contain '$x'))) + # Remove trailing slashes ifneq ($(filter %/, $(KBUILD_EXTMOD)),) KBUILD_EXTMOD := $(shell dirname $(KBUILD_EXTMOD).) |