diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-02-27 18:58:51 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-02-27 18:58:51 +0000 |
commit | 64ca10287a6191dbb6835bb0583a6d1fbe684650 (patch) | |
tree | 3b64cb5d056d60199b733d1ad0e447e3af431f8b | |
parent | 2b3a204bf68c9e41e62e0f2db5dfe263ea811424 (diff) |
Use chromium's gyp if third_party is not available.
This is for building Android.mk inside an Android tree where there
is no third_party directory.
R=djsollen@google.com, epoger@google.com
Author: scroggo@google.com
Review URL: https://codereview.chromium.org/177073022
git-svn-id: http://skia.googlecode.com/svn/trunk@13614 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | platform_tools/android/bin/android_framework_gyp.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/platform_tools/android/bin/android_framework_gyp.py b/platform_tools/android/bin/android_framework_gyp.py index 7654492f07..5d5befc084 100644 --- a/platform_tools/android/bin/android_framework_gyp.py +++ b/platform_tools/android/bin/android_framework_gyp.py @@ -19,11 +19,19 @@ SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__)) # (specifically, it is in platform_tools/android/bin). SKIA_DIR = os.path.normpath(os.path.join(SCRIPT_DIR, os.pardir, os.pardir, os.pardir)) -dir_contents = os.listdir(SKIA_DIR) -assert 'third_party' in dir_contents and 'gyp' in dir_contents +DIR_CONTENTS = os.listdir(SKIA_DIR) +assert 'gyp' in DIR_CONTENTS # Directory within which we can find the gyp source. -GYP_SOURCE_DIR = os.path.join(SKIA_DIR, 'third_party', 'externals', 'gyp') +if 'third_party' in DIR_CONTENTS: + GYP_SOURCE_DIR = os.path.join(SKIA_DIR, 'third_party', 'externals', 'gyp') +else: + # In an Android tree, there is no third_party/externals/gyp, which would + # require running gclient sync. Use chromium's instead. + GYP_SOURCE_DIR = os.path.join(SKIA_DIR, os.pardir, 'chromium_org', 'tools', + 'gyp') + +assert os.path.exists(GYP_SOURCE_DIR) # Ensure we import our current gyp source's module, not any version # pre-installed in your PYTHONPATH. |