aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile12
1 files changed, 11 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 3e134ec4c3d3..f4702c10b2b8 100644
--- a/Makefile
+++ b/Makefile
@@ -149,7 +149,17 @@ else
149_all: modules 149_all: modules
150endif 150endif
151 151
152srctree := $(if $(KBUILD_SRC),$(KBUILD_SRC),.) 152ifeq ($(KBUILD_SRC),)
153 # building in the source tree
154 srctree := .
155else
156 ifeq ($(KBUILD_SRC)/,$(dir $(CURDIR)))
157 # building in a subdirectory of the source tree
158 srctree := ..
159 else
160 srctree := $(KBUILD_SRC)
161 endif
162endif
153objtree := . 163objtree := .
154src := $(srctree) 164src := $(srctree)
155obj := $(objtree) 165obj := $(objtree)