diff options
author | Dan Albert <danalbert@google.com> | 2016-01-08 13:14:27 -0800 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2016-01-08 13:45:37 -0800 |
commit | b45dd8623006e218761be66fbd5475630a4540c6 (patch) | |
tree | 64adf6cbac166ac8982da1aa7bd3d1cd3cec6062 /checkbuild.py | |
parent | b4b4d8d4b89f4f982c4e9f7d1093fd3c879da2c7 (diff) | |
download | ndk-b45dd8623006e218761be66fbd5475630a4540c6.tar.gz |
Merge all the host-tools licenses into one NOTICE.
Bug: http://b/25592257
Change-Id: Iaedd5702c96f7e16395f97459e77247821b36967
Diffstat (limited to 'checkbuild.py')
-rw-r--r-- | checkbuild.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/checkbuild.py b/checkbuild.py index 5bc7372de..c2679ab7f 100644 --- a/checkbuild.py +++ b/checkbuild.py @@ -375,6 +375,16 @@ def build_host_tools(out_dir, args): package_host_tools(out_dir, args.system) +def merge_license_files(output_path, files): + licenses = [] + for license_path in files: + with open(license_path) as license_file: + licenses.append(license_file.read()) + + with open(output_path, 'w') as output_file: + output_file.write('\n'.join(licenses)) + + def package_host_tools(out_dir, host): packages = [ 'gdb-multiarch-7.10', @@ -407,6 +417,22 @@ def package_host_tools(out_dir, host): for f in files: shutil.copy2(f, os.path.join(temp_dir, 'host-tools/bin')) + merge_license_files(os.path.join(temp_dir, 'host-tools/NOTICE'), [ + build_support.android_path('toolchain/gdb/gdb-7.10/COPYING'), + build_support.ndk_path('sources/host-tools/nawk-20071023/NOTICE'), + build_support.ndk_path('sources/host-tools/ndk-depends/NOTICE'), + build_support.ndk_path('sources/host-tools/make-3.81/COPYING'), + build_support.android_path( + 'toolchain/python/Python-2.7.5/LICENSE'), + build_support.ndk_path('sources/host-tools/ndk-stack/NOTICE'), + build_support.ndk_path('sources/host-tools/toolbox/NOTICE'), + build_support.android_path('toolchain/yasm/COPYING'), + build_support.android_path('toolchain/yasm/BSD.txt'), + build_support.android_path('toolchain/yasm/Artistic.txt'), + build_support.android_path('toolchain/yasm/GNU_GPL-2.0'), + build_support.android_path('toolchain/yasm/GNU_LGPL-2.0'), + ]) + package_name = 'host-tools-' + host_tag path = os.path.join(temp_dir, 'host-tools') build_support.make_package(package_name, path, out_dir) |