Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1370038 > unrolled thread

[PATCH v2] kbuild: forbid kernel directory to contain spaces and colons

Started byRobert Jarzmik <robert.jarzmik@free.fr>
First post2016-04-02 21:40 +0200
Last post2016-04-02 21:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH v2] kbuild: forbid kernel directory to contain spaces and colons Robert Jarzmik <robert.jarzmik@free.fr> - 2016-04-02 21:40 +0200

#1370038 — [PATCH v2] kbuild: forbid kernel directory to contain spaces and colons

FromRobert Jarzmik <robert.jarzmik@free.fr>
Date2016-04-02 21:40 +0200
Subject[PATCH v2] kbuild: forbid kernel directory to contain spaces and colons
Message-ID<rjzyO-el-19@gated-at.bofh.it>
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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web