From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35982) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuNOv-000461-Ks for qemu-devel@nongnu.org; Thu, 26 Jul 2012 08:42:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SuNOo-00043L-0j for qemu-devel@nongnu.org; Thu, 26 Jul 2012 08:42:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:18852) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuNOn-00043G-Nu for qemu-devel@nongnu.org; Thu, 26 Jul 2012 08:42:37 -0400 Message-ID: <50113B3A.4050408@redhat.com> Date: Thu, 26 Jul 2012 06:42:34 -0600 From: Eric Blake MIME-Version: 1.0 References: <1343235256-26310-1-git-send-email-lcapitulino@redhat.com> <1343235256-26310-10-git-send-email-lcapitulino@redhat.com> <87sjced9mn.fsf@blackfin.pond.sub.org> <50113031.2070101@redhat.com> <50113A50.4090902@redhat.com> In-Reply-To: <50113A50.4090902@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig76AF614A61D998FC7E2048CE" Subject: Re: [Qemu-devel] [PATCH 09/11] qapi: add qapi-errors.py List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aliguori@us.ibm.com, Markus Armbruster , qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com, Paolo Bonzini , Luiz Capitulino This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig76AF614A61D998FC7E2048CE Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable On 07/26/2012 06:38 AM, Eric Blake wrote: >>> Paolo, Eric, maybe you can provide advice on how to best tell make th= at >>> a recipe generates multiple files. >> >> Hmm, I would just do >> >> qapi-errors.h: qapi-errors.c >> qapi-errors.c: $(SRC_PATH)/qapi-schema-errors.json $(SRC_PATH)/scripts= /qapi-errors.py >> $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-errors.py -o = "." < $<, " GEN $@") >> >> I think that's what I usually saw for bison (which creates both .h and= .c). >=20 > Indeed, per > https://www.gnu.org/software/automake/manual/automake.html#Multiple-Out= puts, > that is an appropriate solution for a 2-file generation. Or, since we depend on GNU make, we can use pattern rules instead (untested): %-errors.h %-errors.c: \ %(SRC_PATH)/%-schema-errors.json $(SRC_PATH)/srcipts/%-errors.py $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-errors.py -o "." < $<, " GEN $@") https://www.gnu.org/software/automake/manual/make.html#Pattern-Examples --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig76AF614A61D998FC7E2048CE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJQETs6AAoJEKeha0olJ0Nq4sUH+wXD81YZJn6ZTN438+IUm4TS 8sN7E7feNUeNtVoDxyXGaqaQfmf7FA/pa7MA9TA8jKk9FBb7MAu+oneX9J2eZwkg NWcC7MdfzlVYb1+y2ALUiu3AT+3Kq6rUCW9VHTFI0zjZo6J4xvBNUlCXh/ghStoQ J36IDSdT6hVAE50mng+9JhunwLEdq4kE9n1mbcx8GP/bHAMQ9HPE2lNRRuyYLyxm p5rYSdmFOyOgncx1I3U1ayy+P8Dl902hRjvM9QM8kRLaUgehEkH+O5Yub1cNYIwR Tnq2Pe+p3bu+rfiHiXWg931p5YwRkmxotPcwV5TpaT8543VEUbRLAmJilyn+EaQ= =vFTQ -----END PGP SIGNATURE----- --------------enig76AF614A61D998FC7E2048CE--