[glib] glib-genmarshal/glib-mkenums: Add comment clarifying licensing
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] glib-genmarshal/glib-mkenums: Add comment clarifying licensing
- Date: Wed, 25 Oct 2017 11:39:42 +0000 (UTC)
commit 9a319a126eb81d835e8c459ba3498a343045aa4a
Author: Philip Withnall <withnall endlessm com>
Date: Thu Oct 19 10:16:51 2017 +0100
glib-genmarshal/glib-mkenums: Add comment clarifying licensing
Clarify the licensing of the code generated by the two scripts in a
comment in the header of each generated file. The intention is that the
license of GLib does *not* apply to the generated files; but that they
are subject to the linking restrictions of the LGPL, since they link to
GLib and GLib is licensed under the LGPL. The generated files themselves
are under the license of whatever project they’re generated for.
Signed-off-by: Philip Withnall <withnall endlessm com>
https://bugzilla.gnome.org/show_bug.cgi?id=788990
gobject/glib-genmarshal.in | 12 +++++++++++-
gobject/glib-mkenums.in | 7 ++++++-
2 files changed, 17 insertions(+), 2 deletions(-)
---
diff --git a/gobject/glib-genmarshal.in b/gobject/glib-genmarshal.in
index 09e8408..2560f9f 100755
--- a/gobject/glib-genmarshal.in
+++ b/gobject/glib-genmarshal.in
@@ -162,9 +162,17 @@ def print_info(msg):
print_color(msg, color=Color.GREEN, prefix='INFO')
+def generate_licensing_comment(outfile):
+ outfile.write('/* This file is generated by glib-genmarshal, do not '
+ 'modify it. This code is licensed under the same license as '
+ 'the containing project. Note that it links to GLib, so '
+ 'must comply with the LGPL linking clauses. */\n')
+
+
def generate_header_preamble(outfile, prefix='', std_includes=True, use_pragma=False):
'''Generate the preamble for the marshallers header file'''
- outfile.write('/* This file is generated, all changes will be lost */\n')
+ generate_licensing_comment(outfile)
+
if use_pragma:
outfile.write('#pragma once\n')
outfile.write('\n')
@@ -193,6 +201,8 @@ def generate_header_postamble(outfile, prefix='', use_pragma=False):
def generate_body_preamble(outfile, std_includes=True, include_headers=None, cpp_defines=None,
cpp_undefines=None):
'''Generate the preamble for the marshallers source file'''
+ generate_licensing_comment(outfile)
+
for header in (include_headers or []):
outfile.write('#include "{}"\n'.format(header))
if include_headers:
diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in
index 1e45652..2d6a8c8 100755
--- a/gobject/glib-mkenums.in
+++ b/gobject/glib-mkenums.in
@@ -381,7 +381,12 @@ else:
tmpfile = None
# put auto-generation comment
-comment = comment_tmpl.replace('\u0040comment\u0040', 'Generated data (by glib-mkenums)')
+comment = comment_tmpl.replace('\u0040comment\u0040',
+ 'This file is generated by glib-mkenums, do '
+ 'not modify it. This code is licensed under '
+ 'the same license as the containing project. '
+ 'Note that it links to GLib, so must comply '
+ 'with the LGPL linking clauses.')
write_output("\n" + comment + '\n')
def replace_specials(prod):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]