From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59165) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehtRk-0003Yt-Dc for qemu-devel@nongnu.org; Sat, 03 Feb 2018 03:45:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ehtRh-0003nX-C1 for qemu-devel@nongnu.org; Sat, 03 Feb 2018 03:45:16 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44804) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ehtRh-0003mW-51 for qemu-devel@nongnu.org; Sat, 03 Feb 2018 03:45:13 -0500 From: Markus Armbruster References: <20180202130336.24719-1-armbru@redhat.com> <20180202130336.24719-2-armbru@redhat.com> Date: Sat, 03 Feb 2018 09:45:08 +0100 In-Reply-To: (Eric Blake's message of "Fri, 2 Feb 2018 09:08:40 -0600") Message-ID: <878tca5unf.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH RFC 01/21] qapi: Streamline boilerplate comment generation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: qemu-devel@nongnu.org, marcandre.lureau@redhat.com, mdroth@linux.vnet.ibm.com Eric Blake writes: > On 02/02/2018 07:03 AM, Markus Armbruster wrote: >> Every generator has separate boilerplate for .h and .c, and their >> differences are boring. All of them repeat the license note. >> >> Reduce the repetition as follows. Move common text like the license >> note to common open_output(), next to the existintg common text there. > > s/existintg/existing/ Fixing... >> For each generator, replace the two separate descriptions by a single >> one. >> >> While there, emit an "automatically generated" note into generated >> documentation, too. >> >> Signed-off-by: Markus Armbruster >> --- > >> +++ b/scripts/qapi2texi.py >> @@ -282,7 +282,8 @@ def main(argv): >> print >>sys.stderr, ("%s: need pragma 'doc-required' " >> "to generate documentation" % argv[0]) >> sys.exit(1) >> - print texi_schema(schema) >> + print '@c AUTOMATICALLY GENERATED, DO NOT MODIFY\n' >> + print texi_schema(schema), > > Spurious addition of trailing comma. Otherwise, This is Python's (rather unobvious) way to print without adding a newline. > Reviewed-by: Eric Blake Thanks!