qapi: Streamline boilerplate comment generation

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 existing common text there.
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 <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20180211093607.27351-3-armbru@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
Markus Armbruster 2018-02-11 10:35:40 +01:00 committed by Eric Blake
parent 0dd13589b0
commit c263de3f41
8 changed files with 36 additions and 126 deletions

View file

@ -283,7 +283,8 @@ def main(argv):
print("%s: need pragma 'doc-required' "
"to generate documentation" % argv[0], file=sys.stderr)
sys.exit(1)
print(texi_schema(schema))
print('@c AUTOMATICALLY GENERATED, DO NOT MODIFY\n')
print(texi_schema(schema), end='')
if __name__ == '__main__':