qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 6/6] Consolidate library creation
Date: Wed, 21 Jan 2009 19:10:09 +0200	[thread overview]
Message-ID: <1232557809-12860-7-git-send-email-avi@redhat.com> (raw)
In-Reply-To: <1232557809-12860-1-git-send-email-avi@redhat.com>

Put archive utility (ar) invocations into a rule, and have it generate
quiet output by default.

Signed-off-by: Avi Kivity <avi@redhat.com>
---
 Makefile        |    4 ----
 Makefile.target |    2 --
 rules.mak       |    3 +++
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index ac15ca5..ff6a009 100644
--- a/Makefile
+++ b/Makefile
@@ -174,16 +174,12 @@ curses.o: curses.c keymaps.c curses_keys.h
 bt-host.o: CFLAGS += $(CONFIG_BLUEZ_CFLAGS)
 
 libqemu_common.a: $(OBJS)
-	rm -f $@ 
-	$(AR) rcs $@ $(OBJS)
 
 #######################################################################
 # USER_OBJS is code used by qemu userspace emulation
 USER_OBJS=cutils.o  cache-utils.o
 
 libqemu_user.a: $(USER_OBJS)
-	rm -f $@ 
-	$(AR) rcs $@ $(USER_OBJS)
 
 ######################################################################
 
diff --git a/Makefile.target b/Makefile.target
index 1a02451..a091ce9 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -211,8 +211,6 @@ endif
 # libqemu
 
 libqemu.a: $(LIBOBJS)
-	rm -f $@
-	$(AR) rcs $@ $(LIBOBJS)
 
 translate.o: translate.c cpu.h
 
diff --git a/rules.mak b/rules.mak
index 818c5ef..a4955da 100644
--- a/rules.mak
+++ b/rules.mak
@@ -13,4 +13,7 @@ LINK = $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $^ $(LIBS),LINK $@)
 %$(EXESUF): %.o
 	$(LINK)
 
+%.a:
+	$(call quiet-command,rm -f $@ && $(AR) rcs $@ $^,AR $@)
+
 quiet-command = $(if $(V),$1,@echo $2 && $1)
-- 
1.6.0.6

  parent reply	other threads:[~2009-01-21 17:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-21 17:10 [Qemu-devel] [PATCH 0/6] Makefile enhancements (v2) Avi Kivity
2009-01-21 17:10 ` [Qemu-devel] [PATCH 1/6] Drop OP_CFLAGS Avi Kivity
2009-01-21 17:10 ` [Qemu-devel] [PATCH 2/6] Consolidate compiler invocations Avi Kivity
2009-01-21 17:10 ` [Qemu-devel] [PATCH 3/6] Introduce rules.mak Avi Kivity
2009-01-21 17:10 ` [Qemu-devel] [PATCH 4/6] Consolidate linker rules Avi Kivity
2009-01-21 17:10 ` [Qemu-devel] [PATCH 5/6] Make make output quieter Avi Kivity
2009-01-21 17:10 ` Avi Kivity [this message]
2009-01-21 18:13 ` [Qemu-devel] Re: [PATCH 0/6] Makefile enhancements (v2) Anthony Liguori

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=1232557809-12860-7-git-send-email-avi@redhat.com \
    --to=avi@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=qemu-devel@nongnu.org \
    /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;
as well as URLs for NNTP newsgroup(s).