public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Michal Marek <mmarek@suse.com>
Cc: linux-kbuild@vger.kernel.org
Subject: kbuild: global makefile and spaces in path
Date: Mon, 21 Dec 2015 21:49:39 +0100	[thread overview]
Message-ID: <87lh8nfrx8.fsf@belgarion.home> (raw)

Hi Michal,

I compiled my kernel in a directory /home/robert jarzmik/kernel, and that's the
first time I encountered a space in the path containing my kernel in years.

I was wondering if there is a known constraint that the linux kernel source
should be contained within a path without any space ?

If no such constraint is known, maybe you could consider the patch in [1].

Cheers.

-- 
Robert

---8>---
From a8af33224ad536cc3137297e4a7617ee1031efb7 Mon Sep 17 00:00:00 2001
From: Robert Jarzmik <robert.jarzmik@free.fr>
Date: Mon, 21 Dec 2015 21:42:42 +0100
Subject: [PATCH] kbuild: fix modules_install with spaces in kernel path

When the kernel path contains a space somewhere in the path name, the
modules_install target doesn't work anymore, as the path names are not
enclosed in double quotes.

This patch fixes the modules_install target.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
---
 Makefile | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/Makefile b/Makefile
index 7ce5c5a76c0b..45ec34644b4f 100644
--- a/Makefile
+++ b/Makefile
@@ -1119,16 +1119,16 @@ modules_install: _modinst_ _modinst_post
 
 PHONY += _modinst_
 _modinst_:
-	@rm -rf $(MODLIB)/kernel
-	@rm -f $(MODLIB)/source
-	@mkdir -p $(MODLIB)/kernel
-	@ln -s `cd $(srctree) && /bin/pwd` $(MODLIB)/source
-	@if [ ! $(objtree) -ef  $(MODLIB)/build ]; then \
-		rm -f $(MODLIB)/build ; \
-		ln -s $(CURDIR) $(MODLIB)/build ; \
+	@rm -rf "$(MODLIB)"/kernel
+	@rm -f "$(MODLIB)"/source
+	@mkdir -p "$(MODLIB)"/kernel
+	@ln -s "`cd $(srctree) && /bin/pwd`" "$(MODLIB)"/source
+	@if [ ! "$(objtree)" -ef  "$(MODLIB)"/build ]; then \
+		rm -f "$(MODLIB)"/build ; \
+		ln -s "$(CURDIR)" "$(MODLIB)"/build ; \
 	fi
-	@cp -f $(objtree)/modules.order $(MODLIB)/
-	@cp -f $(objtree)/modules.builtin $(MODLIB)/
+	@cp -f $(objtree)/modules.order "$(MODLIB)"/
+	@cp -f $(objtree)/modules.builtin "$(MODLIB)"/
 	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst
 
 # This depmod is only for convenience to give the initial
-- 
2.1.4


             reply	other threads:[~2015-12-21 20:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-21 20:49 Robert Jarzmik [this message]
2016-01-06 14:48 ` kbuild: global makefile and spaces in path Michal Marek
2016-01-07 21:53   ` Robert Jarzmik
2016-02-05 21:30     ` Robert Jarzmik
2016-02-08 20:03       ` Michal Marek
2016-02-08 20:10         ` Robert Jarzmik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lh8nfrx8.fsf@belgarion.home \
    --to=robert.jarzmik@free.fr \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=mmarek@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox