Skip to content

Commit cc8a51c

Browse files
committed
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 <[email protected]>
1 parent 1bca544 commit cc8a51c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

scripts/Makefile.build

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -515,15 +515,13 @@ existing-targets := $(wildcard $(sort $(targets)))
515515

516516
-include $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).cmd)
517517

518-
ifdef building_out_of_srctree
519518
# 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))))
521520
# If targets exist, their directories apparently exist. Skip mkdir.
522521
existing-dirs := $(sort $(patsubst %/,%, $(dir $(existing-targets))))
523522
obj-dirs := $(strip $(filter-out $(existing-dirs), $(obj-dirs)))
524523
ifneq ($(obj-dirs),)
525524
$(shell mkdir -p $(obj-dirs))
526525
endif
527-
endif
528526

529527
.PHONY: $(PHONY)

0 commit comments

Comments
 (0)