From: Masahiro Yamada <yamada.m@jp.panasonic.com>
To: linux-kbuild@vger.kernel.org
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>,
Michal Marek <mmarek@suse.cz>,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/4] kbuild: handle the dependency of multi-objs hostprogs appropriately
Date: Tue, 19 Aug 2014 16:34:21 +0900 [thread overview]
Message-ID: <1408433663-17435-3-git-send-email-yamada.m@jp.panasonic.com> (raw)
In-Reply-To: <1408433663-17435-1-git-send-email-yamada.m@jp.panasonic.com>
Assume we have a Makefile like:
hostprogs-y := foo bar
foo-objs := foo1.o foo2.o
bar-objs := bar1.o bar2.o
Without this commit, the host program foo depends on all of
foo1.o foo2.o bar1.o bar2.o.
This commit allows to handle the dependency of each host program
separately.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---
scripts/Makefile.host | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/scripts/Makefile.host b/scripts/Makefile.host
index ab5980f..133edfa 100644
--- a/scripts/Makefile.host
+++ b/scripts/Makefile.host
@@ -96,8 +96,9 @@ quiet_cmd_host-cmulti = HOSTLD $@
cmd_host-cmulti = $(HOSTCC) $(HOSTLDFLAGS) -o $@ \
$(addprefix $(obj)/,$($(@F)-objs)) \
$(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
-$(host-cmulti): $(obj)/%: $(host-cobjs) FORCE
+$(host-cmulti): FORCE
$(call if_changed,host-cmulti)
+$(call multi_depend, $(host-cmulti), , -objs)
# Create .o file from a single .c file
# host-cobjs -> .o
@@ -113,8 +114,9 @@ quiet_cmd_host-cxxmulti = HOSTLD $@
$(foreach o,objs cxxobjs,\
$(addprefix $(obj)/,$($(@F)-$(o)))) \
$(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
-$(host-cxxmulti): $(obj)/%: $(host-cobjs) $(host-cxxobjs) FORCE
+$(host-cxxmulti): FORCE
$(call if_changed,host-cxxmulti)
+$(call multi_depend, $(host-cxxmulti), , -objs -cxxobjs)
# Create .o file from a single .cc (C++) file
quiet_cmd_host-cxxobjs = HOSTCXX $@
--
1.9.1
next prev parent reply other threads:[~2014-08-19 7:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-19 7:34 [PATCH 0/4] kbuild: Fix the dependency handling of multi-objs targets Masahiro Yamada
2014-08-19 7:34 ` [PATCH 1/4] kbuild: handle multi-objs dependency appropriately Masahiro Yamada
2014-08-19 7:34 ` Masahiro Yamada [this message]
2014-08-19 7:34 ` [PATCH 3/4] kbuild: refactor script/kconfig/Makefile Masahiro Yamada
2014-08-19 7:34 ` [PATCH 4/4] kbuild: remove redundant clean-files from scripts/kconfig/Makefile Masahiro Yamada
2014-08-19 8:58 ` [PATCH 0/4] kbuild: Fix the dependency handling of multi-objs targets Michal Marek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1408433663-17435-3-git-send-email-yamada.m@jp.panasonic.com \
--to=yamada.m@jp.panasonic.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mmarek@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®