Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3257)

Unified Diff: build/android/envsetup_functions.sh

Issue 10829091: Set ANDROID_SDK_ROOT to point to checked in sdk. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/envsetup_functions.sh
diff --git a/build/android/envsetup_functions.sh b/build/android/envsetup_functions.sh
index 2b0350537dd30a4f177b4b893b33738b48f940fd..84c0be5f19a1ac279ee39f226a55300d5b671769 100755
--- a/build/android/envsetup_functions.sh
+++ b/build/android/envsetup_functions.sh
@@ -146,14 +146,16 @@ common_gyp_vars() {
################################################################################
# Initializes environment variables for NDK/SDK build. Only Android NDK Revision
# 7 on Linux or Mac is offically supported. To run this script, the system
-# environment ANDROID_NDK_ROOT must be set to Android NDK's root path as well as
-# ANDROID_SDK_ROOT to the SDK root.
+# environment ANDROID_NDK_ROOT must be set to Android NDK's root path. The
+# ANDROID_SDK_ROOT only needs to be set to override the default SDK which is in
+# the tree under $ROOT/src/third_party/android_tools/sdk.
+# TODO(navabi): Add NDK to $ROOT/src/third_party/android_tools/ndk.
# To build Chromium for Android with NDK/SDK follow the steps below:
# > export ANDROID_NDK_ROOT=<android ndk root>
-# > export ANDROID_SDK_ROOT=<android sdk root>
+# > export ANDROID_SDK_ROOT=<android sdk root> # to override the default sdk
# > . build/android/envsetup.sh --sdk
# > make
-#############################################################################
+################################################################################
sdk_build_init() {
if [ ! -d "${ANDROID_NDK_ROOT}" ]; then
echo "ANDROID_NDK_ROOT must be set to the path of Android NDK." >& 2
@@ -162,11 +164,10 @@ sdk_build_init() {
return 1
fi
+ # If ANDROID_SDK_ROOT is set when envsetup is run, use the sdk pointed to by
+ # the environment variable. Otherwise, use the default sdk from the tree.
if [ ! -d "${ANDROID_SDK_ROOT}" ]; then
- echo "ANDROID_SDK_ROOT must be set to the path of Android SDK." >& 2
- echo "which could be installed by" >& 2
- echo "<chromium_tree>/src/build/install-build-deps-android-sdk.sh" >& 2
- return 1
+ export ANDROID_SDK_ROOT="${CHROME_SRC}/third_party/android_tools/sdk/"
fi
# Makes sure ANDROID_BUILD_TOP is unset if build has option --sdk
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698