lkml.org 
[lkml]   [2014]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 0/5] kbuild: Use relative paths if possible
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


\
 
 \ /
  Last update: 2014-05-08 23:21    [W:2.649 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site