diff mbox

[4/5] kbuild: clean-up and bug fix of scripts/Makefile.host

Message ID 1402018263-30670-5-git-send-email-yamada.m@jp.panasonic.com (mailing list archive)
State New, archived
Headers show

Commit Message

Masahiro Yamada June 6, 2014, 1:31 a.m. UTC
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>
---
 scripts/Makefile.host | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
diff mbox

Patch

diff --git a/scripts/Makefile.host b/scripts/Makefile.host
index e6abc2e..b0e1a64 100644
--- a/scripts/Makefile.host
+++ b/scripts/Makefile.host
@@ -64,13 +64,9 @@  host-cshobjs	:= $(sort $(foreach m,$(host-cshlib),$($(m:.so=-objs))))
 # output directory for programs/.o files
 # hostprogs-y := tools/build may have been specified. Retrieve directory
 host-objdirs := $(foreach f,$(__hostprogs), $(dir $(f)))
-# directory of .o files from prog-objs notation
-host-objdirs += $(foreach f,$(host-cmulti),                  \
-                    $(foreach m,$($(f)-objs),                \
-                        $(dir $(m))))
-# directory of .o files from prog-cxxobjs notation
-host-objdirs += $(foreach f,$(host-cxxmulti),                  \
-                    $(foreach m,$($(f)-cxxobjs),                \
+# directory of .o files from prog-objs or prog-cxxobjs notation
+host-objdirs += $(foreach f,$(__hostprogs),                   \
+                    $(foreach m,$($(f)-objs) $($(f)-cxxobjs), \
                         $(dir $(m))))
 
 host-objdirs := $(strip $(sort $(filter-out ./,$(host-objdirs))))