diff mbox

kbuild: global makefile and spaces in path

Message ID 87lh8nfrx8.fsf@belgarion.home (mailing list archive)
State New, archived
Headers show

Commit Message

Robert Jarzmik Dec. 21, 2015, 8:49 p.m. UTC
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.

Comments

Michal Marek Jan. 6, 2016, 2:48 p.m. UTC | #1
On 2015-12-21 21:49, Robert Jarzmik wrote:
> 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 ?

Whitespace and colons are problematic.


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

I expect it is going to break in lot more places, especially if you do
an O= build. I think it's better to just check for this and error out early.

Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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