kbuild: use $(KBUILD_SRC) to check out-of-tree build
Non-empty $(KBUILD_SRC) means out-of-tree build.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
diff --git a/mkconfig b/mkconfig
index 9827e4d..b755d2a 100755
--- a/mkconfig
+++ b/mkconfig
@@ -103,7 +103,7 @@
#
# Create link to architecture specific headers
#
-if [ "$SRCTREE" != "$OBJTREE" ] ; then
+if [ -n "$KBUILD_SRC" ] ; then
mkdir -p ${OBJTREE}/include
LNPREFIX=${SRCTREE}/arch/${arch}/include/asm/
cd ${OBJTREE}/include
@@ -125,7 +125,7 @@
ln -s ${LNPREFIX}proc-armv asm/proc
fi
-if [ "$SRCTREE" = "$OBJTREE" ] ; then
+if [ -z "$KBUILD_SRC" ] ; then
cd ${SRCTREE}/include
fi