summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathon Jongsma <jjongsma@redhat.com>2013-10-22 10:38:48 -0500
committerJonathon Jongsma <jjongsma@redhat.com>2013-10-23 11:41:43 -0500
commit960a360f8a577627b9f5a20e3ab9568bd682fea5 (patch)
tree5c32e8b561347a19cb5634b30b166286ec3c90df
parentf3a47cc903a4a0137264431d0ebb4c01f2959969 (diff)
downloadspice-protocol-960a360f8a577627b9f5a20e3ab9568bd682fea5.tar.gz
spice-protocol-960a360f8a577627b9f5a20e3ab9568bd682fea5.tar.xz
spice-protocol-960a360f8a577627b9f5a20e3ab9568bd682fea5.zip
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.
-rwxr-xr-xspice_codegen.py23
1 files changed, 21 insertions, 2 deletions
diff --git a/spice_codegen.py b/spice_codegen.py
index 1cf1697..d35d949 100755
--- a/spice_codegen.py
+++ b/spice_codegen.py
@@ -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>")