diff options
author | Masahiro Yamada <yamada.m@jp.panasonic.com> | 2014-07-16 03:12:23 -0400 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2014-07-16 11:15:26 -0400 |
commit | 1791ff7179f689cb54182a1215686f8138850412 (patch) | |
tree | f161158fce82abf511bfcf4844614d693d5fc006 /scripts/Makefile.host | |
parent | 663935593915ad8dc43d10f58ef5eeefc77ef8c4 (diff) |
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 <yamada.m@jp.panasonic.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts/Makefile.host')
-rw-r--r-- | scripts/Makefile.host | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/scripts/Makefile.host b/scripts/Makefile.host index bb6a11f4f193..ab5980f91714 100644 --- a/scripts/Makefile.host +++ b/scripts/Makefile.host | |||
@@ -43,12 +43,9 @@ host-cxxmulti := $(foreach m,$(__hostprogs),$(if $($(m)-cxxobjs),$(m))) | |||
43 | host-cxxobjs := $(sort $(foreach m,$(host-cxxmulti),$($(m)-cxxobjs))) | 43 | host-cxxobjs := $(sort $(foreach m,$(host-cxxmulti),$($(m)-cxxobjs))) |
44 | 44 | ||
45 | # output directory for programs/.o files | 45 | # output directory for programs/.o files |
46 | # hostprogs-y := tools/build may have been specified. Retrieve directory | 46 | # hostprogs-y := tools/build may have been specified. |
47 | host-objdirs := $(dir $(__hostprogs)) | 47 | # Retrieve also directory of .o files from prog-objs or prog-cxxobjs notation |
48 | # directory of .o files from prog-objs notation | 48 | host-objdirs := $(dir $(__hostprogs) $(host-cobjs) $(host-cxxobjs)) |
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))) | ||
52 | 49 | ||
53 | host-objdirs := $(strip $(sort $(filter-out ./,$(host-objdirs)))) | 50 | host-objdirs := $(strip $(sort $(filter-out ./,$(host-objdirs)))) |
54 | 51 | ||