Bug 1257958 - Move MOZ_ANDROID_GCM to Python configure. r=nalexander draft
authorChris Manchester <cmanchester@mozilla.com>
Fri, 22 Apr 2016 12:44:05 -0700
changeset 355512 85acc7f09e262cb538c5c5f4fd84e60aea9ad13a
parent 355511 e48458cf034d8ec4e3409da72749211b774e73f3
child 355513 c7e934e6313ab9efbdf179f290e0f7a720d13788
push id16313
push usercmanchester@mozilla.com
push dateFri, 22 Apr 2016 19:48:11 +0000
reviewersnalexander
bugs1257958
milestone48.0a1
Bug 1257958 - Move MOZ_ANDROID_GCM to Python configure. r=nalexander MozReview-Commit-ID: 90vbYKB8rHJ
build/autoconf/android.m4
mobile/android/bouncer/moz.build
mobile/android/confvars.sh
mobile/android/installer/Makefile.in
mobile/android/moz.configure
old-configure.in
--- a/build/autoconf/android.m4
+++ b/build/autoconf/android.m4
@@ -220,18 +220,16 @@ if test -n "$MOZ_NATIVE_DEVICES" ; then
 fi
 
 ])
 
 AC_DEFUN([MOZ_ANDROID_GOOGLE_CLOUD_MESSAGING],
 [
 
 if test -n "$MOZ_ANDROID_GCM" ; then
-    AC_SUBST(MOZ_ANDROID_GCM)
-
     MOZ_ANDROID_AAR(play-services-base, 8.1.0, google, com/google/android/gms)
     MOZ_ANDROID_AAR(play-services-basement, 8.1.0, google, com/google/android/gms)
     MOZ_ANDROID_AAR(play-services-gcm, 8.1.0, google, com/google/android/gms)
 fi
 
 ])
 
 AC_DEFUN([MOZ_ANDROID_INSTALL_TRACKING],
--- a/mobile/android/bouncer/moz.build
+++ b/mobile/android/bouncer/moz.build
@@ -7,16 +7,20 @@
 DEFINES['ANDROID_VERSION_CODE'] = '1'
 
 for var in ('ANDROID_PACKAGE_NAME',
             'MOZ_ANDROID_BROWSER_INTENT_CLASS',
             'MOZ_APP_DISPLAYNAME',
             'MOZ_APP_VERSION'):
     DEFINES[var] = CONFIG[var]
 
+for var in ('MOZ_ANDROID_GCM',):
+    if CONFIG[var]:
+        DEFINES[var] = CONFIG[var]
+
 ANDROID_APK_NAME = 'bouncer'
 ANDROID_APK_PACKAGE = CONFIG['ANDROID_PACKAGE_NAME']
 
 # Putting branding earlier allows branders to override default resources.
 ANDROID_RES_DIRS += [
     '/' + CONFIG['MOZ_BRANDING_DIRECTORY'] + '/res', # For the icon.
     'res',
 ]
--- a/mobile/android/confvars.sh
+++ b/mobile/android/confvars.sh
@@ -81,21 +81,16 @@ MOZ_ANDROID_MLS_STUMBLER=1
 MOZ_ANDROID_DOWNLOADS_INTEGRATION=1
 
 # Build and package the install bouncer APK by default.
 MOZ_ANDROID_PACKAGE_INSTALL_BOUNCER=1
 
 # Use the low-memory GC tuning.
 export JS_GC_SMALL_CHUNK_SIZE=1
 
-# Enable GCM registration on Nightly builds only.
-if test "$NIGHTLY_BUILD"; then
-  MOZ_ANDROID_GCM=1
-fi
-
 # Enable C++ APZ.
 MOZ_ANDROID_APZ=1
 
 # Enable checking that add-ons are signed by the trusted root
 MOZ_ADDON_SIGNING=1
 
 # Enable the Switchboard A/B framework code.
 # Note: The framework is always included in the app. This flag controls
--- a/mobile/android/installer/Makefile.in
+++ b/mobile/android/installer/Makefile.in
@@ -36,16 +36,20 @@ DEFINES += \
 ifdef MOZ_DEBUG
 DEFINES += -DMOZ_DEBUG=1
 endif
 
 ifdef MOZ_ANDROID_EXCLUDE_FONTS
 DEFINES += -DMOZ_ANDROID_EXCLUDE_FONTS=1
 endif
 
+ifdef MOZ_ANDROID_GCM
+DEFINES += -DMOZ_ANDROID_GCM=1
+endif
+
 MOZ_PACKAGER_MINIFY=1
 
 include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
 
 # Note that JS_BINARY can be defined in packager.mk, so this test must come
 # after including that file. MOZ_PACKAGER_MINIFY_JS is used in packager.mk, but
 # since recipe evaluation is deferred, we can set it here after the inclusion.
 ifneq (,$(JS_BINARY))
--- a/mobile/android/moz.configure
+++ b/mobile/android/moz.configure
@@ -7,16 +7,21 @@
 env_flag('MOZ_ANDROID_EXCLUDE_FONTS',
          help='Whether to exclude font files from the build',
          default=True)
 
 env_flag('MOZ_LOCALE_SWITCHER',
          help='Enable runtime locale switching',
          default=True)
 
+env_flag('MOZ_ANDROID_GCM',
+         help='Enable GCM registration on Nightly builds only',
+         default=enabled_in_nightly,
+         set_for_old_configure=True)
+
 @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.')
--- a/old-configure.in
+++ b/old-configure.in
@@ -3618,23 +3618,16 @@ fi
 dnl ========================================================
 dnl = Include Switchboard A/B framework on Android
 dnl ========================================================
 if test -n "$MOZ_SWITCHBOARD"; then
     AC_DEFINE(MOZ_SWITCHBOARD)
 fi
 
 dnl ========================================================
-dnl = Enable GCM on Android.
-dnl ========================================================
-if test -n "$MOZ_ANDROID_GCM"; then
-    AC_DEFINE(MOZ_ANDROID_GCM)
-fi
-
-dnl ========================================================
 dnl = Enable IPDL's "expensive" unit tests
 dnl ========================================================
 MOZ_IPDL_TESTS=
 
 MOZ_ARG_ENABLE_BOOL(ipdl-tests,
 [  --enable-ipdl-tests     Enable expensive IPDL tests],
     MOZ_IPDL_TESTS=1,
     MOZ_IPDL_TESTS=)
@@ -6829,17 +6822,16 @@ AC_SUBST(MOZ_D3DCOMPILER_VISTA_DLL_PATH)
 AC_SUBST(MOZ_DIRECTX_SDK_PATH)
 AC_SUBST(MOZ_D3DCOMPILER_XP_DLL)
 AC_SUBST(MOZ_D3DCOMPILER_XP_CAB)
 
 AC_SUBST(MOZ_ANDROID_HISTORY)
 AC_SUBST(MOZ_WEBSMS_BACKEND)
 AC_SUBST(MOZ_ANDROID_BEAM)
 AC_SUBST(MOZ_DISABLE_GECKOVIEW)
-AC_SUBST(MOZ_ANDROID_GCM)
 AC_SUBST(MOZ_ANDROID_GECKOLIBS_AAR)
 AC_SUBST(MOZ_ANDROID_SEARCH_ACTIVITY)
 AC_SUBST(MOZ_ANDROID_PACKAGE_INSTALL_BOUNCER)
 AC_SUBST(MOZ_ANDROID_MLS_STUMBLER)
 AC_SUBST(MOZ_ANDROID_DOWNLOADS_INTEGRATION)
 AC_SUBST(MOZ_ANDROID_APPLICATION_CLASS)
 AC_SUBST(MOZ_ANDROID_BROWSER_INTENT_CLASS)
 AC_SUBST(MOZ_ANDROID_SEARCH_INTENT_CLASS)