Bug 1272535 - Move MOZ_UPDATE_CHANNEL to Python configure. r=glandium
MozReview-Commit-ID: 2NuZZX1hoEP
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -679,16 +679,35 @@ set_config('NIGHTLY_BUILD', delayed_geta
set_define('NIGHTLY_BUILD', delayed_getattr(milestone, 'is_nightly'))
add_old_configure_assignment('NIGHTLY_BUILD',
delayed_getattr(milestone, 'is_nightly'))
set_config('RELEASE_BUILD', delayed_getattr(milestone, 'is_release'))
set_define('RELEASE_BUILD', delayed_getattr(milestone, 'is_release'))
add_old_configure_assignment('RELEASE_BUILD',
delayed_getattr(milestone, 'is_release'))
+# The app update channel is 'default' when not supplied. The value is used in
+# the application's confvars.sh (and is made available a project specific
+# moz.configure).
+option('--enable-update-channel',
+ nargs=1,
+ help='Select application update channel',
+ default='default')
+
+@depends('--enable-update-channel')
+def update_channel(channel):
+ if channel[0] == '':
+ return 'default'
+ return channel[0].lower()
+
+set_config('MOZ_UPDATE_CHANNEL', update_channel)
+set_define('MOZ_UPDATE_CHANNEL', update_channel)
+add_old_configure_assignment('MOZ_UPDATE_CHANNEL', update_channel)
+
+
# A template providing a shorthand for setting a variable. The created
# option will only be settable with imply_option.
# It is expected that a project-specific moz.configure will call imply_option
# to set a value other than the default.
# If required, the set_as_define and set_for_old_configure arguments
# will additionally cause the variable to be set using set_define and
# add_old_configure_assignment. util.configure would be an appropriate place for
# this, but it uses add_old_configure_assignment, which is defined in this file.
--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
@@ -252,17 +252,16 @@ def old_configure_options(*options):
'--enable-system-sqlite',
'--enable-tasktracer',
'--enable-tests',
'--enable-thread-sanitizer',
'--enable-trace-logging',
'--enable-tree-freetype',
'--enable-ui-locale',
'--enable-universalchardet',
- '--enable-update-channel',
'--enable-updater',
'--enable-url-classifier',
'--enable-valgrind',
'--enable-verify-mar',
'--enable-warnings-as-errors',
'--enable-webapp-runtime',
'--enable-webrtc',
'--enable-websms-backend',
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -1762,33 +1762,16 @@ if test -n "$SKIP_COMPILER_CHECKS"; then
fi # SKIP_COMPILER_CHECKS
dnl Mozilla specific options
dnl ========================================================
dnl The macros used for command line options
dnl are defined in build/autoconf/altoptions.m4.
dnl ========================================================
-dnl = Mozilla update channel, used for disabling features
-dnl = not wanted for release.
-dnl ========================================================
-
-# app update channel is 'default' when not supplied.
-MOZ_ARG_ENABLE_STRING([update-channel],
-[ --enable-update-channel=CHANNEL
- Select application update channel (default=default)],
- MOZ_UPDATE_CHANNEL=`echo $enableval | tr A-Z a-z`)
-
-if test -z "$MOZ_UPDATE_CHANNEL"; then
- MOZ_UPDATE_CHANNEL=default
-fi
-AC_DEFINE_UNQUOTED(MOZ_UPDATE_CHANNEL, $MOZ_UPDATE_CHANNEL)
-AC_SUBST(MOZ_UPDATE_CHANNEL)
-
-dnl ========================================================
dnl =
dnl = Check for external package dependencies
dnl =
dnl ========================================================
MOZ_ARG_HEADER(External Packages)
MOZ_CONFIG_NSPR(js)
--- a/old-configure.in
+++ b/old-configure.in
@@ -2723,29 +2723,16 @@ case "${target}" in
NSS_DISABLE_DBM=1
MOZ_THEME_FASTSTRIPE=1
MOZ_TREE_FREETYPE=1
MOZ_RAW=1
;;
esac
-# The app update channel is 'default' when not supplied. The value is used in
-# the application's confvars.sh so it must be set before confvars.sh is called.
-MOZ_ARG_ENABLE_STRING([update-channel],
-[ --enable-update-channel=CHANNEL
- Select application update channel (default=default)],
- MOZ_UPDATE_CHANNEL=`echo $enableval | tr A-Z a-z`)
-
-if test -z "$MOZ_UPDATE_CHANNEL"; then
- MOZ_UPDATE_CHANNEL=default
-fi
-AC_DEFINE_UNQUOTED(MOZ_UPDATE_CHANNEL, $MOZ_UPDATE_CHANNEL)
-AC_SUBST(MOZ_UPDATE_CHANNEL)
-
# Allow to specify a Mozilla API key file that contains the secret key to be
# used for various Mozilla API requests.
MOZ_ARG_WITH_STRING(mozilla-api-keyfile,
[ --with-mozilla-api-keyfile=file Use the secret key contained in the given keyfile for Mozilla API requests],
MOZ_MOZILLA_API_KEY=`cat $withval`)
if test -z "$MOZ_MOZILLA_API_KEY"; then
MOZ_MOZILLA_API_KEY=no-mozilla-api-key
fi