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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx>
---
 scripts/Makefile.host | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

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))))
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux