qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 01/14] trace: Add trace-events file for declarin


From: Andreas Färber
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

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; \




reply via email to

[Prev in Thread] Current Thread [Next in Thread]