OLD | NEW |
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 # Defines functions for envsetup.sh which sets up environment for building | 7 # Defines functions for envsetup.sh which sets up environment for building |
8 # Chromium on Android. The build can be either use the Android NDK/SDK or | 8 # Chromium on Android. The build can be either use the Android NDK/SDK or |
9 # android source tree. Each has a unique init function which calls functions | 9 # android source tree. Each has a unique init function which calls functions |
10 # prefixed with "common_" that is common for both environment setups. | 10 # prefixed with "common_" that is common for both environment setups. |
11 | 11 |
12 ################################################################################ | 12 ################################################################################ |
13 # Exports environment variables common to both sdk and non-sdk build (e.g. PATH) | 13 # Exports environment variables common to both sdk and non-sdk build (e.g. PATH) |
14 # based on CHROME_SRC, along with DEFINES for GYP_DEFINES. | 14 # based on CHROME_SRC, along with DEFINES for GYP_DEFINES. |
15 ################################################################################ | 15 ################################################################################ |
16 common_vars_defines() { | 16 common_vars_defines() { |
17 # Add Android SDK tools to system path. | 17 # Add Android SDK tools to system path. |
18 export PATH=$PATH:${ANDROID_SDK_ROOT}/tools | 18 export PATH=$PATH:${ANDROID_SDK_ROOT}/tools |
19 export PATH=$PATH:${ANDROID_SDK_ROOT}/platform-tools | 19 export PATH=$PATH:${ANDROID_SDK_ROOT}/platform-tools |
20 export PATH=$PATH:${ANDROID_SDK_ROOT}/build-tools/\ | |
21 ${ANDROID_SDK_BUILD_TOOLS_VERSION} | |
22 | 20 |
23 # Add Chromium Android development scripts to system path. | 21 # Add Chromium Android development scripts to system path. |
24 # Must be after CHROME_SRC is set. | 22 # Must be after CHROME_SRC is set. |
25 export PATH=$PATH:${CHROME_SRC}/build/android | 23 export PATH=$PATH:${CHROME_SRC}/build/android |
26 | 24 |
27 # The set of GYP_DEFINES to pass to gyp. | 25 # The set of GYP_DEFINES to pass to gyp. |
28 DEFINES="OS=android" | 26 DEFINES="OS=android" |
29 | 27 |
30 if [[ -n "$CHROME_ANDROID_OFFICIAL_BUILD" ]]; then | 28 if [[ -n "$CHROME_ANDROID_OFFICIAL_BUILD" ]]; then |
31 # These defines are used by various chrome build scripts to tag the binary's | 29 # These defines are used by various chrome build scripts to tag the binary's |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 DEFINES+=" android_sdk_root=\$(PWD)/${ANDROID_SDK}" | 167 DEFINES+=" android_sdk_root=\$(PWD)/${ANDROID_SDK}" |
170 DEFINES+=" android_sdk_tools=\$(PWD)/${ANDROID_SDK_TOOLS}" | 168 DEFINES+=" android_sdk_tools=\$(PWD)/${ANDROID_SDK_TOOLS}" |
171 DEFINES+=" android_sdk_version=${android_sdk_version}" | 169 DEFINES+=" android_sdk_version=${android_sdk_version}" |
172 DEFINES+=" android_toolchain=${ANDROID_TOOLCHAIN}" | 170 DEFINES+=" android_toolchain=${ANDROID_TOOLCHAIN}" |
173 if [[ -n "$CHROME_ANDROID_WEBVIEW_OFFICIAL_BUILD" ]]; then | 171 if [[ -n "$CHROME_ANDROID_WEBVIEW_OFFICIAL_BUILD" ]]; then |
174 DEFINES+=" logging_like_official_build=1" | 172 DEFINES+=" logging_like_official_build=1" |
175 DEFINES+=" tracing_like_official_build=1" | 173 DEFINES+=" tracing_like_official_build=1" |
176 fi | 174 fi |
177 export GYP_DEFINES="${DEFINES}" | 175 export GYP_DEFINES="${DEFINES}" |
178 } | 176 } |
OLD | NEW |