From c6e27cad4609affaf83ed3916c522195e1e0bba5 Mon Sep 17 00:00:00 2001 From: Oskari Timperi Date: Wed, 15 Feb 2017 23:01:24 +0200 Subject: Include the license text in the amalgamation --- tools/amalgamate.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tools') 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) -- cgit v1.2.3