Index: build/android/envsetup_functions.sh |
diff --git a/build/android/envsetup_functions.sh b/build/android/envsetup_functions.sh |
index 7c7557aa5a44ab850dcc9cd9f22a7f6b977c37c3..5ad34b7b8e6d81fdc99bb53fd8615a7296fd3fec 100755 |
--- a/build/android/envsetup_functions.sh |
+++ b/build/android/envsetup_functions.sh |
@@ -270,10 +270,20 @@ ${ANDROID_SDK_VERSION} |
ANDROID_SDK=$(python -c \ |
"import os.path; print os.path.relpath('${ANDROID_SDK_ROOT}', \ |
'${ANDROID_BUILD_TOP}')") |
- ANDROID_SDK_TOOLS=$(python -c \ |
- "import os.path; \ |
- print os.path.relpath('${ANDROID_SDK_ROOT}/../tools/linux', \ |
- '${ANDROID_BUILD_TOP}')") |
+ case "${host_os}" in |
+ "linux") |
+ ANDROID_SDK_TOOLS=$(python -c \ |
+ "import os.path; \ |
+ print os.path.relpath('${ANDROID_SDK_ROOT}/../tools/linux', \ |
+ '${ANDROID_BUILD_TOP}')") |
+ ;; |
+ "mac") |
+ ANDROID_SDK_TOOLS=$(python -c \ |
+ "import os.path; \ |
+ print os.path.relpath('${ANDROID_SDK_ROOT}/../tools/darwin', \ |
+ '${ANDROID_BUILD_TOP}')") |
+ ;; |
+ esac |
DEFINES+=" android_build_type=1" |
DEFINES+=" android_src=\$(GYP_ABS_ANDROID_TOP_DIR)" |
DEFINES+=" android_sdk=\$(GYP_ABS_ANDROID_TOP_DIR)/${ANDROID_SDK}" |