summaryrefslogtreecommitdiff
path: root/scripts/Makefile.build
diff options
context:
space:
mode:
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