All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Marek <mmarek@suse.cz>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/5] kbuild: Use relative paths if possible
Date: Thu, 8 May 2014 22:44:08 +0200	[thread overview]
Message-ID: <20140508204408.GA1184@pobox.suse.cz> (raw)
In-Reply-To: <20140430161358.GB15320@ravnborg.org>

On Wed, Apr 30, 2014 at 06:13:59PM +0200, Sam Ravnborg wrote:
> On Tue, Apr 29, 2014 at 04:08:08PM +0200, Michal Marek wrote:
> > Hi,
> > 
> > This series changes the Makefile to use relative paths for $(objtree),
> > always setting it to '.', and for $(srctree) setting either to '.' or
> > '..', when building in the source tree or a subdirectory thereof,
> > respectively. The goal is to make compiler messages and Ooopses more
> > readable by avoiding the full path to the source/object directory.
> > 
> > Patch 2/5 is just an unrelated cleanup.
> > 
> > Michal
> > 
> > Michal Marek (5):
> >   firmware: Simplify directory creation
> >   firmware: Use $(quote) in the Makefile
> >   kbuild: Use relative path for $(objtree)
> >   kbuild: Use relative path when building in the source tree
> >   kbuild: Use relative path when building in a subdir of the source tree
> 
> For patch 2,3,4 and 5 you can add my:
> Acked-by: Sam Ravnborg <sam@ravnborg.org>
> 
> Patch 1 also looks good, but I did not fully grasp it and this is MO
> implied by an ack. So please do not hold it back due to this as
> the cleanup looked good.

I found a bug caused by 3/5 and 4/5: The source and build symlinks
created by modules_install were wrong. The fix is simple:

diff --git a/Makefile b/Makefile
index 3d311b6..9872c53 100644
--- a/Makefile
+++ b/Makefile
@@ -1064,10 +1064,10 @@ _modinst_:
 	@rm -rf $(MODLIB)/kernel
 	@rm -f $(MODLIB)/source
 	@mkdir -p $(MODLIB)/kernel
-	@ln -s $(srctree) $(MODLIB)/source
+	@ln -s `cd $(srctree) && /bin/pwd` $(MODLIB)/source
 	@if [ ! $(objtree) -ef  $(MODLIB)/build ]; then \
 		rm -f $(MODLIB)/build ; \
-		ln -s $(objtree) $(MODLIB)/build ; \
+		ln -s $(CURDIR) $(MODLIB)/build ; \
 	fi
 	@cp -f $(objtree)/modules.order $(MODLIB)/
 	@cp -f $(objtree)/modules.builtin $(MODLIB)/

I will fold it into the respective patches and send a V2.

Michal

      parent reply	other threads:[~2014-05-08 20:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-29 14:08 [PATCH 0/5] kbuild: Use relative paths if possible Michal Marek
2014-04-29 14:08 ` [PATCH 1/5] firmware: Simplify directory creation Michal Marek
2014-04-30 16:12   ` Sam Ravnborg
2014-05-05 14:52     ` Michal Marek
2014-04-29 14:08 ` [PATCH 2/5] firmware: Use $(quote) in the Makefile Michal Marek
2014-04-29 14:08 ` [PATCH 3/5] kbuild: Use relative path for $(objtree) Michal Marek
2014-04-29 14:08 ` [PATCH 4/5] kbuild: Use relative path when building in the source tree Michal Marek
2014-04-29 14:08 ` [PATCH 5/5] kbuild: Use relative path when building in a subdir of " Michal Marek
2014-04-30 16:13 ` [PATCH 0/5] kbuild: Use relative paths if possible Sam Ravnborg
2014-05-05 14:52   ` Michal Marek
2014-05-08 20:44   ` Michal Marek [this message]

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=20140508204408.GA1184@pobox.suse.cz \
    --to=mmarek@suse.cz \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.