aboutsummaryrefslogtreecommitdiffhomepage
path: root/platform_tools
diff options
context:
space:
mode:
authorGravatar scroggo <scroggo@google.com>2015-01-20 10:39:25 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-01-20 10:39:25 -0800
commit8fd8d38626ebb84d47ed8ba155efecb241fed6dc (patch)
tree603284fed3e416ef15bb494a98fc78cc47659197 /platform_tools
parent211fcc6831e2339c12461fd600a28975210cb4d8 (diff)
Add ability to specify gyp dir to gyp_to_android.
When running gyp_to_android inside a Skia tree, it uses the gyp program in third_party/externals. Inside an Android tree, we need to use a different location for gyp (the Android copy of Skia, in external/skia, does not contain third_party/externals). The bot handles this by importing gyp_to_android and running its main function directly. Add command line arguments so a human can directly run gyp_to_android. Review URL: https://codereview.chromium.org/864503002
Diffstat (limited to 'platform_tools')
-rwxr-xr-xplatform_tools/android/bin/gyp_to_android.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/platform_tools/android/bin/gyp_to_android.py b/platform_tools/android/bin/gyp_to_android.py
index aacbe98a0a..e700f2fd84 100755
--- a/platform_tools/android/bin/gyp_to_android.py
+++ b/platform_tools/android/bin/gyp_to_android.py
@@ -10,6 +10,7 @@ Script for generating the Android framework's version of Skia from gyp
files.
"""
+import argparse
import os
import shutil
import sys
@@ -197,4 +198,9 @@ def main(target_dir=None, require_sk_user_config=False, gyp_source_dir=None):
shutil.rmtree(tmp_folder)
if __name__ == '__main__':
- main()
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--gyp_source_dir', help='Source of gyp program. '
+ 'e.g. <path_to_skia>/third_party/externals/gyp')
+ args = parser.parse_args()
+
+ main(gyp_source_dir=args.gyp_source_dir)