mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-24 18:44:07 +08:00
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>
This commit is contained in:
parent
6105e4f651
commit
9a68fd7fd8
3
Makefile
3
Makefile
@ -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).)
|
||||
|
Loading…
Reference in New Issue
Block a user