Received: from eggs.gnu.org ([2001:4830:134:3::10]:49476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gNbBr-0002qV-JZ for qemu-devel@nongnu.org; Fri, 16 Nov 2018 05:17:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gNbBp-00077y-Lw for qemu-devel@nongnu.org; Fri, 16 Nov 2018 05:17:31 -0500 From: Markus Armbruster References: <20181115225052.1322639-1-eblake@redhat.com> Date: Fri, 16 Nov 2018 11:17:25 +0100 In-Reply-To: <20181115225052.1322639-1-eblake@redhat.com> (Eric Blake's message of "Thu, 15 Nov 2018 16:50:52 -0600") Message-ID: <87bm6p72dm.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v2] qapi: Reduce Makefile boilerplate List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org, pbonzini@redhat.com, xiezhide@huawei.com Eric Blake writes: > Adding a new qapi module requires some rather tedious repetition to > wire it into Makefile and Makefile.objs. Add some indirection by > taking advantage of GNU Make string processing to expand a list > of module names into all the required artifacts, so that future > additions of a new module need only touch the list of module names. > > The list has to live in Makefile.objs, due to the way that > unnest-vars slirps in that file without remembering any definition > of $(QAPI_MODULES) from Makefile. > > Signed-off-by: Eric Blake > > --- > v2: also condense Makefile.objs, prefer $(FOO:%=a%b) over > %(patsubst %,a%b,$(foo)) > --- > Makefile | 192 ++++++-------------------------------------------- > Makefile.objs | 75 ++------------------ > 2 files changed, 30 insertions(+), 237 deletions(-) Lovely diffstat. Reviewed-by: Markus Armbruster