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 # Sets up environment for building Chromium on Android. It can either be | 7 # Sets up environment for building Chromium on Android. It can either be |
8 # compiled with the Android tree or using the Android SDK/NDK. To build with | 8 # compiled with the Android tree or using the Android SDK/NDK. To build with |
9 # NDK/SDK: ". build/android/envsetup.sh --sdk". Environment variable | 9 # NDK/SDK: ". build/android/envsetup.sh --sdk". Environment variable |
10 # ANDROID_SDK_BUILD=1 will then be defined and used in the rest of the setup to | 10 # ANDROID_SDK_BUILD=1 will then be defined and used in the rest of the setup to |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 if [ "${CURRENT_DIR/"${CHROME_SRC}"/}" == "${CURRENT_DIR}" ]; then | 48 if [ "${CURRENT_DIR/"${CHROME_SRC}"/}" == "${CURRENT_DIR}" ]; then |
49 # If current directory is not in $CHROME_SRC, it might be set for other | 49 # If current directory is not in $CHROME_SRC, it might be set for other |
50 # source tree. If $CHROME_SRC was set correctly and we are in the correct | 50 # source tree. If $CHROME_SRC was set correctly and we are in the correct |
51 # directory, "${CURRENT_DIR/"${CHROME_SRC}"/}" will be "". | 51 # directory, "${CURRENT_DIR/"${CHROME_SRC}"/}" will be "". |
52 # Otherwise, it will equal to "${CURRENT_DIR}" | 52 # Otherwise, it will equal to "${CURRENT_DIR}" |
53 echo "Warning: Current directory is out of CHROME_SRC, it may not be \ | 53 echo "Warning: Current directory is out of CHROME_SRC, it may not be \ |
54 the one you want." | 54 the one you want." |
55 echo "${CHROME_SRC}" | 55 echo "${CHROME_SRC}" |
56 fi | 56 fi |
57 | 57 |
| 58 # Android sdk platform version to use |
| 59 export ANDROID_SDK_VERSION=16 |
| 60 |
58 # Source functions script. The file is in the same directory as this script. | 61 # Source functions script. The file is in the same directory as this script. |
59 . "$(dirname $BASH_SOURCE)"/envsetup_functions.sh | 62 . "$(dirname $BASH_SOURCE)"/envsetup_functions.sh |
60 | 63 |
61 if [ "${ANDROID_SDK_BUILD}" -eq 1 ]; then | 64 if [ "${ANDROID_SDK_BUILD}" -eq 1 ]; then |
62 sdk_build_init | 65 sdk_build_init |
63 # Sets up environment for building Chromium for Android with source. Expects | 66 # Sets up environment for building Chromium for Android with source. Expects |
64 # android environment setup and lunch. | 67 # android environment setup and lunch. |
65 elif [ -z "$ANDROID_BUILD_TOP" -o -z "$ANDROID_TOOLCHAIN" -o \ | 68 elif [ -z "$ANDROID_BUILD_TOP" -o -z "$ANDROID_TOOLCHAIN" -o \ |
66 -z "$ANDROID_PRODUCT_OUT" ]; then | 69 -z "$ANDROID_PRODUCT_OUT" ]; then |
67 echo "Android build environment variables must be set." | 70 echo "Android build environment variables must be set." |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 if [[ $GYP_DEFINES =~ "clang=1" ]]; then | 106 if [[ $GYP_DEFINES =~ "clang=1" ]]; then |
104 echo -n "NOTE: You have \`clang=1' in \$GYP_DEFINES; " | 107 echo -n "NOTE: You have \`clang=1' in \$GYP_DEFINES; " |
105 echo "did you mean to run \`android_clang_gyp'?" | 108 echo "did you mean to run \`android_clang_gyp'?" |
106 fi | 109 fi |
107 | 110 |
108 "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" --check "$@" | 111 "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" --check "$@" |
109 } | 112 } |
110 | 113 |
111 # FLOCK needs to be null on system that has no flock | 114 # FLOCK needs to be null on system that has no flock |
112 which flock > /dev/null || export FLOCK= | 115 which flock > /dev/null || export FLOCK= |
OLD | NEW |