Commit 7e1c04779efd51154baf652e653ceb24ce68939b

Authored by Michal Marek
1 parent fb916b42f3

kbuild: Use relative path for $(objtree)

The main Makefile sets its working directory to the object tree and
never changes it again. Therefore, we can use '.' instead of the
absolute path. The only case where we need the absolute path is when
creating the 'build' symlink in /lib/modules.

Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

... ... @@ -150,7 +150,7 @@
150 150 endif
151 151  
152 152 srctree := $(if $(KBUILD_SRC),$(KBUILD_SRC),$(CURDIR))
153   -objtree := $(CURDIR)
  153 +objtree := .
154 154 src := $(srctree)
155 155 obj := $(objtree)
156 156  
... ... @@ -1062,7 +1062,7 @@
1062 1062 @ln -s $(srctree) $(MODLIB)/source
1063 1063 @if [ ! $(objtree) -ef $(MODLIB)/build ]; then \
1064 1064 rm -f $(MODLIB)/build ; \
1065   - ln -s $(objtree) $(MODLIB)/build ; \
  1065 + ln -s $(CURDIR) $(MODLIB)/build ; \
1066 1066 fi
1067 1067 @cp -f $(objtree)/modules.order $(MODLIB)/
1068 1068 @cp -f $(objtree)/modules.builtin $(MODLIB)/