summaryrefslogtreecommitdiffstats
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, 5 insertions, 2 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 76ba6be..506e3f3 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -10,8 +10,11 @@ __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
+kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src))
+include $(if $(wildcard $(kbuild-dir)/Kbuild), $(kbuild-dir)/Kbuild, $(kbuild-dir)/Makefile)
+include scripts/Kbuild.include
include scripts/Makefile.lib
ifdef host-progs
@@ -169,7 +172,7 @@ cmd_modversions = \
-T $(@D)/.tmp_$(@F:.o=.ver); \
rm -f $(@D)/.tmp_$(@F) $(@D)/.tmp_$(@F:.o=.ver); \
else \
- mv $(@D)/.tmp_$(@F) $@; \
+ mv -f $(@D)/.tmp_$(@F) $@; \
fi;
endif
OpenPOWER on IntegriCloud