* [PATCH] fix: build aborts if SPACE characters are found in path.
@ 2013-01-18 14:33 Sunil Beta Baskar
2013-02-15 15:31 ` Michal Marek
0 siblings, 1 reply; 2+ messages in thread
From: Sunil Beta Baskar @ 2013-01-18 14:33 UTC (permalink / raw)
To: Michal Marek, linux-kbuild, linux-kernel
Signed-off-by: Sunil Beta <betasam@gmail.com>
---
Makefile | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Makefile b/Makefile
index 07bc925..48bfd8e 100644
--- a/Makefile
+++ b/Makefile
@@ -10,6 +10,8 @@ NAME = "Divemaster Edition"
# Comments in this file are targeted only to the developer, do not
# expect to learn how to build the kernel reading this file.
+CURDIRSPC := $(echo $(CURDIR) | sed "s/ /\\\ /g" )
+$(ifneq $(CURDIR),$(CURDIRSPC), $(error directory $(CURDIR) contains spaces.))
# Do not:
# o use make's built-in rules and variables
# (this increases performance and avoids hard-to-debug behaviour);
@@ -118,6 +120,8 @@ ifneq ($(KBUILD_OUTPUT),)
# check that the output directory actually exists
saved-output := $(KBUILD_OUTPUT)
KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd)
+KBUILD_OUTPUT_SPC := $(shell echo $(KBUILD_OUTPUT) | sed "s/ /\\\ /g")
+$(ifneq $(KBUILD_OUTPUT),$(KBUILD_OUTPUT_SPC), $(error output
directory $(KBUILD_OUTPUT) contains spaces.))
$(if $(KBUILD_OUTPUT),, \
$(error output directory "$(saved-output)" does not exist))
--
1.7.10.4
-----
This resolves issues with multiple spaces in the source or target path
of the kernel. Fixing this completely would require changes to
mkmakefile among several other files. This is just to leave newbies
comfortable with an error message as to the reason the build failed.
Sunil Beta Baskar
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fix: build aborts if SPACE characters are found in path.
2013-01-18 14:33 [PATCH] fix: build aborts if SPACE characters are found in path Sunil Beta Baskar
@ 2013-02-15 15:31 ` Michal Marek
0 siblings, 0 replies; 2+ messages in thread
From: Michal Marek @ 2013-02-15 15:31 UTC (permalink / raw)
To: Sunil Beta Baskar; +Cc: linux-kbuild, linux-kernel
On 18.1.2013 15:33, Sunil Beta Baskar wrote:
> Signed-off-by: Sunil Beta <betasam@gmail.com>
> ---
> Makefile | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index 07bc925..48bfd8e 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -10,6 +10,8 @@ NAME = "Divemaster Edition"
> # Comments in this file are targeted only to the developer, do not
> # expect to learn how to build the kernel reading this file.
>
> +CURDIRSPC := $(echo $(CURDIR) | sed "s/ /\\\ /g" )
> +$(ifneq $(CURDIR),$(CURDIRSPC), $(error directory $(CURDIR) contains spaces.))
You do not need to call shell and sed here. Use the findstring make
function and the $(space) variable from scripts/Kbuild.include. Also,
while at it, could you also add a check for colon? This breaks the build
in similar way.
Thanks,
Michal
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-02-15 15:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-18 14:33 [PATCH] fix: build aborts if SPACE characters are found in path Sunil Beta Baskar
2013-02-15 15:31 ` Michal Marek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox