Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Side by Side Diff: build/android/envsetup.sh

Issue 159133002: android envsetup: Don't set script-local variable toolchain_dir. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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. It can either be 6 # Sets up environment for building Chromium on Android. It can either be
7 # 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
8 # NDK/SDK: ". build/android/envsetup.sh". Environment variable 8 # NDK/SDK: ". build/android/envsetup.sh". Environment variable
9 # 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
10 # specifiy build type. 10 # specifiy build type.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 i?86) 42 i?86)
43 echo "ERROR: Android build requires a 64-bit host build machine." 43 echo "ERROR: Android build requires a 64-bit host build machine."
44 return 1 44 return 1
45 ;; 45 ;;
46 *) 46 *)
47 echo "ERROR: Unsupported host architecture (${host_arch})." 47 echo "ERROR: Unsupported host architecture (${host_arch})."
48 echo "Try running this script on a Linux/x86_64 machine instead." 48 echo "Try running this script on a Linux/x86_64 machine instead."
49 return 1 49 return 1
50 esac 50 esac
51 51
52 case "${host_os}" in
53 "linux")
54 toolchain_dir="linux-${host_arch}"
55 ;;
56 "mac")
57 toolchain_dir="darwin-${host_arch}"
58 ;;
59 *)
60 echo "Host platform ${host_os} is not supported" >& 2
61 return 1
62 esac
63
64 CURRENT_DIR="$(readlink -f "${SCRIPT_DIR}/../../")" 52 CURRENT_DIR="$(readlink -f "${SCRIPT_DIR}/../../")"
65 if [[ -z "${CHROME_SRC}" ]]; then 53 if [[ -z "${CHROME_SRC}" ]]; then
66 # If $CHROME_SRC was not set, assume current directory is CHROME_SRC. 54 # If $CHROME_SRC was not set, assume current directory is CHROME_SRC.
67 export CHROME_SRC="${CURRENT_DIR}" 55 export CHROME_SRC="${CURRENT_DIR}"
68 fi 56 fi
69 57
70 if [[ "${CURRENT_DIR/"${CHROME_SRC}"/}" == "${CURRENT_DIR}" ]]; then 58 if [[ "${CURRENT_DIR/"${CHROME_SRC}"/}" == "${CURRENT_DIR}" ]]; then
71 # If current directory is not in $CHROME_SRC, it might be set for other 59 # If current directory is not in $CHROME_SRC, it might be set for other
72 # source tree. If $CHROME_SRC was set correctly and we are in the correct 60 # source tree. If $CHROME_SRC was set correctly and we are in the correct
73 # directory, "${CURRENT_DIR/"${CHROME_SRC}"/}" will be "". 61 # directory, "${CURRENT_DIR/"${CHROME_SRC}"/}" will be "".
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 export GYP_CROSSCOMPILE=1 93 export GYP_CROSSCOMPILE=1
106 94
107 # Performs a gyp_chromium run to convert gyp->Makefile for android code. 95 # Performs a gyp_chromium run to convert gyp->Makefile for android code.
108 android_gyp() { 96 android_gyp() {
109 # This is just a simple wrapper of gyp_chromium, please don't add anything 97 # This is just a simple wrapper of gyp_chromium, please don't add anything
110 # in this function. 98 # in this function.
111 ( 99 (
112 "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" --check "$@" 100 "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" --check "$@"
113 ) 101 )
114 } 102 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698