summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 7567f6f7c2974..a60161ccca5b4 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ SRCROOT = .
# To see a list of typical targets execute "make help"
# kbuild compatibility
-export srctree := $(shell pwd)
+export srctree := $(or $(KBUILD_SRC),$(shell pwd))
export objtree := $(shell pwd)
export KLIBCSRC := usr/klibc
export VERSION := $(shell cat $(srctree)/$(KLIBCSRC)/version)