bug 617074 - Fix for building with Android 2.3 SDK (android-9 platform) r=mwu,khuey a2.0=dougt
authorMatt Brubeck <mbrubeck@mozilla.com>
Wed, 15 Dec 2010 11:22:16 -0800
changeset 59214 bfb4016470c0c24dac03707e5f71c905f5d631ea
parent 59213 42b6d032e3122b8337ad16ca086fdff3c350e9f4
child 59215 8755d308796dc5ab5859fa4780131cfc3fd826ab
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmwu, khuey
bugs617074
milestone2.0b9pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 617074 - Fix for building with Android 2.3 SDK (android-9 platform) r=mwu,khuey a2.0=dougt
config/android-common.mk
config/autoconf.mk.in
configure.in
js/src/configure.in
--- a/config/android-common.mk
+++ b/config/android-common.mk
@@ -40,18 +40,18 @@
 ifndef ANDROID_SDK
   $(error ANDROID_SDK must be defined before including android-common.mk)
 endif
 
 ifndef JAVA_CLASSPATH
   $(error JAVA_CLASSPATH must be defined before including android-common.mk)
 endif
 
-DX=$(ANDROID_SDK)/tools/dx
-AAPT=$(ANDROID_SDK)/tools/aapt
+DX=$(ANDROID_PLATFORM_TOOLS)/dx
+AAPT=$(ANDROID_PLATFORM_TOOLS)/aapt
 APKBUILDER=$(ANDROID_SDK)/../../tools/apkbuilder
 ZIPALIGN=$(ANDROID_SDK)/../../tools/zipalign
 
 ifdef JARSIGNER
   APKBUILDER_FLAGS += -u
 endif
 
 # For Android, this defaults to $(ANDROID_SDK)/android.jar
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -697,17 +697,17 @@ REALTIME_LIBS = @REALTIME_LIBS@
 
 MOZ_APP_COMPONENT_LIBS = @MOZ_APP_COMPONENT_LIBS@
 MOZ_APP_EXTRA_LIBS = @MOZ_APP_EXTRA_LIBS@
 
 ANDROID_NDK       = @ANDROID_NDK@
 ANDROID_TOOLCHAIN = @ANDROID_TOOLCHAIN@
 ANDROID_PLATFORM  = @ANDROID_PLATFORM@
 ANDROID_SDK       = @ANDROID_SDK@
-ANDROID_TOOLS     = @ANDROID_TOOLS@
+ANDROID_PLATFORM_TOOLS = @ANDROID_PLATFORM_TOOLS@
 ANDROID_VERSION   = @ANDROID_VERSION@
 
 JS_SHARED_LIBRARY = @JS_SHARED_LIBRARY@
 
 # We only want to do the pymake sanity on Windows, other os's can cope
 ifeq (,$(filter-out WINNT WINCE,$(HOST_OS_ARCH)))
 # Ensure invariants between GNU Make and pymake
 # Checked here since we want the sane error in a file that
--- a/configure.in
+++ b/configure.in
@@ -259,32 +259,28 @@ MOZ_ARG_WITH_STRING(android-version,
     android_version=$withval,
     android_version=5)
 
 MOZ_ARG_WITH_STRING(android-sdk,
 [  --with-android-sdk=DIR
                           location where the Android SDK can be found (base directory, e.g. .../android/platforms/android-6)],
     android_sdk=$withval)
 
-MOZ_ARG_WITH_STRING(android-tools,
-[  --with-android-tools=DIR
-                          location where the Android Tools can be found (base directory, e.g. .../android/tools)],
-    android_tools=$withval)
-
 if test "$target" = "arm-android-eabi" ; then
     if test -z "$android_ndk" ; then
         AC_MSG_ERROR([You must specify --with-android-ndk=/path/to/ndk when targeting Android.])
     fi
 
     if test -z "$android_sdk" ; then
         AC_MSG_ERROR([You must specify --with-android-sdk=/path/to/sdk when targeting Android.])
     fi
 
-    if test -z "$android_tools" ; then
-        AC_MSG_ERROR([You must specify --with-android-tools=/path/to/sdk/tools when targeting Android.])
+    android_platform_tools="$android_sdk"/../../platform-tools
+    if test ! -d "$android_platform_tools" ; then
+        android_platform_tools="$android_sdk"/tools # SDK Tools < r8
     fi
 
     if test -z "$android_toolchain" ; then
         android_toolchain="$android_ndk"/build/prebuilt/`uname -s | tr "[[:upper:]]" "[[:lower:]]"`-x86/arm-eabi-4.4.0
     fi
 
     if test -z "$android_platform" ; then
        android_platform="$android_ndk"/build/platforms/android-"$android_version"/arch-"$target_cpu"
@@ -323,32 +319,32 @@ if test "$target" = "arm-android-eabi" ;
     if test -z "$HOST_LDFLAGS" ; then
         HOST_LDFLAGS=" "
     fi
 
     ANDROID_NDK="${android_ndk}"
     ANDROID_TOOLCHAIN="{android_toolchain}"
     ANDROID_PLATFORM="{android_platform}"
     ANDROID_SDK="${android_sdk}"
-    ANDROID_TOOLS="${android_tools}"
+    ANDROID_PLATFORM_TOOLS="${android_platform_tools}"
     ANDROID_VERSION="${android_version}"
 
     AC_DEFINE(ANDROID)
     AC_DEFINE_UNQUOTED(ANDROID_VERSION, $android_version)
     AC_SUBST(ANDROID_VERSION)
     CROSS_COMPILE=1
     MOZ_CHROME_FILE_FORMAT=omni
     ZLIB_DIR=yes
 fi
 
 AC_SUBST(ANDROID_NDK)
 AC_SUBST(ANDROID_TOOLCHAIN)
 AC_SUBST(ANDROID_PLATFORM)
 AC_SUBST(ANDROID_SDK)
-AC_SUBST(ANDROID_TOOLS)
+AC_SUBST(ANDROID_PLATFORM_TOOLS)
 
 dnl ========================================================
 dnl Checks for compilers.
 dnl ========================================================
 dnl Set CROSS_COMPILE in the environment when running configure
 dnl to use the cross-compile setup for now
 dnl ========================================================
 
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -250,32 +250,28 @@ MOZ_ARG_WITH_STRING(android-version,
     android_version=$withval,
     android_version=5)
 
 MOZ_ARG_WITH_STRING(android-sdk,
 [  --with-android-sdk=DIR
                           location where the Android SDK can be found (base directory, e.g. .../android/platforms/android-6)],
     android_sdk=$withval)
 
-MOZ_ARG_WITH_STRING(android-tools,
-[  --with-android-tools=DIR
-                          location where the Android Tools can be found (base directory, e.g. .../android/tools)],
-    android_tools=$withval)
-
 if test "$target" = "arm-android-eabi" ; then
     if test -z "$android_ndk" ; then
         AC_MSG_ERROR([You must specify --with-android-ndk=/path/to/ndk when targeting Android.])
     fi
 
     if test -z "$android_sdk" ; then
         AC_MSG_ERROR([You must specify --with-android-sdk=/path/to/sdk when targeting Android.])
     fi
 
-    if test -z "$android_tools" ; then
-        AC_MSG_ERROR([You must specify --with-android-tools=/path/to/sdk/tools when targeting Android.])
+    android_platform_tools="$android_sdk"/../../platform-tools
+    if test ! -d "$android_platform_tools" ; then
+        android_platform_tools="$android_sdk"/tools # SDK Tools < r8
     fi
 
     if test -z "$android_toolchain" ; then
         android_toolchain="$android_ndk"/build/prebuilt/`uname -s | tr "[[:upper:]]" "[[:lower:]]"`-x86/arm-eabi-4.4.0
     fi
 
     if test -z "$android_platform" ; then
        android_platform="$android_ndk"/build/platforms/android-"$android_version"/arch-"$target_cpu"
@@ -314,17 +310,17 @@ if test "$target" = "arm-android-eabi" ;
     if test -z "$HOST_LDFLAGS" ; then
         HOST_LDFLAGS=" "
     fi
 
     ANDROID_NDK="${android_ndk}"
     ANDROID_TOOLCHAIN="{android_toolchain}"
     ANDROID_PLATFORM="{android_platform}"
     ANDROID_SDK="${android_sdk}"
-    ANDROID_TOOLS="${android_tools}"
+    ANDROID_PLATFORM_TOOLS="${android_platform_tools}"
     ANDROID_VERSION="${android_version}"
 
     # save these for libffi's subconfigure,
     # which doesn't know how to figure this stuff out on its own
     ANDROID_CFLAGS="$CFLAGS"
     ANDROID_CPPFLAGS="$CPPFLAGS"
     ANDROID_LDFLAGS="$LDFLAGS"
 
@@ -334,17 +330,17 @@ if test "$target" = "arm-android-eabi" ;
     CROSS_COMPILE=1
     MOZ_CHROME_FILE_FORMAT=omni
 fi
 
 AC_SUBST(ANDROID_NDK)
 AC_SUBST(ANDROID_TOOLCHAIN)
 AC_SUBST(ANDROID_PLATFORM)
 AC_SUBST(ANDROID_SDK)
-AC_SUBST(ANDROID_TOOLS)
+AC_SUBST(ANDROID_PLATFORM_TOOLS)
 
 dnl ========================================================
 dnl Checks for compilers.
 dnl ========================================================
 dnl Set CROSS_COMPILE in the environment when running configure
 dnl to use the cross-compile setup for now
 dnl ========================================================