| 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. | 6 # Sets up environment for building Chromium on Android. |
| 7 | 7 |
| 8 # Make sure we're being sourced (possibly by another script). Check for bash | 8 # Make sure we're being sourced (possibly by another script). Check for bash |
| 9 # since zsh sets $0 when sourcing. | 9 # since zsh sets $0 when sourcing. |
| 10 if [[ -n "$BASH_VERSION" && "${BASH_SOURCE:-$0}" == "$0" ]]; then | 10 if [[ -n "$BASH_VERSION" && "${BASH_SOURCE:-$0}" == "$0" ]]; then |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 # everyone to set use_goma in GYP_DEFINES instead of a GOMA_DIR env var. | 80 # everyone to set use_goma in GYP_DEFINES instead of a GOMA_DIR env var. |
| 81 if [[ -d $GOMA_DIR ]]; then | 81 if [[ -d $GOMA_DIR ]]; then |
| 82 DEFINES+=" use_goma=1 gomadir=$GOMA_DIR" | 82 DEFINES+=" use_goma=1 gomadir=$GOMA_DIR" |
| 83 fi | 83 fi |
| 84 | 84 |
| 85 export GYP_DEFINES="${DEFINES}" | 85 export GYP_DEFINES="${DEFINES}" |
| 86 | 86 |
| 87 # Source a bunch of helper functions | 87 # Source a bunch of helper functions |
| 88 . ${CHROME_SRC}/build/android/adb_device_functions.sh | 88 . ${CHROME_SRC}/build/android/adb_device_functions.sh |
| 89 | 89 |
| 90 # Declare Android are cross compile. | |
| 91 export GYP_CROSSCOMPILE=1 | |
| 92 | |
| 93 # Performs a gyp_chromium run to convert gyp->Makefile for android code. | 90 # Performs a gyp_chromium run to convert gyp->Makefile for android code. |
| 94 android_gyp() { | 91 android_gyp() { |
| 95 # This is just a simple wrapper of gyp_chromium, please don't add anything | 92 # This is just a simple wrapper of gyp_chromium, please don't add anything |
| 96 # in this function. | 93 # in this function. |
| 97 ( | 94 "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" --check "$@" |
| 98 "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" --check "$@" | |
| 99 ) | |
| 100 } | 95 } |
| OLD | NEW |