Be explicit about spice-common license

Use same license as spice-gtk and spice modules (LGPL 2.1) since those licenses
applied to the spice-common submodule in the past.  This makes it more clear
that if you use spice-common separately, the license is still LGPL.  Also
mention license and copyright in generated files.
This commit is contained in:
Jonathon Jongsma 2013-10-22 10:38:48 -05:00
parent f3a47cc903
commit 960a360f8a

View File

@ -80,8 +80,6 @@ def write_enums(writer, describe=False):
writer.writeln("#ifndef _H_SPICE_ENUMS")
writer.writeln("#define _H_SPICE_ENUMS")
writer.newline()
writer.comment("Generated from %s, don't edit" % writer.options["source"]).newline()
writer.newline()
# Define enums
for t in ptypes.get_named_types():
@ -173,10 +171,31 @@ writer = codegen.CodeWriter()
writer.header = codegen.CodeWriter()
writer.set_option("source", os.path.basename(proto_file))
license = """/*
Copyright (C) 2013 Red Hat, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
"""
writer.public_prefix = options.prefix
writer.writeln("/* this is a file autogenerated by spice_codegen.py */")
writer.write(license)
writer.header.writeln("/* this is a file autogenerated by spice_codegen.py */")
writer.header.write(license)
if not options.header and not options.generate_enums:
writer.writeln("#ifdef HAVE_CONFIG_H")
writer.writeln("#include <config.h>")