Commit 941646b9 authored by Robert Jarzmik's avatar Robert Jarzmik Committed by Jiri Slaby

kbuild: forbid kernel directory to contain spaces and colons

commit 51193b76 upstream.

When the kernel path contains a space or a colon somewhere in the path
name, the modules_install target doesn't work anymore, as the path names
are not enclosed in double quotes. It is also supposed that and O= build
will suffer from the same weakness as modules_install.

Instead of checking and improving kbuild to resist to directories
including these characters, error out early to prevent any build if the
kernel's main directory contains a space.
Signed-off-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: default avatarMichal Marek <mmarek@suse.com>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent 55ee86c9
...@@ -113,6 +113,10 @@ _all: ...@@ -113,6 +113,10 @@ _all:
# Cancel implicit rules on top Makefile # Cancel implicit rules on top Makefile
$(CURDIR)/Makefile Makefile: ; $(CURDIR)/Makefile Makefile: ;
ifneq ($(words $(subst :, ,$(CURDIR))), 1)
$(error main directory cannot contain spaces nor colons)
endif
ifneq ($(KBUILD_OUTPUT),) ifneq ($(KBUILD_OUTPUT),)
# Invoke a second make in the output directory, passing relevant variables # Invoke a second make in the output directory, passing relevant variables
# check that the output directory actually exists # check that the output directory actually exists
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment