public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] kbuild: forbid kernel directory to contain spaces and colons
@ 2016-04-02 19:38 Robert Jarzmik
  2016-05-10 15:05 ` Michal Marek
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Jarzmik @ 2016-04-02 19:38 UTC (permalink / raw)
  To: Michal Marek; +Cc: linux-kbuild, linux-kernel, Robert Jarzmik

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>
---
Since v1: add colon check as requested by Michal.
---
 Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Makefile b/Makefile
index 916b26e999d8..42e01dab13e7 100644
--- a/Makefile
+++ b/Makefile
@@ -128,6 +128,10 @@ _all:
 # Cancel implicit rules on top Makefile
 $(CURDIR)/Makefile Makefile: ;
 
+ifneq ($(words $(subst :, ,$(CURDIR))), 1)
+  $(error main directory cannot contain spaces nor colons)
+endif
+
 ifneq ($(KBUILD_OUTPUT),)
 # Invoke a second make in the output directory, passing relevant variables
 # check that the output directory actually exists
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] kbuild: forbid kernel directory to contain spaces and colons
  2016-04-02 19:38 [PATCH v2] kbuild: forbid kernel directory to contain spaces and colons Robert Jarzmik
@ 2016-05-10 15:05 ` Michal Marek
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Marek @ 2016-05-10 15:05 UTC (permalink / raw)
  To: Robert Jarzmik; +Cc: Michal Marek, linux-kbuild, linux-kernel

On Sat, Apr 02, 2016 at 09:38:53PM +0200, Robert Jarzmik wrote:
> 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>
> ---
> Since v1: add colon check as requested by Michal.
> ---
>  Makefile | 4 ++++
>  1 file changed, 4 insertions(+)

Applied to kbuild.git#kbuild.

Michal

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-05-10 15:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-02 19:38 [PATCH v2] kbuild: forbid kernel directory to contain spaces and colons Robert Jarzmik
2016-05-10 15:05 ` Michal Marek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox