diff options
Diffstat (limited to 'scripts/Makefile.build')
-rw-r--r-- | scripts/Makefile.build | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 76ba6be3dfc9..506e3f3befe3 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build | |||
@@ -10,8 +10,11 @@ __build: | |||
10 | # Read .config if it exist, otherwise ignore | 10 | # Read .config if it exist, otherwise ignore |
11 | -include .config | 11 | -include .config |
12 | 12 | ||
13 | include $(if $(wildcard $(obj)/Kbuild), $(obj)/Kbuild, $(obj)/Makefile) | 13 | # The filename Kbuild has precedence over Makefile |
14 | kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src)) | ||
15 | include $(if $(wildcard $(kbuild-dir)/Kbuild), $(kbuild-dir)/Kbuild, $(kbuild-dir)/Makefile) | ||
14 | 16 | ||
17 | include scripts/Kbuild.include | ||
15 | include scripts/Makefile.lib | 18 | include scripts/Makefile.lib |
16 | 19 | ||
17 | ifdef host-progs | 20 | ifdef host-progs |
@@ -169,7 +172,7 @@ cmd_modversions = \ | |||
169 | -T $(@D)/.tmp_$(@F:.o=.ver); \ | 172 | -T $(@D)/.tmp_$(@F:.o=.ver); \ |
170 | rm -f $(@D)/.tmp_$(@F) $(@D)/.tmp_$(@F:.o=.ver); \ | 173 | rm -f $(@D)/.tmp_$(@F) $(@D)/.tmp_$(@F:.o=.ver); \ |
171 | else \ | 174 | else \ |
172 | mv $(@D)/.tmp_$(@F) $@; \ | 175 | mv -f $(@D)/.tmp_$(@F) $@; \ |
173 | fi; | 176 | fi; |
174 | endif | 177 | endif |
175 | 178 | ||