From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34351) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXUoc-0000uz-OG for qemu-devel@nongnu.org; Wed, 10 Aug 2016 10:49:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXUoY-00056X-0F for qemu-devel@nongnu.org; Wed, 10 Aug 2016 10:49:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54230) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXUoX-00056B-Nj for qemu-devel@nongnu.org; Wed, 10 Aug 2016 10:49:01 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4CFA361E62 for ; Wed, 10 Aug 2016 14:49:00 +0000 (UTC) Date: Wed, 10 Aug 2016 15:48:57 +0100 From: "Daniel P. Berrange" Message-ID: <20160810144857.GO13393@redhat.com> Reply-To: "Daniel P. Berrange" References: <1470756748-18933-1-git-send-email-berrange@redhat.com> <1470756748-18933-18-git-send-email-berrange@redhat.com> <87popgso57.fsf@fimbulvetr.bsc.es> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <87popgso57.fsf@fimbulvetr.bsc.es> Content-Transfer-Encoding: quoted-printable 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: qemu-devel@nongnu.org, Stefan Hajnoczi On Wed, Aug 10, 2016 at 04:18:44PM +0200, Llu=C3=ADs Vilanova wrote: > Daniel P Berrange writes: > [...] > > diff --git a/Makefile b/Makefile > > index 48673cb..2b9ba60 100644 > > --- a/Makefile > > +++ b/Makefile > > @@ -70,9 +70,55 @@ GENERATED_SOURCES +=3D trace/generated-helpers.c > =20 > > ifeq ($(findstring ust,$(TRACE_BACKENDS)),ust) > > GENERATED_HEADERS +=3D trace/generated-ust-provider.h > > +GENERATED_HEADERS +=3D trace/generated-ust-provider-all.h > > GENERATED_SOURCES +=3D trace/generated-ust.c > > endif > =20 > > +GENERATED_HEADERS +=3D $(trace-events-subdirs:%=3D%/trace.h) > > +GENERATED_SOURCES +=3D $(trace-events-subdirs:%=3D%/trace.c) > > +GENERATED_DTRACE =3D > > +ifdef CONFIG_TRACE_DTRACE > > +GENERATED_HEADERS +=3D $(trace-events-subdirs:%=3D%/trace-dtrace.h) > > +GENERATED_DTRACE +=3D $(trace-events-subdirs:%=3D%/trace-dtrace.dtra= ce) > > +endif > > +ifdef CONFIG_TRACE_UST > > +GENERATED_HEADERS +=3D $(trace-events-subdirs:%=3D%/trace-ust.h) > > +endif > > + > > +%/trace.h: $(SRC_PATH)/%/trace-events $(tracetool-y) > > + $(call quiet-command,$(TRACETOOL) \ > > + --format=3Dh \ > > + --backends=3D$(TRACE_BACKENDS) \ > > + --group=3D$(shell dirname $@ | tr /- _) \ > > + < $< > $@," GEN $@") > > + > > +%/trace.c: $(SRC_PATH)/%/trace-events $(tracetool-y) > > + $(call quiet-command,$(TRACETOOL) \ > > + --format=3Dc \ > > + --backends=3D$(TRACE_BACKENDS) \ > > + --group=3D$(shell dirname $@ | tr /- _) \ > > + < $< > $@," GEN $@") > > + > > +%/trace-ust.h: $(SRC_PATH)/%/trace-events $(tracetool-y) > > + $(call quiet-command,$(TRACETOOL) \ > > + --format=3Dust-events-h \ > > + --backends=3D$(TRACE_BACKENDS) \ > > + --group=3D$(shell dirname $@ | tr /- _) \ > > + < $< > $@," GEN $@") > > + > > +%/trace-dtrace.dtrace: $(SRC_PATH)/%/trace-events $(BUILD_DIR)/confi= g-host.mak $(tracetool-y) > > + $(call quiet-command,$(TRACETOOL) \ > > + --format=3Dd \ > > + --backends=3D$(TRACE_BACKENDS) \ > > + --group=3D$(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: ; >=20 > I'd rather keep the "generated-" prefix on all files that usually are n= ot > directly included by QEMU developers. I don't think that's really needed - all these files are in sub-dirs now and its a clear rule that trace*.[hc] is auto-generated in every sub-dir now. Also no oither code in QEMU thats auto-generated adds this prefix on so trace is inconsistent with practice elsewhere. Regards, Daniel --=20 |: http://berrange.com -o- http://www.flickr.com/photos/dberrange= / :| |: http://libvirt.org -o- http://virt-manager.or= g :| |: http://autobuild.org -o- http://search.cpan.org/~danberr= / :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vn= c :|