aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorOskari Timperi <oskari.timperi@iki.fi>2017-02-15 23:01:24 +0200
committerOskari Timperi <oskari.timperi@iki.fi>2017-02-15 23:01:24 +0200
commitc6e27cad4609affaf83ed3916c522195e1e0bba5 (patch)
tree9c02c1bf16b879343da7394257a884c235bc231e /tools
parent7a87b3b724e8580195bd35e3654f8f4a2f45ed3c (diff)
downloadmqtt-c6e27cad4609affaf83ed3916c522195e1e0bba5.tar.gz
mqtt-c6e27cad4609affaf83ed3916c522195e1e0bba5.zip
Include the license text in the amalgamation
Diffstat (limited to 'tools')
-rw-r--r--tools/amalgamate.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/amalgamate.py b/tools/amalgamate.py
index f3fd6ba..245143f 100644
--- a/tools/amalgamate.py
+++ b/tools/amalgamate.py
@@ -84,9 +84,18 @@ def write_file(output, srcfilename):
output.write(read_file(srcfilename))
+def generate_license_comment():
+ fn = os.path.join(this_dir, '..', 'COPYING')
+ with open(fn, 'r') as fp:
+ license = fp.read()
+ return "/*\n" + license + "*/"
+
output_filename = sys.argv[1]
with open(output_filename, 'w') as out:
+ out.write(generate_license_comment())
+ out.write("\n")
+
for source in sources:
path = os.path.join(src_dir, source)