* [PATCH] compat-wireless: build: Throw error if space in path
@ 2011-12-26 21:04 Dominique Martinet
2012-01-16 18:47 ` Luis R. Rodriguez
0 siblings, 1 reply; 5+ messages in thread
From: Dominique Martinet @ 2011-12-26 21:04 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: linux-wireless, linux-bluetooth, Dominique Martinet
Because of make limitations, the build will fail if there are spaces in
the path leading to the compat-wireless directory.
I tried to make it work anyway for a while and, while it probably is
possible, it would involve rewriting part of kbuild and well...
This at least throws up nicely if there is a space in the path.
---
Makefile | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
index d3a9d93..c81d680 100644
--- a/Makefile
+++ b/Makefile
@@ -47,6 +47,13 @@ obj-$(CONFIG_COMPAT_BLUETOOTH_MODULES) += drivers/bluetooth/
else
export PWD := $(shell pwd)
+
+# The build will fail if there is any space in PWD.
+ifneq (,$(findstring $() ,$(PWD)))
+$(error "The path to this compat-wireless directory has spaces in it." \
+ "Please put it somewhere where there is no space")
+endif
+
CFLAGS += \
-DCOMPAT_BASE_TREE="\"$(shell cat compat_base_tree)\"" \
-DCOMPAT_BASE_TREE_VERSION="\"$(shell cat compat_base_tree_version)\"" \
--
1.7.5.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] compat-wireless: build: Throw error if space in path
2011-12-26 21:04 [PATCH] compat-wireless: build: Throw error if space in path Dominique Martinet
@ 2012-01-16 18:47 ` Luis R. Rodriguez
2012-01-17 0:08 ` [PATCH v2] " Dominique Martinet
0 siblings, 1 reply; 5+ messages in thread
From: Luis R. Rodriguez @ 2012-01-16 18:47 UTC (permalink / raw)
To: Dominique Martinet; +Cc: Luis R. Rodriguez, linux-wireless, linux-bluetooth
On Mon, Dec 26, 2011 at 1:04 PM, Dominique Martinet
<asmadeus@codewreck.org> wrote:
> Because of make limitations, the build will fail if there are spaces in
> the path leading to the compat-wireless directory.
> I tried to make it work anyway for a while and, while it probably is
> possible, it would involve rewriting part of kbuild and well...
> This at least throws up nicely if there is a space in the path.
>
Thanks, you are missing your Signed-off-by tag and for compat-wireless
I use the same definition and practice of accepting patches only that
abide by that. The purpose of the SOB tag is defined on the
Documentation/SubmittingPatches file on the Linux kernel under the
Developer's Certificate of Origin 1.1. For your convenience I have
pasted here what it means:
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
Luis
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] compat-wireless: build: Throw error if space in path
2012-01-16 18:47 ` Luis R. Rodriguez
@ 2012-01-17 0:08 ` Dominique Martinet
2012-01-17 7:44 ` Johannes Berg
0 siblings, 1 reply; 5+ messages in thread
From: Dominique Martinet @ 2012-01-17 0:08 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: linux-wireless, linux-bluetooth, Dominique Martinet
Because of make limitations, the build will fail if there are spaces in
the path leading to the compat-wireless directory.
I tried to make it work anyway for a while and, while it probably is
possible, it would involve rewriting part of kbuild and well...
This at least throws up nicely if there is a space in the path.
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
---
Makefile | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
index d3a9d93..c81d680 100644
--- a/Makefile
+++ b/Makefile
@@ -47,6 +47,13 @@ obj-$(CONFIG_COMPAT_BLUETOOTH_MODULES) += drivers/bluetooth/
else
export PWD := $(shell pwd)
+
+# The build will fail if there is any space in PWD.
+ifneq (,$(findstring $() ,$(PWD)))
+$(error "The path to this compat-wireless directory has spaces in it." \
+ "Please put it somewhere where there is no space")
+endif
+
CFLAGS += \
-DCOMPAT_BASE_TREE="\"$(shell cat compat_base_tree)\"" \
-DCOMPAT_BASE_TREE_VERSION="\"$(shell cat compat_base_tree_version)\"" \
--
1.7.2.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] compat-wireless: build: Throw error if space in path
2012-01-17 0:08 ` [PATCH v2] " Dominique Martinet
@ 2012-01-17 7:44 ` Johannes Berg
2012-01-18 15:18 ` Dominique Martinet
0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2012-01-17 7:44 UTC (permalink / raw)
To: Dominique Martinet; +Cc: Luis R. Rodriguez, linux-wireless, linux-bluetooth
On Tue, 2012-01-17 at 01:08 +0100, Dominique Martinet wrote:
> Because of make limitations, the build will fail if there are spaces in
> the path leading to the compat-wireless directory.
> I tried to make it work anyway for a while and, while it probably is
> possible, it would involve rewriting part of kbuild and well...
> This at least throws up nicely if there is a space in the path.
I think it also fails if there's a colon in the path -- does anyone know
what the "forbidden" characters would be?
johannes
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] compat-wireless: build: Throw error if space in path
2012-01-17 7:44 ` Johannes Berg
@ 2012-01-18 15:18 ` Dominique Martinet
0 siblings, 0 replies; 5+ messages in thread
From: Dominique Martinet @ 2012-01-18 15:18 UTC (permalink / raw)
To: Johannes Berg
Cc: Luis R. Rodriguez, linux-wireless, linux-bluetooth, linux-kbuild
Hi,
(I added linux-kbuild@ in Cc because it also concerns them. The idea is
to fail cleanly if there is a space in the path to the directory from
which we want to build some modules. We can't detect some from kbuild
itself given how params are given, so it started as a patch for the
modules' Makefile instead)
Johannes Berg wrote on Tue, Jan 17, 2012 :
> I think it also fails if there's a colon in the path -- does anyone know
> what the "forbidden" characters would be?
I can confirm that it fails with a colon in path, although it's not
documented anywhere in Documentation/kbuild/.. (I guess I've just
volunteered to fix that, too :))
I didn't find a proper list, but what I've seen fail is:
- space " "
- colon ":"
- semicolon ";"
- antislash "\"
- dollar "$"
- sharp "#" (although it fails later than the others)
- ampersand "&"
- parenthesis "(" and ")" - these fail somewhere else as well (even
after fixing compat-wireless' Makefile with minor quoting)
- backtick "`"
- double quotes """
- single quotes "'"
what does work that's not necessarily obvious:
- comma, brakets [], brakets {}
... There might be many more I didn't come up with, but that does look
like a fair start!
Does anyone know of a more complete list?
Regards,
--
Dominique Martinet | Asmadeus
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-01-18 15:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-26 21:04 [PATCH] compat-wireless: build: Throw error if space in path Dominique Martinet
2012-01-16 18:47 ` Luis R. Rodriguez
2012-01-17 0:08 ` [PATCH v2] " Dominique Martinet
2012-01-17 7:44 ` Johannes Berg
2012-01-18 15:18 ` Dominique Martinet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).