Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+1 -3
+1 -3
scripts/Makefile.build
··· 515 515 516 516 -include $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).cmd) 517 517 518 - ifdef building_out_of_srctree 519 518 # Create directories for object files if they do not exist 520 - obj-dirs := $(sort $(obj) $(patsubst %/,%, $(dir $(targets)))) 519 + obj-dirs := $(sort $(patsubst %/,%, $(dir $(targets)))) 521 520 # If targets exist, their directories apparently exist. Skip mkdir. 522 521 existing-dirs := $(sort $(patsubst %/,%, $(dir $(existing-targets)))) 523 522 obj-dirs := $(strip $(filter-out $(existing-dirs), $(obj-dirs))) 524 523 ifneq ($(obj-dirs),) 525 524 $(shell mkdir -p $(obj-dirs)) 526 - endif 527 525 endif 528 526 529 527 .PHONY: $(PHONY)