From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49191) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUfWq-0007Ov-AH for qemu-devel@nongnu.org; Mon, 31 Mar 2014 12:57:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WUfWm-0005xd-7k for qemu-devel@nongnu.org; Mon, 31 Mar 2014 12:57:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32114) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUfWl-0005xT-UV for qemu-devel@nongnu.org; Mon, 31 Mar 2014 12:57:40 -0400 Message-ID: <5339980E.4010808@redhat.com> Date: Mon, 31 Mar 2014 10:30:06 -0600 From: Eric Blake MIME-Version: 1.0 References: <20140330203508.16278.39223.stgit@fimbulvetr.bsc.es> <20140330203515.16278.67149.stgit@fimbulvetr.bsc.es> In-Reply-To: <20140330203515.16278.67149.stgit@fimbulvetr.bsc.es> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="eLBgc56x135QejmwChsPmAtku21Krpwul" Subject: Re: [Qemu-devel] [PATCHv51/3] qapi: Use an explicit input file List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?TGx1w61zIFZpbGFub3Zh?= , qemu-devel@nongnu.org Cc: =?UTF-8?B?QmVub8OudCBDYW5ldA==?= , Markus Armbruster , Luiz Capitulino This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --eLBgc56x135QejmwChsPmAtku21Krpwul Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/30/2014 02:35 PM, Llu=C3=ADs Vilanova wrote: Missing a space in the subject line (this is not version 51 of the patches, but v5 and patch 1/3 :) > Use an explicit input file on the command-line instead of reading from = standard input >=20 > Signed-off-by: Llu=C3=ADs Vilanova > --- > 25 files changed, 72 insertions(+), 41 deletions(-) Now we've got competing versions of the patches between Beno=C3=AEt and L= lu=C3=ADs (and apologies to either of you if I accidentally mis-spell the 'i' in your name due to my keyboard not making it as easy to add accents). >=20 > diff --git a/Makefile b/Makefile > index ec74039..c7cec01 100644 > --- a/Makefile > +++ b/Makefile > @@ -237,23 +237,35 @@ qapi-py =3D $(SRC_PATH)/scripts/qapi.py $(SRC_PAT= H)/scripts/ordereddict.py > =20 > qga/qapi-generated/qga-qapi-types.c qga/qapi-generated/qga-qapi-types.= h :\ > $(SRC_PATH)/qga/qapi-schema.json $(SRC_PATH)/scripts/qapi-types.py $(q= api-py) > - $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py $(ge= n-out-type) -o qga/qapi-generated -p "qga-" < $<, " GEN $@") > + $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py \ > + $(gen-out-type) -i "$<" -o qga/qapi-generated -p "qga-", \ > + " GEN $@") I _like_ that you used \ to break long lines to fit into 80 columns. But doing it at the same time as adding an option makes it a little harder to see the addition; maybe it's worth splitting into two patches (one for the reformatting but no semantic change, the other for the addition)? And maybe by using '-i $<' at the place where '< $<' currently appears will make it a bit easier to see the change being done, rather than having to spot that things are reordered to provide -i earlier? > +++ b/docs/qapi-code-gen.txt > @@ -221,7 +221,7 @@ created code. > Example: > =20 > mdroth@illuin:~/w/qemu2.git$ python scripts/qapi-types.py \ > - --output-dir=3D"qapi-generated" --prefix=3D"example-" < example-= schema.json > + --input-file=3Dexample-schema.json --output-dir=3D"qapi-generate= d" --prefix=3D"example-" On Beno=C3=AEt's version, the comment was made that it is more 'compiler-like' to take the input file as an argument name, rather than an option name (that is, use '$<' directly, rather than '-i $<' in the Makefile) - but if we do that, it is best to put the argument after all options. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --eLBgc56x135QejmwChsPmAtku21Krpwul 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 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTOZgOAAoJEKeha0olJ0NqizYH/RKFyj3oHPu+eWIDdMk19qo9 MLCfmM0aVZZHQ+Et0oDu0F2moqDxWuduNuzxFmpgPh7ypf1AurEQ6stpOLaJNd5n orn+lGkloQ5DC1VM7AmB2ZwXmYp52G4vnslwjjH779bKEBC1FlBsSex6X5TPmtoz gQlLS8nIVl6S6ezFN7j3+UaZdJjZWG0CuMI/zb1Vf5MUHonYP/BAQ77WsObXXi8i b1X6wTr8BUZZYLBMgRJXQTvPfZ75ksZBwypj/sxo8AdbHI9VJGQ089JT0xh3WZ7j VR8GUto4eECujtPpxqxlspBmKwy5MUOMjRc/HViawzLr+E5qsApHnSpIjgXr5mU= =BJ7D -----END PGP SIGNATURE----- --eLBgc56x135QejmwChsPmAtku21Krpwul--