Skip to content

Commit 7e1c047

Browse files
committed
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 <[email protected]> Signed-off-by: Michal Marek <[email protected]>
1 parent fb916b4 commit 7e1c047

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ _all: modules
150150
endif
151151

152152
srctree := $(if $(KBUILD_SRC),$(KBUILD_SRC),$(CURDIR))
153-
objtree := $(CURDIR)
153+
objtree := .
154154
src := $(srctree)
155155
obj := $(objtree)
156156

@@ -1062,7 +1062,7 @@ _modinst_:
10621062
@ln -s $(srctree) $(MODLIB)/source
10631063
@if [ ! $(objtree) -ef $(MODLIB)/build ]; then \
10641064
rm -f $(MODLIB)/build ; \
1065-
ln -s $(objtree) $(MODLIB)/build ; \
1065+
ln -s $(CURDIR) $(MODLIB)/build ; \
10661066
fi
10671067
@cp -f $(objtree)/modules.order $(MODLIB)/
10681068
@cp -f $(objtree)/modules.builtin $(MODLIB)/

0 commit comments

Comments
 (0)