| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 | 2 |
| 3 # Copyright 2014 Google Inc. | 3 # Copyright 2014 Google Inc. |
| 4 # | 4 # |
| 5 # Use of this source code is governed by a BSD-style license that can be | 5 # Use of this source code is governed by a BSD-style license that can be |
| 6 # found in the LICENSE file. | 6 # found in the LICENSE file. |
| 7 | 7 |
| 8 """ | 8 """ |
| 9 Script for generating the Android framework's version of Skia from gyp | 9 Script for generating the Android framework's version of Skia from gyp |
| 10 files. | 10 files. |
| 11 """ | 11 """ |
| 12 | 12 |
| 13 import argparse |
| 13 import os | 14 import os |
| 14 import shutil | 15 import shutil |
| 15 import sys | 16 import sys |
| 16 import tempfile | 17 import tempfile |
| 17 | 18 |
| 18 # Find the top of trunk | 19 # Find the top of trunk |
| 19 SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__)) | 20 SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__)) |
| 20 SKIA_DIR = os.path.normpath(os.path.join(SCRIPT_DIR, os.pardir, os.pardir, | 21 SKIA_DIR = os.path.normpath(os.path.join(SCRIPT_DIR, os.pardir, os.pardir, |
| 21 os.pardir)) | 22 os.pardir)) |
| 22 | 23 |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 deviations_from_common.append(makefile_writer.VarsDictData(arm64_var_dict, | 191 deviations_from_common.append(makefile_writer.VarsDictData(arm64_var_dict, |
| 191 'arm64')) | 192 'arm64')) |
| 192 | 193 |
| 193 makefile_writer.write_android_mk(target_dir=target_dir, | 194 makefile_writer.write_android_mk(target_dir=target_dir, |
| 194 common=common, deviations_from_common=deviations_from_common) | 195 common=common, deviations_from_common=deviations_from_common) |
| 195 | 196 |
| 196 finally: | 197 finally: |
| 197 shutil.rmtree(tmp_folder) | 198 shutil.rmtree(tmp_folder) |
| 198 | 199 |
| 199 if __name__ == '__main__': | 200 if __name__ == '__main__': |
| 200 main() | 201 parser = argparse.ArgumentParser() |
| 202 parser.add_argument('--gyp_source_dir', help='Source of gyp program. ' |
| 203 'e.g. <path_to_skia>/third_party/externals/gyp') |
| 204 args = parser.parse_args() |
| 205 |
| 206 main(gyp_source_dir=args.gyp_source_dir) |
| OLD | NEW |