Received: from [140.186.70.92] (port=59192 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OuY18-0006z4-U8 for qemu-devel@nongnu.org; Sat, 11 Sep 2010 17:53:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OuY17-00011E-Va for qemu-devel@nongnu.org; Sat, 11 Sep 2010 17:53:50 -0400 Received: from fmmailgate03.web.de ([217.72.192.234]:40796) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OuY17-000114-GD for qemu-devel@nongnu.org; Sat, 11 Sep 2010 17:53:49 -0400 Message-Id: From: =?ISO-8859-1?Q?Andreas_F=E4rber?= In-Reply-To: <1283786051-29530-2-git-send-email-stefanha@linux.vnet.ibm.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Subject: Re: [Qemu-devel] [PATCH 01/14] trace: Add trace-events file for declaring trace events Date: Sat, 11 Sep 2010 23:53:25 +0200 References: <1283786051-29530-1-git-send-email-stefanha@linux.vnet.ibm.com> <1283786051-29530-2-git-send-email-stefanha@linux.vnet.ibm.com> Sender: andreas.faerber@web.de List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Blue Swirl , Anthony Liguori , Prerna Saxena , qemu-devel@nongnu.org, "Michael S. Tsirkin" Hello Stefan, Am 06.09.2010 um 17:13 schrieb Stefan Hajnoczi: > diff --git a/Makefile b/Makefile > index f95cc2f..3c5e6a0 100644 > --- a/Makefile > +++ b/Makefile > @@ -1,6 +1,6 @@ > # Makefile for QEMU. > > -GENERATED_HEADERS = config-host.h > +GENERATED_HEADERS = config-host.h trace.h > > ifneq ($(wildcard config-host.mak),) > # Put the all: rule here so that config-host.mak can contain > dependencies. > @@ -104,16 +104,24 @@ ui/vnc.o: QEMU_CFLAGS += $(VNC_TLS_CFLAGS) > > bt-host.o: QEMU_CFLAGS += $(BLUEZ_CFLAGS) > > +trace.h: $(SRC_PATH)/trace-events config-host.mak > + $(call quiet-command,sh $(SRC_PATH)/tracetool --$(TRACE_BACKEND) - > h < $< > $@," GEN $@") > + > +trace.c: $(SRC_PATH)/trace-events config-host.mak > + $(call quiet-command,sh $(SRC_PATH)/tracetool --$(TRACE_BACKEND) - > c < $< > $@," GEN $@") > + > +trace.o: trace.c $(GENERATED_HEADERS) There's a dependency issue hidden here: The user emulators recurse into *-user with just a dependency on trace.h. The build then fails because the target Makefile does not know how to build ../trace.o since the rule is in this Makefile instead. I noticed it with ppc-haiku-user but this should be visible with linux- user on a clean build, too. Adding trace.o or $(trace-obj-y) somewhere before subdir-libuser seems to help. I'll post a patch later on if no one beats me. Andreas > + > ###################################################################### > > qemu-img.o: qemu-img-cmds.h > qemu-img.o qemu-tool.o qemu-nbd.o qemu-io.o: $(GENERATED_HEADERS) > > -qemu-img$(EXESUF): qemu-img.o qemu-tool.o qemu-error.o $(block-obj- > y) $(qobject-obj-y) > +qemu-img$(EXESUF): qemu-img.o qemu-tool.o qemu-error.o $(trace-obj- > y) $(block-obj-y) $(qobject-obj-y) > > -qemu-nbd$(EXESUF): qemu-nbd.o qemu-tool.o qemu-error.o $(block-obj- > y) $(qobject-obj-y) > +qemu-nbd$(EXESUF): qemu-nbd.o qemu-tool.o qemu-error.o $(trace-obj- > y) $(block-obj-y) $(qobject-obj-y) > > -qemu-io$(EXESUF): qemu-io.o cmd.o qemu-tool.o qemu-error.o $(block- > obj-y) $(qobject-obj-y) > +qemu-io$(EXESUF): qemu-io.o cmd.o qemu-tool.o qemu-error.o $(trace- > obj-y) $(block-obj-y) $(qobject-obj-y) > > qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx > $(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@," GEN $@") > @@ -133,6 +141,7 @@ clean: > rm -f *.o *.d *.a $(TOOLS) TAGS cscope.* *.pod *~ */*~ > rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d > net/*.o net/*.d fsdev/*.o fsdev/*.d ui/*.o ui/*.d > rm -f qemu-img-cmds.h > + rm -f trace.c trace.h > $(MAKE) -C tests clean > for d in $(ALL_SUBDIRS) libhw32 libhw64 libuser libdis libdis-user; > do \ > if test -d $$d; then $(MAKE) -C $$d $@ || exit 1; fi; \