OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 # Sets up environment for building Chromium on Android. It can either be | 6 # Sets up environment for building Chromium on Android. It can either be |
7 # compiled with the Android tree or using the Android SDK/NDK. To build with | 7 # compiled with the Android tree or using the Android SDK/NDK. To build with |
8 # NDK/SDK: ". build/android/envsetup.sh". Environment variable | 8 # NDK/SDK: ". build/android/envsetup.sh". Environment variable |
9 # ANDROID_SDK_BUILD=1 will then be defined and used in the rest of the setup to | 9 # ANDROID_SDK_BUILD=1 will then be defined and used in the rest of the setup to |
10 # specifiy build type. | 10 # specifiy build type. |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 if [[ "${CURRENT_DIR/"${CHROME_SRC}"/}" == "${CURRENT_DIR}" ]]; then | 81 if [[ "${CURRENT_DIR/"${CHROME_SRC}"/}" == "${CURRENT_DIR}" ]]; then |
82 # If current directory is not in $CHROME_SRC, it might be set for other | 82 # If current directory is not in $CHROME_SRC, it might be set for other |
83 # source tree. If $CHROME_SRC was set correctly and we are in the correct | 83 # source tree. If $CHROME_SRC was set correctly and we are in the correct |
84 # directory, "${CURRENT_DIR/"${CHROME_SRC}"/}" will be "". | 84 # directory, "${CURRENT_DIR/"${CHROME_SRC}"/}" will be "". |
85 # Otherwise, it will equal to "${CURRENT_DIR}" | 85 # Otherwise, it will equal to "${CURRENT_DIR}" |
86 echo "Warning: Current directory is out of CHROME_SRC, it may not be \ | 86 echo "Warning: Current directory is out of CHROME_SRC, it may not be \ |
87 the one you want." | 87 the one you want." |
88 echo "${CHROME_SRC}" | 88 echo "${CHROME_SRC}" |
89 fi | 89 fi |
90 | 90 |
91 # Android sdk platform version to use | |
92 export ANDROID_SDK_VERSION=17 | |
93 | |
94 if [[ "${ANDROID_SDK_BUILD}" -eq 1 ]]; then | 91 if [[ "${ANDROID_SDK_BUILD}" -eq 1 ]]; then |
95 if [[ -z "${TARGET_ARCH}" ]]; then | 92 if [[ -z "${TARGET_ARCH}" ]]; then |
96 return 1 | 93 return 1 |
97 fi | 94 fi |
98 sdk_build_init | 95 sdk_build_init |
99 # Sets up environment for building Chromium for Android with source. Expects | 96 # Sets up environment for building Chromium for Android with source. Expects |
100 # android environment setup and lunch. | 97 # android environment setup and lunch. |
101 elif [[ -z "$ANDROID_BUILD_TOP" || \ | 98 elif [[ -z "$ANDROID_BUILD_TOP" || \ |
102 -z "$ANDROID_TOOLCHAIN" || \ | 99 -z "$ANDROID_TOOLCHAIN" || \ |
103 -z "$ANDROID_PRODUCT_OUT" ]]; then | 100 -z "$ANDROID_PRODUCT_OUT" ]]; then |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 # This is just a simple wrapper of gyp_chromium, please don't add anything | 154 # This is just a simple wrapper of gyp_chromium, please don't add anything |
158 # in this function. | 155 # in this function. |
159 echo "GYP_GENERATORS set to '$GYP_GENERATORS'" | 156 echo "GYP_GENERATORS set to '$GYP_GENERATORS'" |
160 ( | 157 ( |
161 "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" --check "$@" | 158 "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" --check "$@" |
162 ) | 159 ) |
163 } | 160 } |
164 | 161 |
165 # FLOCK needs to be null on system that has no flock | 162 # FLOCK needs to be null on system that has no flock |
166 which flock > /dev/null || export FLOCK= | 163 which flock > /dev/null || export FLOCK= |
OLD | NEW |