summaryrefslogtreecommitdiff
path: root/scripts/Makefile.build
diff options
context:
space:
mode:
authorDenys Vlasenko2010-07-09 01:25:36 +0200
committerDenys Vlasenko2010-07-09 01:25:36 +0200
commit1883cb174619cfc90ca86da08598f470d3a11315 (patch)
treea1e849d0cf637894d166e66b4885d708713ba075 /scripts/Makefile.build
parent1f0ab1dc6427e9340f50551d9e4f2212d03ec845 (diff)
downloadbusybox-1883cb174619cfc90ca86da08598f470d3a11315.zip
busybox-1883cb174619cfc90ca86da08598f470d3a11315.tar.gz
fix make O=dir build
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'scripts/Makefile.build')
-rw-r--r--scripts/Makefile.build7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index f343818..5685b5b 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -13,8 +13,13 @@ __build:
include scripts/Kbuild.include
# The filename Kbuild has precedence over Makefile
+# bbox: we also try to include Kbuild file in obj tree first
kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src))
-include $(if $(wildcard $(kbuild-dir)/Kbuild), $(kbuild-dir)/Kbuild, $(kbuild-dir)/Makefile)
+include $(if $(wildcard $(src)/Kbuild), $(src)/Kbuild, \
+ $(if $(wildcard $(kbuild-dir)/Kbuild), $(kbuild-dir)/Kbuild, \
+ $(kbuild-dir)/Makefile \
+ ) \
+ )
include scripts/Makefile.lib