Skip to content

Commit

Permalink
kbuild: clean-up and bug fix of scripts/Makefile.host
Browse files Browse the repository at this point in the history
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 <yamada.m@jp.panasonic.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
  • Loading branch information
masahir0y authored and michal42 committed Jul 16, 2014
1 parent 6639355 commit 1791ff7
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions scripts/Makefile.host
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,9 @@ host-cxxmulti := $(foreach m,$(__hostprogs),$(if $($(m)-cxxobjs),$(m)))
host-cxxobjs := $(sort $(foreach m,$(host-cxxmulti),$($(m)-cxxobjs)))

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

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

Expand Down

0 comments on commit 1791ff7

Please sign in to comment.