Received: from eggs.gnu.org ([2001:4830:134:3::10]:53770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXULL-0008Ju-DH for qemu-devel@nongnu.org; Wed, 10 Aug 2016 10:18:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXULG-0004GC-Vu for qemu-devel@nongnu.org; Wed, 10 Aug 2016 10:18:50 -0400 Received: from roura.ac.upc.es ([147.83.33.10]:47401) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXULG-0004FJ-Ke for qemu-devel@nongnu.org; Wed, 10 Aug 2016 10:18:46 -0400 From: =?utf-8?Q?Llu=C3=ADs_Vilanova?= References: <1470756748-18933-1-git-send-email-berrange@redhat.com> <1470756748-18933-18-git-send-email-berrange@redhat.com> Date: Wed, 10 Aug 2016 16:18:44 +0200 In-Reply-To: <1470756748-18933-18-git-send-email-berrange@redhat.com> (Daniel P. Berrange's message of "Tue, 9 Aug 2016 16:31:45 +0100") Message-ID: <87popgso57.fsf@fimbulvetr.bsc.es> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH for-2.8 v1 17/60] trace: introduce some Makefile rules for module code gen List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: qemu-devel@nongnu.org, Stefan Hajnoczi Daniel P Berrange writes: [...] > diff --git a/Makefile b/Makefile > index 48673cb..2b9ba60 100644 > --- a/Makefile > +++ b/Makefile > @@ -70,9 +70,55 @@ GENERATED_SOURCES += trace/generated-helpers.c > ifeq ($(findstring ust,$(TRACE_BACKENDS)),ust) > GENERATED_HEADERS += trace/generated-ust-provider.h > +GENERATED_HEADERS += trace/generated-ust-provider-all.h > GENERATED_SOURCES += trace/generated-ust.c > endif > +GENERATED_HEADERS += $(trace-events-subdirs:%=%/trace.h) > +GENERATED_SOURCES += $(trace-events-subdirs:%=%/trace.c) > +GENERATED_DTRACE = > +ifdef CONFIG_TRACE_DTRACE > +GENERATED_HEADERS += $(trace-events-subdirs:%=%/trace-dtrace.h) > +GENERATED_DTRACE += $(trace-events-subdirs:%=%/trace-dtrace.dtrace) > +endif > +ifdef CONFIG_TRACE_UST > +GENERATED_HEADERS += $(trace-events-subdirs:%=%/trace-ust.h) > +endif > + > +%/trace.h: $(SRC_PATH)/%/trace-events $(tracetool-y) > + $(call quiet-command,$(TRACETOOL) \ > + --format=h \ > + --backends=$(TRACE_BACKENDS) \ > + --group=$(shell dirname $@ | tr /- _) \ > + < $< > $@," GEN $@") > + > +%/trace.c: $(SRC_PATH)/%/trace-events $(tracetool-y) > + $(call quiet-command,$(TRACETOOL) \ > + --format=c \ > + --backends=$(TRACE_BACKENDS) \ > + --group=$(shell dirname $@ | tr /- _) \ > + < $< > $@," GEN $@") > + > +%/trace-ust.h: $(SRC_PATH)/%/trace-events $(tracetool-y) > + $(call quiet-command,$(TRACETOOL) \ > + --format=ust-events-h \ > + --backends=$(TRACE_BACKENDS) \ > + --group=$(shell dirname $@ | tr /- _) \ > + < $< > $@," GEN $@") > + > +%/trace-dtrace.dtrace: $(SRC_PATH)/%/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y) > + $(call quiet-command,$(TRACETOOL) \ > + --format=d \ > + --backends=$(TRACE_BACKENDS) \ > + --group=$(shell dirname $@ | tr /- _) \ > + < $< > $@," GEN $@") > + > +%/trace-dtrace.h: %/trace-dtrace.dtrace $(tracetool-y) > + $(call quiet-command,dtrace -o $@ -h -s $<, " GEN $@") > + > +%/trace-dtrace.o: %/trace-dtrace.dtrace $(tracetool-y) > + > + > # Don't try to regenerate Makefile or configure > # We don't generate any of them > Makefile: ; I'd rather keep the "generated-" prefix on all files that usually are not directly included by QEMU developers. Cheers, Lluis