OLD | NEW |
---|---|
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # Sets up environment for building Chromium on Android. It can either be | 5 # 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 | 6 # compiled with the Android tree or using the Android SDK/NDK. To build with |
7 # NDK/SDK: ". build/android/envsetup.sh". Environment variable | 7 # 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 | 8 # ANDROID_SDK_BUILD=1 will then be defined and used in the rest of the setup to |
9 # specifiy build type. | 9 # specifiy build type. |
10 | 10 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
106 | 106 |
107 java -version 2>&1 | grep -qs "Java HotSpot" | 107 java -version 2>&1 | grep -qs "Java HotSpot" |
108 if [ $? -ne 0 ]; then | 108 if [ $? -ne 0 ]; then |
109 echo "Please check and make sure you are using the Oracle Java SDK, and it" | 109 echo "Please check and make sure you are using the Oracle Java SDK, and it" |
110 echo "appears before other Java SDKs in your path." | 110 echo "appears before other Java SDKs in your path." |
111 echo "Refer to the \"Install prerequisites\" section here:" | 111 echo "Refer to the \"Install prerequisites\" section here:" |
112 echo "https://code.google.com/p/chromium/wiki/AndroidBuildInstructions" | 112 echo "https://code.google.com/p/chromium/wiki/AndroidBuildInstructions" |
113 return 1 | 113 return 1 |
114 fi | 114 fi |
115 | 115 |
116 if [[ ! -z "$JAVA_HOME" && -e "$JAVA_HOME/bin/java" ]]; then | |
Lei Zhang
2013/02/14 20:00:07
! -z ---> -n
-e ---> -x
bsalomon
2013/02/14 20:11:19
Done.
| |
117 "$JAVA_HOME/bin/java" -version 2>&1 | grep -qs "Java HotSpot" | |
118 if [ $? -ne 0 ]; then | |
119 echo "If JAVA_HOME is defined then it must refer to the install location" | |
120 echo "of the Oracle Java SDK." | |
121 echo "Refer to the \"Install prerequisites\" section here:" | |
122 echo "https://code.google.com/p/chromium/wiki/AndroidBuildInstructions" | |
123 return 1 | |
124 fi | |
125 fi | |
126 | |
116 # Workaround for valgrind build | 127 # Workaround for valgrind build |
117 if [[ -n "$CHROME_ANDROID_VALGRIND_BUILD" ]]; then | 128 if [[ -n "$CHROME_ANDROID_VALGRIND_BUILD" ]]; then |
118 # arm_thumb=0 is a workaround for https://bugs.kde.org/show_bug.cgi?id=270709 | 129 # arm_thumb=0 is a workaround for https://bugs.kde.org/show_bug.cgi?id=270709 |
119 DEFINES+=" arm_thumb=0 release_extra_cflags='-fno-inline\ | 130 DEFINES+=" arm_thumb=0 release_extra_cflags='-fno-inline\ |
120 -fno-omit-frame-pointer -fno-builtin' release_valgrind_build=1\ | 131 -fno-omit-frame-pointer -fno-builtin' release_valgrind_build=1\ |
121 release_optimize=1" | 132 release_optimize=1" |
122 fi | 133 fi |
123 | 134 |
124 # Source a bunch of helper functions | 135 # Source a bunch of helper functions |
125 . ${CHROME_SRC}/build/android/adb_device_functions.sh | 136 . ${CHROME_SRC}/build/android/adb_device_functions.sh |
(...skipping 12 matching lines...) Expand all Loading... | |
138 # This is just a simple wrapper of gyp_chromium, please don't add anything | 149 # This is just a simple wrapper of gyp_chromium, please don't add anything |
139 # in this function. | 150 # in this function. |
140 echo "GYP_GENERATORS set to '$GYP_GENERATORS'" | 151 echo "GYP_GENERATORS set to '$GYP_GENERATORS'" |
141 ( | 152 ( |
142 "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" --check "$@" | 153 "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" --check "$@" |
143 ) | 154 ) |
144 } | 155 } |
145 | 156 |
146 # FLOCK needs to be null on system that has no flock | 157 # FLOCK needs to be null on system that has no flock |
147 which flock > /dev/null || export FLOCK= | 158 which flock > /dev/null || export FLOCK= |
OLD | NEW |