Bug 1262020 - Move --target check for mobile/android to moz.configure. r=nalexander draft
authorMike Hommey <mh+mozilla@glandium.org>
Sat, 02 Apr 2016 10:39:54 +0900
changeset 347600 c06eaf8f04ae979ba90b64b5cb76dc215f0f16e7
parent 347486 32813522317282ca412e5216ad6c6ed0bd7422da
child 347601 ea248721c757143814f6319be8572a2ed10588f3
push id14624
push userbmo:mh+mozilla@glandium.org
push dateTue, 05 Apr 2016 11:55:55 +0000
reviewersnalexander
bugs1262020
milestone48.0a1
Bug 1262020 - Move --target check for mobile/android to moz.configure. r=nalexander Interestingly, the test was happening too late in old-configure, and you were more likely to hit other errors first.
mobile/android/moz.configure
old-configure.in
--- a/mobile/android/moz.configure
+++ b/mobile/android/moz.configure
@@ -1,8 +1,17 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+@depends(target)
+def check_target(target):
+    if target.os != 'Android':
+        log.error('You must specify --target=arm-linux-androideabi (or some '
+                  'other valid Android target) when building mobile/android.')
+        die('See https://developer.mozilla.org/docs/Mozilla/Developer_guide/'
+            'Build_Instructions/Simple_Firefox_for_Android_build '
+            'for more information about the necessary options.')
+
 include('../../toolkit/moz.configure')
 include('gradle.configure')
--- a/old-configure.in
+++ b/old-configure.in
@@ -3018,26 +3018,16 @@ AC_SUBST(MOZ_B2G_VERSION)
 dnl ========================================================
 dnl Ensure Android SDK and build-tools versions depending on
 dnl mobile target.
 dnl ========================================================
 
 if test -z "$gonkdir" ; then
     case "$MOZ_BUILD_APP" in
     mobile/android)
-        case "$target" in
-        *-android*|*-linuxandroid*)
-            :
-            ;;
-        *)
-            AC_MSG_ERROR([You must specify --target=arm-linux-androideabi (or some other valid android target) when building with --enable-application=mobile/android.
-             See https://wiki.mozilla.org/Mobile/Fennec/Android#Setup_Fennec_mozconfig for more information about the necessary options])
-            ;;
-        esac
-
         MOZ_ANDROID_SDK(23, 23.0.1)
         ;;
     esac
 fi
 
 dnl ========================================================
 dnl =
 dnl = Toolkit Options