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. 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 echo "WARNING: 32-bit host build enabled. Here be dragons!" | 49 echo "WARNING: 32-bit host build enabled. Here be dragons!" |
50 host_arch=x86 | 50 host_arch=x86 |
51 fi | 51 fi |
52 ;; | 52 ;; |
53 *) | 53 *) |
54 echo "ERROR: Unsupported host architecture (${host_arch})." | 54 echo "ERROR: Unsupported host architecture (${host_arch})." |
55 echo "Try running this script on a Linux/x86_64 machine instead." | 55 echo "Try running this script on a Linux/x86_64 machine instead." |
56 return 1 | 56 return 1 |
57 esac | 57 esac |
58 | 58 |
59 host_os=$(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/') | |
60 | |
61 case "${host_os}" in | 59 case "${host_os}" in |
62 "linux") | 60 "linux") |
63 toolchain_dir="linux-${host_arch}" | 61 toolchain_dir="linux-${host_arch}" |
64 ;; | 62 ;; |
65 "mac") | 63 "mac") |
66 toolchain_dir="darwin-${host_arch}" | 64 toolchain_dir="darwin-${host_arch}" |
67 ;; | 65 ;; |
68 *) | 66 *) |
69 echo "Host platform ${host_os} is not supported" >& 2 | 67 echo "Host platform ${host_os} is not supported" >& 2 |
70 return 1 | 68 return 1 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 # This is just a simple wrapper of gyp_chromium, please don't add anything | 153 # This is just a simple wrapper of gyp_chromium, please don't add anything |
156 # in this function. | 154 # in this function. |
157 echo "GYP_GENERATORS set to '$GYP_GENERATORS'" | 155 echo "GYP_GENERATORS set to '$GYP_GENERATORS'" |
158 ( | 156 ( |
159 "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" --check "$@" | 157 "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" --check "$@" |
160 ) | 158 ) |
161 } | 159 } |
162 | 160 |
163 # FLOCK needs to be null on system that has no flock | 161 # FLOCK needs to be null on system that has no flock |
164 which flock > /dev/null || export FLOCK= | 162 which flock > /dev/null || export FLOCK= |
OLD | NEW |