Bug 1256966 - Move NIGHTLY_BUILD and RELEASE_BUILD to Python configure. r=glandium

MozReview-Commit-ID: 2Z3XMO2n681
This commit is contained in:
Chris Manchester 2016-03-18 11:24:11 -07:00
Родитель a05901fd6c
Коммит d91718bd8c
4 изменённых файлов: 42 добавлений и 62 удалений

Просмотреть файл

@ -563,6 +563,39 @@ def build_project(include_project_configure, build_env, help):
return ret
# set RELEASE_BUILD and NIGHTLY_BUILD variables depending on the cycle we're in
# The logic works like this:
# - if we have "a1" in GRE_MILESTONE, we're building Nightly (define NIGHTLY_BUILD)
# - otherwise, if we have "a" in GRE_MILESTONE, we're building Nightly or Aurora
# - otherwise, we're building Release/Beta (define RELEASE_BUILD)
@depends(check_build_environment)
@advanced
def milestone(build_env):
milestone_path = os.path.join(build_env['TOPSRCDIR'],
'config',
'milestone.txt')
with open(milestone_path, 'r') as fh:
milestone = fh.read().splitlines()[-1]
set_config('GRE_MILESTONE', milestone)
is_nightly = is_release = False
if 'a1' in milestone:
set_config('NIGHTLY_BUILD', '1')
set_define('NIGHTLY_BUILD', '1')
add_old_configure_assignment('NIGHTLY_BUILD', '1')
is_nightly = True
elif 'a' not in milestone:
set_config('RELEASE_BUILD', '1')
set_define('RELEASE_BUILD', '1')
add_old_configure_assignment('RELEASE_BUILD', '1')
is_release = True
return namespace(version=milestone,
is_nightly=is_nightly,
is_release=is_release)
# This is temporary until js/src/configure and configure are merged.
# Use instead of option() in js/moz.configure
@template

Просмотреть файл

@ -1897,32 +1897,6 @@ fi
AC_DEFINE_UNQUOTED(MOZ_UPDATE_CHANNEL, $MOZ_UPDATE_CHANNEL)
AC_SUBST(MOZ_UPDATE_CHANNEL)
dnl set GRE_MILESTONE
dnl ========================================================
GRE_MILESTONE=`tail -n 1 "$_topsrcdir"/config/milestone.txt 2>/dev/null || tail -1 "$_topsrcdir"/config/milestone.txt`
AC_SUBST(GRE_MILESTONE)
dnl set RELEASE_BUILD and NIGHTLY_BUILD variables depending on the cycle we're in
dnl The logic works like this:
dnl - if we have "a1" in GRE_MILESTONE, we're building Nightly (define NIGHTLY_BUILD)
dnl - otherwise, if we have "a" in GRE_MILESTONE, we're building Nightly or Aurora
dnl - otherwise, we're building Release/Beta (define RELEASE_BUILD)
case "$GRE_MILESTONE" in
*a1*)
NIGHTLY_BUILD=1
AC_DEFINE(NIGHTLY_BUILD)
;;
*a*)
;;
*)
RELEASE_BUILD=1
AC_DEFINE(RELEASE_BUILD)
;;
esac
AC_SUBST(NIGHTLY_BUILD)
AC_SUBST(RELEASE_BUILD)
dnl ========================================================
dnl =
dnl = Check for external package dependencies

Просмотреть файл

@ -15,6 +15,15 @@ include('build/moz.configure/checks.configure')
# - Spidermonkey-specific options and rules should go in js/moz.configure.
# - etc.
# Multiprocess Firefox Testing UI - Nightly and Aurora
# To be removed in Bug 1003313
@depends(milestone)
def e10s_testing_only(milestone):
if not milestone.is_release:
set_config('E10S_TESTING_ONLY', '1')
set_define('E10S_TESTING_ONLY', '1')
option('--enable-artifact-builds', env='MOZ_ARTIFACT_BUILDS',
help='Download and use prebuilt binary artifacts.')

Просмотреть файл

@ -2549,42 +2549,6 @@ esac
MOZ_CONFIG_NSPR()
dnl set GRE_MILESTONE
dnl ========================================================
GRE_MILESTONE=`tail -n 1 "$_topsrcdir"/config/milestone.txt 2>/dev/null || tail -1 "$_topsrcdir"/config/milestone.txt`
AC_SUBST(GRE_MILESTONE)
# set RELEASE_BUILD and NIGHTLY_BUILD variables depending on the cycle we're in
# The logic works like this:
# - if we have "a1" in GRE_MILESTONE, we're building Nightly (define NIGHTLY_BUILD)
# - otherwise, if we have "a" in GRE_MILESTONE, we're building Nightly or Aurora
# - otherwise, we're building Release/Beta (define RELEASE_BUILD)
case "$GRE_MILESTONE" in
*a1*)
NIGHTLY_BUILD=1
AC_DEFINE(NIGHTLY_BUILD)
;;
*a*)
;;
*)
RELEASE_BUILD=1
AC_DEFINE(RELEASE_BUILD)
;;
esac
AC_SUBST(NIGHTLY_BUILD)
AC_SUBST(RELEASE_BUILD)
dnl ========================================================
dnl Multiprocess Firefox Testing UI - Nightly and Aurora
dnl To be removed in Bug 1003313
dnl ========================================================
if test -z "$RELEASE_BUILD"; then
E10S_TESTING_ONLY=1
AC_DEFINE(E10S_TESTING_ONLY)
fi
AC_SUBST(E10S_TESTING_ONLY)
dnl ========================================================
dnl system libevent Support
dnl ========================================================