From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60145) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRMXV-0004z8-IP for qemu-devel@nongnu.org; Thu, 04 Feb 2016 11:13:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aRMXS-0003tA-C0 for qemu-devel@nongnu.org; Thu, 04 Feb 2016 11:13:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48991) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRMXS-0003t6-6L for qemu-devel@nongnu.org; Thu, 04 Feb 2016 11:13:46 -0500 Date: Thu, 4 Feb 2016 16:13:41 +0000 From: "Daniel P. Berrange" Message-ID: <20160204161341.GE30301@redhat.com> References: <145460194285.5818.14237884467366648188.stgit@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <145460194285.5818.14237884467366648188.stgit@localhost> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2] [trivial] qapi: Build-depend on all json files Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?utf-8?B?TGx1w61z?= Vilanova Cc: Michael Roth , qemu-devel@nongnu.org, Markus Armbruster On Thu, Feb 04, 2016 at 05:05:45PM +0100, Llu=C3=ADs Vilanova wrote: > Dynamically detects the files used to generate QAPI code, thus ensuring > it's never out of sync with the sources. >=20 > Signed-off-by: Llu=C3=ADs Vilanova > --- > Makefile | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) >=20 > diff --git a/Makefile b/Makefile > index d0de2d4..f8e8648 100644 > --- a/Makefile > +++ b/Makefile > @@ -269,10 +269,8 @@ $(SRC_PATH)/qga/qapi-schema.json $(SRC_PATH)/scrip= ts/qapi-commands.py $(qapi-py) > $(gen-out-type) -o qga/qapi-generated -p "qga-" $<, \ > " GEN $@") > =20 > -qapi-modules =3D $(SRC_PATH)/qapi-schema.json $(SRC_PATH)/qapi/common.= json \ > - $(SRC_PATH)/qapi/block.json $(SRC_PATH)/qapi/block-core= .json \ > - $(SRC_PATH)/qapi/event.json $(SRC_PATH)/qapi/introspect= .json \ > - $(SRC_PATH)/qapi/crypto.json > +qapi-modules =3D $(SRC_PATH)/qapi-schema.json > +qapi-modules +=3D $(wildcard $(SRC_PATH)/qapi/*.json) > =20 > qapi-types.c qapi-types.h :\ > $(qapi-modules) $(SRC_PATH)/scripts/qapi-types.py $(qapi-py) I'm not really a fan of the use of wildcards - IME they also lead to bugs where the build picks up too many or too few files and you don't notice the mistake until later - this is particularly true at release time when making dist, but also where a developer has a file locally they forget to commit and submit for merge, it can be silently missed. So yes you are fixing one possible source of mistakes, but in exchange you are introducing a different possible source of mistakes. I don't think one is clearer better than the other, and IMHO so we're better sticking with normal QEMU practice listing all files explicitly. 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 :|