mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
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>
This commit is contained in:
parent
1bca544050
commit
cc8a51ca6f
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user