| 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. |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 DEFINES+=" -Ddisable_nacl=1" | 137 DEFINES+=" -Ddisable_nacl=1" |
| 138 } | 138 } |
| 139 | 139 |
| 140 | 140 |
| 141 ################################################################################ | 141 ################################################################################ |
| 142 # Exports common GYP variables based on variable DEFINES and CHROME_SRC. | 142 # Exports common GYP variables based on variable DEFINES and CHROME_SRC. |
| 143 ################################################################################ | 143 ################################################################################ |
| 144 common_gyp_vars() { | 144 common_gyp_vars() { |
| 145 export GYP_DEFINES="${DEFINES}" | 145 export GYP_DEFINES="${DEFINES}" |
| 146 | 146 |
| 147 # Set GYP_GENERATORS to ninja if it's currently unset or null. | |
| 148 if [ -z "$GYP_GENERATORS" ]; then | |
| 149 echo "Defaulting GYP_GENERATORS to ninja." | |
| 150 GYP_GENERATORS=ninja | |
| 151 elif [ "$GYP_GENERATORS" != "ninja" ]; then | |
| 152 echo "Warning: GYP_GENERATORS set to '$GYP_GENERATORS'." | |
| 153 echo "Only GYP_GENERATORS=ninja has continuous coverage." | |
| 154 fi | |
| 155 export GYP_GENERATORS | |
| 156 | |
| 157 # Use our All target as the default | 147 # Use our All target as the default |
| 158 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" | 148 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" |
| 159 | 149 |
| 160 # We want to use our version of "all" targets. | 150 # We want to use our version of "all" targets. |
| 161 export CHROMIUM_GYP_FILE="${CHROME_SRC}/build/all_android.gyp" | 151 export CHROMIUM_GYP_FILE="${CHROME_SRC}/build/all_android.gyp" |
| 162 } | 152 } |
| 163 | 153 |
| 164 | 154 |
| 165 ################################################################################ | 155 ################################################################################ |
| 166 # Prints out help message on usage. | 156 # Prints out help message on usage. |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 export GYP_DEFINES="${DEFINES}" | 317 export GYP_DEFINES="${DEFINES}" |
| 328 | 318 |
| 329 export GYP_GENERATORS="android" | 319 export GYP_GENERATORS="android" |
| 330 | 320 |
| 331 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" | 321 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" |
| 332 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" | 322 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" |
| 333 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} auto_regeneration=0" | 323 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} auto_regeneration=0" |
| 334 | 324 |
| 335 export CHROMIUM_GYP_FILE="${CHROME_SRC}/android_webview/all_webview.gyp" | 325 export CHROMIUM_GYP_FILE="${CHROME_SRC}/android_webview/all_webview.gyp" |
| 336 } | 326 } |
| OLD | NEW |