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

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

Issue 2392643003: Removes files from //build that we don't need (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « build/android/enable_asserts.py ('k') | build/android/finalize_apk_action.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/bin/bash
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
4 # found in the LICENSE file.
5
6 # Sets up environment for building Chromium on Android.
7
8 # Make sure we're being sourced (possibly by another script). Check for bash
9 # since zsh sets $0 when sourcing.
10 if [[ -n "$BASH_VERSION" && "${BASH_SOURCE:-$0}" == "$0" ]]; then
11 echo "ERROR: envsetup must be sourced."
12 exit 1
13 fi
14
15 # This only exists to set local variables. Don't call this manually.
16 android_envsetup_main() {
17 local SCRIPT_PATH="$1"
18 local SCRIPT_DIR="$(dirname "$SCRIPT_PATH")"
19
20 local CURRENT_DIR="$(readlink -f "${SCRIPT_DIR}/../../")"
21 if [[ -z "${CHROME_SRC}" ]]; then
22 # If $CHROME_SRC was not set, assume current directory is CHROME_SRC.
23 local CHROME_SRC="${CURRENT_DIR}"
24 fi
25
26 if [[ "${CURRENT_DIR/"${CHROME_SRC}"/}" == "${CURRENT_DIR}" ]]; then
27 # If current directory is not in $CHROME_SRC, it might be set for other
28 # source tree. If $CHROME_SRC was set correctly and we are in the correct
29 # directory, "${CURRENT_DIR/"${CHROME_SRC}"/}" will be "".
30 # Otherwise, it will equal to "${CURRENT_DIR}"
31 echo "Warning: Current directory is out of CHROME_SRC, it may not be \
32 the one you want."
33 echo "${CHROME_SRC}"
34 fi
35
36 # Allow the caller to override a few environment variables. If any of them is
37 # unset, we default to a sane value that's known to work. This allows for
38 # experimentation with a custom SDK.
39 if [[ -z "${ANDROID_SDK_ROOT}" || ! -d "${ANDROID_SDK_ROOT}" ]]; then
40 local ANDROID_SDK_ROOT="${CHROME_SRC}/third_party/android_tools/sdk/"
41 fi
42
43 # Add Android SDK tools to system path.
44 export PATH=$PATH:${ANDROID_SDK_ROOT}/platform-tools
45
46 # Add Android utility tools to the system path.
47 export PATH=$PATH:${ANDROID_SDK_ROOT}/tools/
48
49 # Add Chromium Android development scripts to system path.
50 # Must be after CHROME_SRC is set.
51 export PATH=$PATH:${CHROME_SRC}/build/android
52
53 export ENVSETUP_GYP_CHROME_SRC=${CHROME_SRC} # TODO(thakis): Remove.
54 }
55 # In zsh, $0 is the name of the file being sourced.
56 android_envsetup_main "${BASH_SOURCE:-$0}"
57 unset -f android_envsetup_main
58
59 android_gyp() {
60 echo "Please call build/gyp_chromium instead. android_gyp is going away."
61 "${ENVSETUP_GYP_CHROME_SRC}/build/gyp_chromium" --depth="${ENVSETUP_GYP_CHROME _SRC}" --check "$@"
62 }
OLDNEW
« no previous file with comments | « build/android/enable_asserts.py ('k') | build/android/finalize_apk_action.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698