Skip to contentSkip to conversation

[6381] Consolidate library creation (Avi Kivity)

Qemu-devel Anthony Liguori 1 participant 1 message Jan 21, 2009 Kbuild

lore
Share & tools
lore
#0 lore raw

Revision: 6381

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6381
Author:   aliguori
Date:     2009-01-21 18:13:16 +0000 (Wed, 21 Jan 2009)

Log Message:
-----------
Consolidate library creation (Avi Kivity)

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

Modified Paths:
--------------
trunk/Makefile
trunk/Makefile.target
trunk/rules.mak

Modified: trunk/Makefile
===================================================================

Makefile +0 -4
@@ -174,16 +174,12 @@
 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)
 
 ######################################################################
 

Modified: trunk/Makefile.target
===================================================================

Makefile.target +0 -2
@@ -211,8 +211,6 @@
 # libqemu
 
 libqemu.a: $(LIBOBJS)
-	rm -f $@
-	$(AR) rcs $@ $(LIBOBJS)
 
 translate.o: translate.c cpu.h
 

Modified: trunk/rules.mak
===================================================================

rules.mak +3 -0
@@ -13,4 +13,7 @@
 %$(EXESUF): %.o
 	$(LINK)
 
+%.a:
+	$(call quiet-command,rm -f $@ && $(AR) rcs $@ $^,AR $@)
+
 quiet-command = $(if $(V),$1,@echo $2 && $1)