summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2020-07-01 06:29:51 +0300
committerMasahiro Yamada <masahiroy@kernel.org>2020-08-09 19:32:58 +0300
commitcc8a51ca6f05ade72f7dd2624bc5f9b948e216fc (patch)
tree87cc6bb268ac8250d9d51f35771be114660a3346 /scripts
parent1bca544050e596f04e4fd3e23b87cde85282a931 (diff)
downloadlinux-cc8a51ca6f05ade72f7dd2624bc5f9b948e216fc.tar.xz
kbuild: always create directories of targets
Currently, the directories of objects are automatically created only for O= builds. It should not hurt to cater to this for in-tree builds too. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.build4
1 files changed, 1 insertions, 3 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 7ba6a752d5bd..246426fa1282 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -515,15 +515,13 @@ existing-targets := $(wildcard $(sort $(targets)))
-include $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).cmd)
-ifdef building_out_of_srctree
# Create directories for object files if they do not exist
-obj-dirs := $(sort $(obj) $(patsubst %/,%, $(dir $(targets))))
+obj-dirs := $(sort $(patsubst %/,%, $(dir $(targets))))
# If targets exist, their directories apparently exist. Skip mkdir.
existing-dirs := $(sort $(patsubst %/,%, $(dir $(existing-targets))))
obj-dirs := $(strip $(filter-out $(existing-dirs), $(obj-dirs)))
ifneq ($(obj-dirs),)
$(shell mkdir -p $(obj-dirs))
endif
-endif
.PHONY: $(PHONY)