Bug 1354581 - Move MOZILLA_OFFICIAL to python configure. r?chmanchester draft
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 21 Jun 2017 10:20:31 +0900
changeset 599310 970519ce94f93e83d32ac350e478568383ccfcc0
parent 599255 b1b9129838ade91684574f42219b2010928d7db4
child 599311 5d8d557d03b4795175ad389b4b09dd27eaa3af99
push id65477
push userbmo:mh+mozilla@glandium.org
push dateThu, 22 Jun 2017 23:09:31 +0000
reviewerschmanchester
bugs1354581
milestone56.0a1
Bug 1354581 - Move MOZILLA_OFFICIAL to python configure. r?chmanchester
js/src/old-configure.in
moz.configure
old-configure.in
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -2003,18 +2003,16 @@ AC_SUBST(MOZ_FIX_LINK_PATHS)
 AC_SUBST(MOZ_POST_PROGRAM_COMMAND)
 
 AC_SUBST(MOZ_APP_NAME)
 AC_SUBST(MOZ_APP_DISPLAYNAME)
 AC_SUBST(MOZ_APP_VERSION)
 
 AC_SUBST(MOZ_PKG_SPECIAL)
 
-AC_SUBST(MOZILLA_OFFICIAL)
-
 dnl ========================================================
 dnl ECMAScript Internationalization API Support (uses ICU)
 dnl ========================================================
 
 dnl top-level configure may override this with --without-intl-api
 _INTL_API=yes
 
 MOZ_CONFIG_ICU()
--- a/moz.configure
+++ b/moz.configure
@@ -69,16 +69,28 @@ js_option('--disable-tests',
 @depends('--disable-tests')
 def enable_tests(value):
     if value:
         return True
 
 set_config('ENABLE_TESTS', enable_tests)
 set_define('ENABLE_TESTS', enable_tests)
 
+js_option(env='MOZILLA_OFFICIAL',
+          help='Build an official release')
+
+@depends('MOZILLA_OFFICIAL')
+def mozilla_official(official):
+    if official:
+        return True
+
+set_config('MOZILLA_OFFICIAL', mozilla_official)
+set_define('MOZILLA_OFFICIAL', mozilla_official)
+add_old_configure_assignment('MOZILLA_OFFICIAL', mozilla_official)
+
 @depends(enable_tests)
 def gtest_has_rtti(value):
     if value:
         return '0'
 
 set_define('GTEST_HAS_RTTI', gtest_has_rtti)
 
 @depends(target, enable_tests)
--- a/old-configure.in
+++ b/old-configure.in
@@ -5090,19 +5090,17 @@ AC_SUBST(FIREFOX_VERSION)
 AC_SUBST(MOZ_UA_OS_AGNOSTIC)
 if test -n "$MOZ_UA_OS_AGNOSTIC"; then
   AC_DEFINE(MOZ_UA_OS_AGNOSTIC)
 fi
 
 AC_SUBST(MOZ_PKG_SPECIAL)
 AC_SUBST(MOZ_SIMPLE_PACKAGE_NAME)
 
-AC_SUBST(MOZILLA_OFFICIAL)
 if test "$MOZILLA_OFFICIAL"; then
-    AC_DEFINE(MOZILLA_OFFICIAL)
     # Build revisions should always be present in official builds
     MOZ_INCLUDE_SOURCE_INFO=1
 fi
 
 # External builds (specifically Ubuntu) may drop the hg repo information, so we allow to
 # explicitly set the repository and changeset information in.
 AC_SUBST(MOZ_SOURCE_REPO)
 AC_SUBST(MOZ_SOURCE_CHANGESET)