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

Side by Side Diff: build/android/envsetup.sh

Issue 10700141: Canonicalize CHROME_SRC variable on Android (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # Sets up environment for building Chromium on Android. Only Android NDK, 7 # Sets up environment for building Chromium on Android. Only Android NDK,
8 # Revision 6b on Linux or Mac is offically supported. 8 # Revision 6b on Linux or Mac is offically supported.
9 # 9 #
10 # To run this script, the system environment ANDROID_NDK_ROOT must be set 10 # To run this script, the system environment ANDROID_NDK_ROOT must be set
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 # Needed by android antfiles when creating apks. 84 # Needed by android antfiles when creating apks.
85 export ANDROID_SDK_HOME=${ANDROID_SDK_ROOT} 85 export ANDROID_SDK_HOME=${ANDROID_SDK_ROOT}
86 86
87 # Add Android SDK/NDK tools to system path. 87 # Add Android SDK/NDK tools to system path.
88 export PATH=$PATH:${ANDROID_NDK_ROOT} 88 export PATH=$PATH:${ANDROID_NDK_ROOT}
89 export PATH=$PATH:${ANDROID_SDK_ROOT}/tools 89 export PATH=$PATH:${ANDROID_SDK_ROOT}/tools
90 export PATH=$PATH:${ANDROID_SDK_ROOT}/platform-tools 90 export PATH=$PATH:${ANDROID_SDK_ROOT}/platform-tools
91 # Must have tools like arm-linux-androideabi-gcc on the path for ninja 91 # Must have tools like arm-linux-androideabi-gcc on the path for ninja
92 export PATH=$PATH:${ANDROID_TOOLCHAIN} 92 export PATH=$PATH:${ANDROID_TOOLCHAIN}
93 93
94 CURRENT_DIR="$(readlink -f ${PWD})"
94 if [ -z "${CHROME_SRC}" ]; then 95 if [ -z "${CHROME_SRC}" ]; then
95 # If $CHROME_SRC was not set, assume current directory is CHROME_SRC. 96 # If $CHROME_SRC was not set, assume current directory is CHROME_SRC.
96 export CHROME_SRC="${PWD}" 97 export CHROME_SRC="${CURRENT_DIR}"
97 fi 98 fi
98 99
99 if [ "${PWD/"${CHROME_SRC}"/}" == "${PWD}" ]; then 100 if [ "${CURRENT_DIR/"${CHROME_SRC}"/}" == "${CURRENT_DIR}" ]; then
100 # If current directory is not in $CHROME_SRC, it might be set for other 101 # If current directory is not in $CHROME_SRC, it might be set for other
101 # source tree. If $CHROME_SRC was set correctly and we are in the correct 102 # source tree. If $CHROME_SRC was set correctly and we are in the correct
102 # directory, "${PWD/"${CHROME_SRC}"/}" will be "". 103 # directory, "${CURRENT_DIR/"${CHROME_SRC}"/}" will be "".
103 # Otherwise, it will equal to "${PWD}" 104 # Otherwise, it will equal to "${CURRENT_DIR}"
104 echo "Warning: Current directory is out of CHROME_SRC, it may not be \ 105 echo "Warning: Current directory is out of CHROME_SRC, it may not be \
105 the one you want." 106 the one you want."
106 echo "${CHROME_SRC}" 107 echo "${CHROME_SRC}"
107 fi 108 fi
108 109
109 if [ ! -d "${CHROME_SRC}" ]; then 110 if [ ! -d "${CHROME_SRC}" ]; then
110 echo "CHROME_SRC must be set to the path of Chrome source code." >& 2 111 echo "CHROME_SRC must be set to the path of Chrome source code." >& 2
111 return 1 112 return 1
112 fi 113 fi
113 114
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 export GYP_DEFINES="${DEFINES}" 158 export GYP_DEFINES="${DEFINES}"
158 159
159 # Use the "android" flavor of the Makefile generator for both Linux and OS X. 160 # Use the "android" flavor of the Makefile generator for both Linux and OS X.
160 export GYP_GENERATORS="make-android" 161 export GYP_GENERATORS="make-android"
161 162
162 # Use our All target as the default 163 # Use our All target as the default
163 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" 164 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All"
164 165
165 # We want to use our version of "all" targets. 166 # We want to use our version of "all" targets.
166 export CHROMIUM_GYP_FILE="${CHROME_SRC}/build/all_android.gyp" 167 export CHROMIUM_GYP_FILE="${CHROME_SRC}/build/all_android.gyp"
OLDNEW
« 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