diff options
author | Robert Jarzmik <robert.jarzmik@free.fr> | 2016-04-02 15:38:53 -0400 |
---|---|---|
committer | Michal Marek <mmarek@suse.com> | 2016-05-10 10:55:59 -0400 |
commit | 51193b76bfff5027cf96ba63effae808ad67cca7 (patch) | |
tree | 72e81989018c0ce974d63f2493126bd6ac5dcacc /Makefile | |
parent | 366f4856f0ef1f3dbdb85b0cc57bef2a77c08b86 (diff) |
kbuild: forbid kernel directory to contain spaces and colons
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: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Michal Marek <mmarek@suse.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -128,6 +128,10 @@ _all: | |||
128 | # Cancel implicit rules on top Makefile | 128 | # Cancel implicit rules on top Makefile |
129 | $(CURDIR)/Makefile Makefile: ; | 129 | $(CURDIR)/Makefile Makefile: ; |
130 | 130 | ||
131 | ifneq ($(words $(subst :, ,$(CURDIR))), 1) | ||
132 | $(error main directory cannot contain spaces nor colons) | ||
133 | endif | ||
134 | |||
131 | ifneq ($(KBUILD_OUTPUT),) | 135 | ifneq ($(KBUILD_OUTPUT),) |
132 | # Invoke a second make in the output directory, passing relevant variables | 136 | # Invoke a second make in the output directory, passing relevant variables |
133 | # check that the output directory actually exists | 137 | # check that the output directory actually exists |