| OLD | NEW |
| 1 #!/bin/bash |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # 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 |
| 3 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 4 | 5 |
| 5 # 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 |
| 6 # 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 |
| 7 # NDK/SDK: ". build/android/envsetup.sh". Environment variable | 8 # NDK/SDK: ". build/android/envsetup.sh". Environment variable |
| 8 # 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 |
| 9 # specifiy build type. | 10 # specifiy build type. |
| 10 | 11 |
| 12 if [ "$_" == "$0" ]; then |
| 13 echo "ERROR: envsetup must be sourced." |
| 14 exit 1 |
| 15 fi |
| 16 |
| 11 # Source functions script. The file is in the same directory as this script. | 17 # Source functions script. The file is in the same directory as this script. |
| 12 . "$(dirname $BASH_SOURCE)"/envsetup_functions.sh | 18 . "$(dirname $BASH_SOURCE)"/envsetup_functions.sh |
| 13 | 19 |
| 14 export ANDROID_SDK_BUILD=1 # Default to SDK build. | 20 export ANDROID_SDK_BUILD=1 # Default to SDK build. |
| 15 | 21 |
| 16 process_options "$@" | 22 process_options "$@" |
| 17 | 23 |
| 18 # When building WebView as part of Android we can't use the SDK. Other builds | 24 # When building WebView as part of Android we can't use the SDK. Other builds |
| 19 # default to using the SDK. | 25 # default to using the SDK. |
| 20 if [[ "${CHROME_ANDROID_BUILD_WEBVIEW}" -eq 1 ]]; then | 26 if [[ "${CHROME_ANDROID_BUILD_WEBVIEW}" -eq 1 ]]; then |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 # This is just a simple wrapper of gyp_chromium, please don't add anything | 155 # This is just a simple wrapper of gyp_chromium, please don't add anything |
| 150 # in this function. | 156 # in this function. |
| 151 echo "GYP_GENERATORS set to '$GYP_GENERATORS'" | 157 echo "GYP_GENERATORS set to '$GYP_GENERATORS'" |
| 152 ( | 158 ( |
| 153 "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" --check "$@" | 159 "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" --check "$@" |
| 154 ) | 160 ) |
| 155 } | 161 } |
| 156 | 162 |
| 157 # FLOCK needs to be null on system that has no flock | 163 # FLOCK needs to be null on system that has no flock |
| 158 which flock > /dev/null || export FLOCK= | 164 which flock > /dev/null || export FLOCK= |
| OLD | NEW |