Skip to content

Commit 1791ff7

Browse files
masahir0ymichal42
authored andcommitted
kbuild: clean-up and bug fix of scripts/Makefile.host
Assume we have a Makefile like this: hostprogs-y := foo foo-cxxobjs := bar/baz.o foo-objs := qux/quux.o In this case, Kbuild creates bar/ directory, but fails to create qux/ directory. This commit re-writes directory creation more simply, fixing that bug. Signed-off-by: Masahiro Yamada <[email protected]> Signed-off-by: Michal Marek <[email protected]>
1 parent 6639355 commit 1791ff7

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

scripts/Makefile.host

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,9 @@ host-cxxmulti := $(foreach m,$(__hostprogs),$(if $($(m)-cxxobjs),$(m)))
4343
host-cxxobjs := $(sort $(foreach m,$(host-cxxmulti),$($(m)-cxxobjs)))
4444

4545
# output directory for programs/.o files
46-
# hostprogs-y := tools/build may have been specified. Retrieve directory
47-
host-objdirs := $(dir $(__hostprogs))
48-
# directory of .o files from prog-objs notation
49-
host-objdirs += $(dir $(foreach f,$(host-cmulti), $($(f)-objs)))
50-
# directory of .o files from prog-cxxobjs notation
51-
host-objdirs += $(dir $(foreach f,$(host-cxxmulti), $($(f)-cxxobjs)))
46+
# hostprogs-y := tools/build may have been specified.
47+
# Retrieve also directory of .o files from prog-objs or prog-cxxobjs notation
48+
host-objdirs := $(dir $(__hostprogs) $(host-cobjs) $(host-cxxobjs))
5249

5350
host-objdirs := $(strip $(sort $(filter-out ./,$(host-objdirs))))
5451

0 commit comments

Comments
 (0)