From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49985) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRLy9-0003qj-OG for qemu-devel@nongnu.org; Thu, 04 Feb 2016 10:37:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aRLy8-0003FM-OS for qemu-devel@nongnu.org; Thu, 04 Feb 2016 10:37:17 -0500 Received: from mail-vk0-x236.google.com ([2607:f8b0:400c:c05::236]:34078) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRLy8-0003FB-HL for qemu-devel@nongnu.org; Thu, 04 Feb 2016 10:37:16 -0500 Received: by mail-vk0-x236.google.com with SMTP id e185so38561831vkb.1 for ; Thu, 04 Feb 2016 07:37:16 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <56B36EF8.6080309@redhat.com> References: <145459675563.11777.5257429454748921678.stgit@localhost> <56B36EF8.6080309@redhat.com> From: Peter Maydell Date: Thu, 4 Feb 2016 15:36:56 +0000 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH ] [trivial] qapi: Build-depend on all json files List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Michael Roth , Markus Armbruster , =?UTF-8?Q?Llu=C3=ADs_Vilanova?= , QEMU Developers On 4 February 2016 at 15:32, Eric Blake wrote: > On 02/04/2016 07:55 AM, Peter Maydell wrote: >> On 4 February 2016 at 14:39, Llu=C3=ADs Vilanova w= rote: >>> Dynamically detects the files used to generate QAPI code, thus ensuring >>> it's never out of sync with the sources. >>> >>> Signed-off-by: Llu=C3=ADs Vilanova >>> --- >>> Makefile | 6 ++---- >>> 1 file changed, 2 insertions(+), 4 deletions(-) >>> >>> diff --git a/Makefile b/Makefile >>> index d0de2d4..627f772 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 $@") >>> >>> -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 $(shell find $(SRC_PATH)/qapi -name "*.json") >> >> All the .json files are in the same directory, so I don't think we shoul= d >> need to use find here. Does >> >> qapi-modules +=3D $(wildcard $(SRC_PATH)/qapi/*.json)) >> >> work ? > > Does this wildcard affect what goes into a tarball? I'm worried that we > may run the risk of a stale .json file on one developer's machine > causing an unreproducible build on other machines where the file is not > found; explicit lists tend to be safer than wildcards. > > I won't reject the patch if others like it, but I won't approve it myself= . You need to ask Mike Roth about our tarball generation process, not me. I do agree that this patch needs to make the case for why .json source files are special and should be wildcarded, when for instance all our C source files are explicitly listed in makefiles. thanks -- PMM