summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryfriedman@chromium.org <yfriedman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-29 23:19:13 +0000
committeryfriedman@chromium.org <yfriedman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-29 23:19:13 +0000
commitef7ed7a0015169e08e83e7cb283026c24673354a (patch)
tree2f138dbc5a7bae6349b833d675a87278db2267ac
parent955d5dc6362d7276d5773e68d1999a01d3ea281b (diff)
downloadchromium_src-ef7ed7a0015169e08e83e7cb283026c24673354a.zip
chromium_src-ef7ed7a0015169e08e83e7cb283026c24673354a.tar.gz
chromium_src-ef7ed7a0015169e08e83e7cb283026c24673354a.tar.bz2
Fix ninja build for android.
The primary issues is specifying the right path to PRODUCT_DIR (i.e. out/Release). The gyp generator for make specifies the absolute path but for ninja would use a relative path. Since the gyp targets don't line up with where the ant build files are located this causes failures such as base's java being generated in base/android/out/Release/... See: https://groups.google.com/forum/#!msg/gyp-developer/K2T_9obUya0/qq78_Ut-E-AJ for details. A couple of other minor fixes: - content java files are placed in out/Release/java/content to be consisent with other packages. - shared-libraries are now referenced by correct variables for apk-based tests - removed unused media/base/android/java/java.gyp (target is in media/media.gyp) TBR=mark@chromium.org,ben@chromium.org,rsleevi@chromium.org Review URL: https://chromiumcodereview.appspot.com/10386188 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139418 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--base/android/java/base.xml2
-rw-r--r--base/base.gyp2
-rw-r--r--build/apk_test.gypi2
-rw-r--r--build/common.gypi4
-rw-r--r--build/java.gypi2
-rw-r--r--content/content_shell.gypi2
-rw-r--r--content/content_tests.gypi2
-rw-r--r--content/public/android/java/content.xml2
-rw-r--r--ipc/ipc.gyp2
-rw-r--r--media/base/android/java/java.gyp34
-rw-r--r--media/base/android/java/media.xml2
-rw-r--r--net/net.gyp2
-rw-r--r--testing/android/native_test.gyp2
-rw-r--r--ui/ui_unittests.gypi2
14 files changed, 16 insertions, 46 deletions
diff --git a/base/android/java/base.xml b/base/android/java/base.xml
index 4bb3387..f7023cb 100644
--- a/base/android/java/base.xml
+++ b/base/android/java/base.xml
@@ -52,7 +52,7 @@
<target name="dist" depends="compile"
description="generate the distribution" >
<!-- Create the distribution directory -->
- <mkdir dir="${dist}/lib"/>
+ <mkdir dir="${out.dir}"/>
<jar jarfile="${out.dir}/chromium_base.jar" basedir="${dest.dir}"/>
</target>
diff --git a/base/base.gyp b/base/base.gyp
index 31b6765..72bfdc6 100644
--- a/base/base.gyp
+++ b/base/base.gyp
@@ -661,7 +661,7 @@
],
'variables': {
'test_suite_name': 'base_unittests',
- 'input_shlib_path': '<(PRODUCT_DIR)/lib.target/<(SHARED_LIB_PREFIX)base_unittests<(SHARED_LIB_SUFFIX)',
+ 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)base_unittests<(SHARED_LIB_SUFFIX)',
'input_jars_paths': ['<(PRODUCT_DIR)/lib.java/chromium_base.jar',],
},
'includes': [ '../build/apk_test.gypi' ],
diff --git a/build/apk_test.gypi b/build/apk_test.gypi
index e982bdd..a61795b 100644
--- a/build/apk_test.gypi
+++ b/build/apk_test.gypi
@@ -44,7 +44,7 @@
'--output',
'<(PRODUCT_DIR)/<(test_suite_name)_apk',
'--ant-args',
- '-DPRODUCT_DIR=<(PRODUCT_DIR)',
+ '-DPRODUCT_DIR=<(ant_build_out)',
'--ant-compile'
],
}],
diff --git a/build/common.gypi b/build/common.gypi
index 058a45e..65aa2d6 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -872,6 +872,10 @@
'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib',
'android_app_abi%': '<(android_app_abi)',
+ # Provides an absolute path to PRODUCT_DIR (e.g. out/Release). Used
+ # to specify the output directory for Ant in the Android build.
+ 'ant_build_out': '`cd <(PRODUCT_DIR) && pwd -P`',
+
# Uses Android's crash report system
'linux_breakpad%': 0,
diff --git a/build/java.gypi b/build/java.gypi
index c05981d..67ebcb0 100644
--- a/build/java.gypi
+++ b/build/java.gypi
@@ -44,7 +44,7 @@
],
'action': [
'ant',
- '-DPRODUCT_DIR=<(PRODUCT_DIR)',
+ '-DPRODUCT_DIR=<(ant_build_out)',
'-DPACKAGE_NAME=<(package_name)',
'-buildfile',
'<(java_in_dir)/<(package_name).xml',
diff --git a/content/content_shell.gypi b/content/content_shell.gypi
index 6f27f31..8fc69ca 100644
--- a/content/content_shell.gypi
+++ b/content/content_shell.gypi
@@ -572,7 +572,7 @@
],
'action': [
'ant',
- '-DPRODUCT_DIR=<(PRODUCT_DIR)',
+ '-DPRODUCT_DIR=<(ant_build_out)',
'-DAPP_ABI=<(android_app_abi)',
'-buildfile',
'<(DEPTH)/content/shell/android/content_shell_apk.xml',
diff --git a/content/content_tests.gypi b/content/content_tests.gypi
index d77cf32..3b2e9e6 100644
--- a/content/content_tests.gypi
+++ b/content/content_tests.gypi
@@ -562,7 +562,7 @@
],
'variables': {
'test_suite_name': 'content_unittests',
- 'input_shlib_path': '<(PRODUCT_DIR)/lib.target/<(SHARED_LIB_PREFIX)content_unittests<(SHARED_LIB_SUFFIX)',
+ 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)content_unittests<(SHARED_LIB_SUFFIX)',
'input_jars_paths': [
'<(PRODUCT_DIR)/lib.java/chromium_base.jar',
'<(PRODUCT_DIR)/lib.java/chromium_content.jar',
diff --git a/content/public/android/java/content.xml b/content/public/android/java/content.xml
index 533accd..26729df 100644
--- a/content/public/android/java/content.xml
+++ b/content/public/android/java/content.xml
@@ -13,7 +13,7 @@
<property name="sdk.version" value="${env.ANDROID_SDK_VERSION}"/>
<property name="src" location="."/>
<property name="out.dir" location="${PRODUCT_DIR}/lib.java"/>
- <property name="classes.dir" location="${out.dir}/java/${PACKAGE_NAME}"/>
+ <property name="classes.dir" location="${PRODUCT_DIR}/java/${PACKAGE_NAME}"/>
<property name="jar.dir" location="${out.dir}"/>
<condition property="location.base"
diff --git a/ipc/ipc.gyp b/ipc/ipc.gyp
index f8bacdd..7d61a89 100644
--- a/ipc/ipc.gyp
+++ b/ipc/ipc.gyp
@@ -107,7 +107,7 @@
],
'variables': {
'test_suite_name': 'ipc_tests',
- 'input_shlib_path': '<(PRODUCT_DIR)/lib.target/<(SHARED_LIB_PREFIX)ipc_tests<(SHARED_LIB_SUFFIX)',
+ 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)ipc_tests<(SHARED_LIB_SUFFIX)',
'input_jars_paths': ['<(PRODUCT_DIR)/lib.java/chromium_base.jar',],
},
'includes': [ '../build/apk_test.gypi' ],
diff --git a/media/base/android/java/java.gyp b/media/base/android/java/java.gyp
deleted file mode 100644
index d59aec4..0000000
--- a/media/base/android/java/java.gyp
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright (c) 2012 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'targets': [
- {
- 'target_name': 'media_java',
- 'message': 'building media java sources',
- 'type': 'none',
- 'actions': [
- {
- 'action_name': 'media_java',
- 'inputs': [
- 'media.xml',
- 'org/chromium/media/MediaPlayerListener.java',
- ],
- 'dependencies': [
- '<(DEPTH)/base/android/java/java.gyp:base_java',
- ],
- 'outputs': [
- '$(PRODUCT_DIR)/chromium_media.jar',
- ],
- 'action': [
- 'ant',
- '-DPRODUCT_DIR=<(PRODUCT_DIR)',
- '-buildfile',
- 'media.xml',
- ]
- },
- ],
- },
- ],
-}
diff --git a/media/base/android/java/media.xml b/media/base/android/java/media.xml
index 8516e3e..ab409f6 100644
--- a/media/base/android/java/media.xml
+++ b/media/base/android/java/media.xml
@@ -45,7 +45,7 @@
<target name="dist" depends="compile"
description="generate the distribution" >
<!-- Create the distribution directory -->
- <mkdir dir="${dist}/lib"/>
+ <mkdir dir="${out.dir}"/>
<!-- Put everything in ${build} into the chromium_media.jar file -->
<jar jarfile="${out.dir}/chromium_media.jar" basedir="${dest.dir}"/>
diff --git a/net/net.gyp b/net/net.gyp
index b347646..904fb4f 100644
--- a/net/net.gyp
+++ b/net/net.gyp
@@ -1864,7 +1864,7 @@
],
'variables': {
'test_suite_name': 'net_unittests',
- 'input_shlib_path': '<(PRODUCT_DIR)/lib.target/<(SHARED_LIB_PREFIX)net_unittests<(SHARED_LIB_SUFFIX)',
+ 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)net_unittests<(SHARED_LIB_SUFFIX)',
'input_jars_paths': [
'<(PRODUCT_DIR)/lib.java/chromium_base.jar',
'<(PRODUCT_DIR)/lib.java/chromium_net.jar',
diff --git a/testing/android/native_test.gyp b/testing/android/native_test.gyp
index 1b60cbf..4b25f7c 100644
--- a/testing/android/native_test.gyp
+++ b/testing/android/native_test.gyp
@@ -31,7 +31,7 @@
],
'action': [
'ant',
- '-DPRODUCT_DIR=<(PRODUCT_DIR)',
+ '-DPRODUCT_DIR=<(ant_build_out)',
'-buildfile',
'<(DEPTH)/testing/android/native_test_apk.xml',
]
diff --git a/ui/ui_unittests.gypi b/ui/ui_unittests.gypi
index 628157b..28fa51a 100644
--- a/ui/ui_unittests.gypi
+++ b/ui/ui_unittests.gypi
@@ -223,7 +223,7 @@
],
'variables': {
'test_suite_name': 'ui_unittests',
- 'input_shlib_path': '<(PRODUCT_DIR)/lib.target/<(SHARED_LIB_PREFIX)ui_unittests<(SHARED_LIB_SUFFIX)',
+ 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)ui_unittests<(SHARED_LIB_SUFFIX)',
'input_jars_paths': ['<(PRODUCT_DIR)/lib.java/chromium_base.jar',],
},
'includes': [ '../build/apk_test.gypi' ],