* Embedded white space in out-of-tree module full pathname
@ 2015-01-27 9:44 Mason
2015-01-27 22:39 ` Russell King - ARM Linux
0 siblings, 1 reply; 2+ messages in thread
From: Mason @ 2015-01-27 9:44 UTC (permalink / raw)
To: LKML, Linux ARM
Hello,
I'd like some confirmation that this is either not supported, or that
I'm doing something obviously wrong. (Kernel 3.14 if it matters.)
Suppose the source code for an out-of-tree kernel module is stored e.g.
in "/tmp/foo bar/module" (note the embedded space in the path name)
Here is the Makefile template I'm using. (Maybe it's wrong.)
/tmp/foo bar/module$ cat Makefile
KDIR ?= /home/mason/linux-3.14
ARCH ?= arm
CROSS_COMPILE ?= arm-none-linux-gnueabi-
obj-m += mytest.o
all:
make -C $(KDIR) M="$$PWD"
clean:
make -C $(KDIR) M="$$PWD" clean
/tmp/foo bar/module$ make
make -C /home/mason/linux-3.14 M="$PWD"
make[1]: Entering directory `/home/mason/linux-3.14'
scripts/Makefile.build:44: /tmp/foo/Makefile: No such file or directory
make[2]: *** No rule to make target `/tmp/foo/Makefile'. Stop.
make[1]: *** [_module_/tmp/foo] Error 2
make[1]: Leaving directory `/home/mason/linux-3.14'
make: *** [all] Error 2
Does the kernel build system support building an out-of-tree module whose
full pathname contains embedded white space, like in my example?
Do I have an obvious mistake in my Makefile?
Regards.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Embedded white space in out-of-tree module full pathname
2015-01-27 9:44 Embedded white space in out-of-tree module full pathname Mason
@ 2015-01-27 22:39 ` Russell King - ARM Linux
0 siblings, 0 replies; 2+ messages in thread
From: Russell King - ARM Linux @ 2015-01-27 22:39 UTC (permalink / raw)
To: Mason; +Cc: LKML, Linux ARM
On Tue, Jan 27, 2015 at 10:44:41AM +0100, Mason wrote:
> I'd like some confirmation that this is either not supported, or that
> I'm doing something obviously wrong. (Kernel 3.14 if it matters.)
It's something which isn't going to be supported.
Various things in the make makes it difficult - for example:
module-dirs := $(addprefix _module_,$(KBUILD_EXTMOD))
and as per your example, addprefix will see "/tmp/foo" and "bar/module"
as two separate words. make has no way to know that these are one
path rather than two separate paths.
See the addprefix documentation in make's info pages, which splits the
second argument by whitespace.
Unlike shell, where you have IFS= which can change the word splitting,
make always uses white space.
--
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-27 22:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-27 9:44 Embedded white space in out-of-tree module full pathname Mason
2015-01-27 22:39 ` Russell King - ARM Linux
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox