kbuild: clean-up and bug fix of scripts/Makefile.host
authorMasahiro Yamada <yamada.m@jp.panasonic.com>
Wed, 16 Jul 2014 07:12:23 +0000 (16:12 +0900)
committerMichal Marek <mmarek@suse.cz>
Wed, 16 Jul 2014 15:15:26 +0000 (17:15 +0200)
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>
scripts/Makefile.host

index bb6a11f4f19387e404839d913b747d6571e6ec7e..ab5980f917141e9f90f52a9ae49e71901104196f 100644 (file)
@@ -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))))
 
This page took 0.027022 seconds and 5 git commands to generate.