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

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

Issue 11026038: Android: fix webview-in-android build config. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
OLDNEW
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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 287
288 common_gyp_vars 288 common_gyp_vars
289 } 289 }
290 290
291 ################################################################################ 291 ################################################################################
292 # To build WebView, we use the Android build system and build inside an Android 292 # To build WebView, we use the Android build system and build inside an Android
293 # source tree. This method is called from non_sdk_build_init() and adds to the 293 # source tree. This method is called from non_sdk_build_init() and adds to the
294 # settings specified there. 294 # settings specified there.
295 ############################################################################# 295 #############################################################################
296 webview_build_init() { 296 webview_build_init() {
297 # For the WebView build we always use the NDK and SDK in the Android tree,
298 # and we don't touch ANDROID_TOOLCHAIN which is already set by Android.
299 export ANDROID_NDK_ROOT=${ANDROID_BUILD_TOP}/prebuilts/ndk/8
300 export ANDROID_SDK_ROOT=${ANDROID_BUILD_TOP}/prebuilts/sdk/\
301 ${ANDROID_SDK_VERSION}
302
303 common_vars_defines
304
297 # We need to supply SDK paths relative to the top of the Android tree to make 305 # We need to supply SDK paths relative to the top of the Android tree to make
298 # sure the generated Android makefiles are portable, as they will be checked 306 # sure the generated Android makefiles are portable, as they will be checked
299 # into the Android tree. 307 # into the Android tree.
300 ANDROID_SDK=$(python -c \ 308 ANDROID_SDK=$(python -c \
301 "import os.path; print os.path.relpath('${ANDROID_SDK_ROOT}', '${TOP}')") 309 "import os.path; print os.path.relpath('${ANDROID_SDK_ROOT}', \
310 '${ANDROID_BUILD_TOP}')")
302 ANDROID_SDK_TOOLS=$(python -c \ 311 ANDROID_SDK_TOOLS=$(python -c \
303 "import os.path; \ 312 "import os.path; \
304 print os.path.relpath('${ANDROID_SDK_ROOT}/../tools/linux', \ 313 print os.path.relpath('${ANDROID_SDK_ROOT}/../tools/linux', \
305 '${TOP}')") 314 '${ANDROID_BUILD_TOP}')")
306 DEFINES+=" android_build_type=1" 315 DEFINES+=" android_build_type=1"
316 DEFINES+=" sdk_build=0"
317 DEFINES+=" android_src=\${GYP_ABS_ANDROID_TOP_DIR}"
318 DEFINES+=" android_product_out=NOT_USED_ON_WEBVIEW"
307 DEFINES+=" android_upstream_bringup=1" 319 DEFINES+=" android_upstream_bringup=1"
308 DEFINES+=" android_sdk=\$(GYP_ABS_ANDROID_TOP_DIR)/${ANDROID_SDK}" 320 DEFINES+=" android_sdk=\$(GYP_ABS_ANDROID_TOP_DIR)/${ANDROID_SDK}"
309 DEFINES+=" android_sdk_root=${ANDROID_SDK_ROOT}" 321 DEFINES+=" android_sdk_root=\$(GYP_ABS_ANDROID_TOP_DIR)/${ANDROID_SDK}"
310 DEFINES+=" android_sdk_tools=\$(GYP_ABS_ANDROID_TOP_DIR)/${ANDROID_SDK_TOOLS}" 322 DEFINES+=" android_sdk_tools=\$(GYP_ABS_ANDROID_TOP_DIR)/${ANDROID_SDK_TOOLS}"
311 DEFINES+=" android_sdk_version=${ANDROID_SDK_VERSION}" 323 DEFINES+=" android_sdk_version=${ANDROID_SDK_VERSION}"
312 DEFINES+=" android_toolchain=${ANDROID_TOOLCHAIN}" 324 DEFINES+=" android_toolchain=${ANDROID_TOOLCHAIN}"
313 export GYP_DEFINES="${DEFINES}" 325 export GYP_DEFINES="${DEFINES}"
314 326
315 export GYP_GENERATORS="android" 327 export GYP_GENERATORS="android"
316 328
317 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" 329 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=libwebview"
318 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" 330 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1"
319 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} auto_regeneration=0" 331 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} auto_regeneration=0"
320 332
321 # TODO(torne): This isn't upstream yet. Upstream it or remove this setting. 333 export CHROMIUM_GYP_FILE="${CHROME_SRC}/android_webview/android_webview.gyp"
322 export CHROMIUM_GYP_FILE="${CHROME_SRC}/build/all_android_webview.gyp"
323 } 334 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698