diff mbox

[v21,01/11] trace: move trace objects from Makefile to Makefile.objs

Message ID 1300373376-13890-2-git-send-email-alevy@redhat.com
State New
Headers show

Commit Message

Alon Levy March 17, 2011, 2:49 p.m. UTC
---
 Makefile      |   32 --------------------------------
 Makefile.objs |   32 ++++++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+), 32 deletions(-)

Comments

Alon Levy March 17, 2011, 3 p.m. UTC | #1
On Thu, Mar 17, 2011 at 04:49:26PM +0200, Alon Levy wrote:
> ---
>  Makefile      |   32 --------------------------------
>  Makefile.objs |   32 ++++++++++++++++++++++++++++++++
>  2 files changed, 32 insertions(+), 32 deletions(-)

The commit message can be a little more verbose :(

It will be:

allow libcacard (later commit) to make use of the rules for
building trace objects, to build libcacard/vscclient (and
later still libcacard/libcacard.so).

> 
> diff --git a/Makefile b/Makefile
> index eca4c76..5b35b9f 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -112,38 +112,6 @@ ui/vnc.o: QEMU_CFLAGS += $(VNC_TLS_CFLAGS)
>  
>  bt-host.o: QEMU_CFLAGS += $(BLUEZ_CFLAGS)
>  
> -ifeq ($(TRACE_BACKEND),dtrace)
> -trace.h: trace.h-timestamp trace-dtrace.h
> -else
> -trace.h: trace.h-timestamp
> -endif
> -trace.h-timestamp: $(SRC_PATH)/trace-events config-host.mak
> -	$(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -h < $< > $@,"  GEN   trace.h")
> -	@cmp -s $@ trace.h || cp $@ trace.h
> -
> -trace.c: trace.c-timestamp
> -trace.c-timestamp: $(SRC_PATH)/trace-events config-host.mak
> -	$(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -c < $< > $@,"  GEN   trace.c")
> -	@cmp -s $@ trace.c || cp $@ trace.c
> -
> -trace.o: trace.c $(GENERATED_HEADERS)
> -
> -trace-dtrace.h: trace-dtrace.dtrace
> -	$(call quiet-command,dtrace -o $@ -h -s $<, "  GEN   trace-dtrace.h")
> -
> -# Normal practice is to name DTrace probe file with a '.d' extension
> -# but that gets picked up by QEMU's Makefile as an external dependancy
> -# rule file. So we use '.dtrace' instead
> -trace-dtrace.dtrace: trace-dtrace.dtrace-timestamp
> -trace-dtrace.dtrace-timestamp: $(SRC_PATH)/trace-events config-host.mak
> -	$(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -d < $< > $@,"  GEN   trace-dtrace.dtrace")
> -	@cmp -s $@ trace-dtrace.dtrace || cp $@ trace-dtrace.dtrace
> -
> -trace-dtrace.o: trace-dtrace.dtrace $(GENERATED_HEADERS)
> -	$(call quiet-command,dtrace -o $@ -G -s $<, "  GEN trace-dtrace.o")
> -
> -simpletrace.o: simpletrace.c $(GENERATED_HEADERS)
> -
>  version.o: $(SRC_PATH)/version.rc config-host.mak
>  	$(call quiet-command,$(WINDRES) -I. -o $@ $<,"  RC    $(TARGET_DIR)$@")
>  
> diff --git a/Makefile.objs b/Makefile.objs
> index a52f42f..be4c4d9 100644
> --- a/Makefile.objs
> +++ b/Makefile.objs
> @@ -309,6 +309,38 @@ libdis-$(CONFIG_SPARC_DIS) += sparc-dis.o
>  # trace
>  
>  ifeq ($(TRACE_BACKEND),dtrace)
> +trace.h: trace.h-timestamp trace-dtrace.h
> +else
> +trace.h: trace.h-timestamp
> +endif
> +trace.h-timestamp: $(SRC_PATH)/trace-events config-host.mak
> +	$(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -h < $< > $@,"  GEN   trace.h")
> +	@cmp -s $@ trace.h || cp $@ trace.h
> +
> +trace.c: trace.c-timestamp
> +trace.c-timestamp: $(SRC_PATH)/trace-events config-host.mak
> +	$(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -c < $< > $@,"  GEN   trace.c")
> +	@cmp -s $@ trace.c || cp $@ trace.c
> +
> +trace.o: trace.c $(GENERATED_HEADERS)
> +
> +trace-dtrace.h: trace-dtrace.dtrace
> +	$(call quiet-command,dtrace -o $@ -h -s $<, "  GEN   trace-dtrace.h")
> +
> +# Normal practice is to name DTrace probe file with a '.d' extension
> +# but that gets picked up by QEMU's Makefile as an external dependancy
> +# rule file. So we use '.dtrace' instead
> +trace-dtrace.dtrace: trace-dtrace.dtrace-timestamp
> +trace-dtrace.dtrace-timestamp: $(SRC_PATH)/trace-events config-host.mak
> +	$(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -d < $< > $@,"  GEN   trace-dtrace.dtrace")
> +	@cmp -s $@ trace-dtrace.dtrace || cp $@ trace-dtrace.dtrace
> +
> +trace-dtrace.o: trace-dtrace.dtrace $(GENERATED_HEADERS)
> +	$(call quiet-command,dtrace -o $@ -G -s $<, "  GEN trace-dtrace.o")
> +
> +simpletrace.o: simpletrace.c $(GENERATED_HEADERS)
> +
> +ifeq ($(TRACE_BACKEND),dtrace)
>  trace-obj-y = trace-dtrace.o
>  else
>  trace-obj-y = trace.o
> -- 
> 1.7.4.1
> 
>
Stefan Hajnoczi March 17, 2011, 4:45 p.m. UTC | #2
On Thu, Mar 17, 2011 at 3:00 PM, Alon Levy <alevy@redhat.com> wrote:
> On Thu, Mar 17, 2011 at 04:49:26PM +0200, Alon Levy wrote:
>> ---
>>  Makefile      |   32 --------------------------------
>>  Makefile.objs |   32 ++++++++++++++++++++++++++++++++
>>  2 files changed, 32 insertions(+), 32 deletions(-)
>
> The commit message can be a little more verbose :(
>
> It will be:
>
> allow libcacard (later commit) to make use of the rules for
> building trace objects, to build libcacard/vscclient (and
> later still libcacard/libcacard.so).

I will test this patch and get back to you within the next two or three days.

Stefan
Alon Levy March 17, 2011, 5:23 p.m. UTC | #3
On Thu, Mar 17, 2011 at 04:45:15PM +0000, Stefan Hajnoczi wrote:
> On Thu, Mar 17, 2011 at 3:00 PM, Alon Levy <alevy@redhat.com> wrote:
> > On Thu, Mar 17, 2011 at 04:49:26PM +0200, Alon Levy wrote:
> >> ---
> >>  Makefile      |   32 --------------------------------
> >>  Makefile.objs |   32 ++++++++++++++++++++++++++++++++
> >>  2 files changed, 32 insertions(+), 32 deletions(-)
> >
> > The commit message can be a little more verbose :(
> >
> > It will be:
> >
> > allow libcacard (later commit) to make use of the rules for
> > building trace objects, to build libcacard/vscclient (and
> > later still libcacard/libcacard.so).
> 
> I will test this patch and get back to you within the next two or three days.
Thanks, much appreciated.

Alon

> 
> Stefan
>
Stefan Hajnoczi March 21, 2011, 12:28 p.m. UTC | #4
On Thu, Mar 17, 2011 at 5:23 PM, Alon Levy <alevy@redhat.com> wrote:
> On Thu, Mar 17, 2011 at 04:45:15PM +0000, Stefan Hajnoczi wrote:
>> On Thu, Mar 17, 2011 at 3:00 PM, Alon Levy <alevy@redhat.com> wrote:
>> > On Thu, Mar 17, 2011 at 04:49:26PM +0200, Alon Levy wrote:
>> >> ---
>> >>  Makefile      |   32 --------------------------------
>> >>  Makefile.objs |   32 ++++++++++++++++++++++++++++++++
>> >>  2 files changed, 32 insertions(+), 32 deletions(-)
>> >
>> > The commit message can be a little more verbose :(
>> >
>> > It will be:
>> >
>> > allow libcacard (later commit) to make use of the rules for
>> > building trace objects, to build libcacard/vscclient (and
>> > later still libcacard/libcacard.so).
>>
>> I will test this patch and get back to you within the next two or three days.
> Thanks, much appreciated.

$ make distclean
$ ./configure --prefix=/usr --target-list=x86_64-softmmu
--enable-io-thread  --disable-strip --enable-trace-backend=simple
$ make
[...]
  LINK  libcacard/vscclient
simpletrace.o: In function `get_clock':
/home/stefanha/qemu/qemu-timer.h:92: undefined reference to `use_rt_clock'
collect2: ld returned 1 exit status
make[1]: *** [vscclient] Error 1
make: *** [subdir-libcacard] Error 2

Stefan
diff mbox

Patch

diff --git a/Makefile b/Makefile
index eca4c76..5b35b9f 100644
--- a/Makefile
+++ b/Makefile
@@ -112,38 +112,6 @@  ui/vnc.o: QEMU_CFLAGS += $(VNC_TLS_CFLAGS)
 
 bt-host.o: QEMU_CFLAGS += $(BLUEZ_CFLAGS)
 
-ifeq ($(TRACE_BACKEND),dtrace)
-trace.h: trace.h-timestamp trace-dtrace.h
-else
-trace.h: trace.h-timestamp
-endif
-trace.h-timestamp: $(SRC_PATH)/trace-events config-host.mak
-	$(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -h < $< > $@,"  GEN   trace.h")
-	@cmp -s $@ trace.h || cp $@ trace.h
-
-trace.c: trace.c-timestamp
-trace.c-timestamp: $(SRC_PATH)/trace-events config-host.mak
-	$(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -c < $< > $@,"  GEN   trace.c")
-	@cmp -s $@ trace.c || cp $@ trace.c
-
-trace.o: trace.c $(GENERATED_HEADERS)
-
-trace-dtrace.h: trace-dtrace.dtrace
-	$(call quiet-command,dtrace -o $@ -h -s $<, "  GEN   trace-dtrace.h")
-
-# Normal practice is to name DTrace probe file with a '.d' extension
-# but that gets picked up by QEMU's Makefile as an external dependancy
-# rule file. So we use '.dtrace' instead
-trace-dtrace.dtrace: trace-dtrace.dtrace-timestamp
-trace-dtrace.dtrace-timestamp: $(SRC_PATH)/trace-events config-host.mak
-	$(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -d < $< > $@,"  GEN   trace-dtrace.dtrace")
-	@cmp -s $@ trace-dtrace.dtrace || cp $@ trace-dtrace.dtrace
-
-trace-dtrace.o: trace-dtrace.dtrace $(GENERATED_HEADERS)
-	$(call quiet-command,dtrace -o $@ -G -s $<, "  GEN trace-dtrace.o")
-
-simpletrace.o: simpletrace.c $(GENERATED_HEADERS)
-
 version.o: $(SRC_PATH)/version.rc config-host.mak
 	$(call quiet-command,$(WINDRES) -I. -o $@ $<,"  RC    $(TARGET_DIR)$@")
 
diff --git a/Makefile.objs b/Makefile.objs
index a52f42f..be4c4d9 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -309,6 +309,38 @@  libdis-$(CONFIG_SPARC_DIS) += sparc-dis.o
 # trace
 
 ifeq ($(TRACE_BACKEND),dtrace)
+trace.h: trace.h-timestamp trace-dtrace.h
+else
+trace.h: trace.h-timestamp
+endif
+trace.h-timestamp: $(SRC_PATH)/trace-events config-host.mak
+	$(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -h < $< > $@,"  GEN   trace.h")
+	@cmp -s $@ trace.h || cp $@ trace.h
+
+trace.c: trace.c-timestamp
+trace.c-timestamp: $(SRC_PATH)/trace-events config-host.mak
+	$(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -c < $< > $@,"  GEN   trace.c")
+	@cmp -s $@ trace.c || cp $@ trace.c
+
+trace.o: trace.c $(GENERATED_HEADERS)
+
+trace-dtrace.h: trace-dtrace.dtrace
+	$(call quiet-command,dtrace -o $@ -h -s $<, "  GEN   trace-dtrace.h")
+
+# Normal practice is to name DTrace probe file with a '.d' extension
+# but that gets picked up by QEMU's Makefile as an external dependancy
+# rule file. So we use '.dtrace' instead
+trace-dtrace.dtrace: trace-dtrace.dtrace-timestamp
+trace-dtrace.dtrace-timestamp: $(SRC_PATH)/trace-events config-host.mak
+	$(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -d < $< > $@,"  GEN   trace-dtrace.dtrace")
+	@cmp -s $@ trace-dtrace.dtrace || cp $@ trace-dtrace.dtrace
+
+trace-dtrace.o: trace-dtrace.dtrace $(GENERATED_HEADERS)
+	$(call quiet-command,dtrace -o $@ -G -s $<, "  GEN trace-dtrace.o")
+
+simpletrace.o: simpletrace.c $(GENERATED_HEADERS)
+
+ifeq ($(TRACE_BACKEND),dtrace)
 trace-obj-y = trace-dtrace.o
 else
 trace-obj-y = trace.o