summaryrefslogtreecommitdiff
path: root/scripts/Makefile.build
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Makefile.build')
-rw-r--r--scripts/Makefile.build4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index ebed6a41bc69..8f4f5a347767 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -10,7 +10,9 @@ __build:
# Read .config if it exist, otherwise ignore
-include .config
-include $(if $(wildcard $(obj)/Kbuild), $(obj)/Kbuild, $(obj)/Makefile)
+# The filename Kbuild has precedence over Makefile
+include $(if $(wildcard $(srctree)/$(src)/Kbuild), \
+ $(srctree)/$(src)/Kbuild, $(srctree)/$(src)/Makefile)
include scripts/Kbuild.include
include scripts/Makefile.lib