Bug 639726 - Once again add configure/build magic for mozilla-2.0 branch, so comm-central can track a stable release and m-c; r=Callek. This does not currently change any version numbers, it is only the supporting build config.
authorMark Banner <bugzilla@standard8.plus.com>
Mon, 21 Mar 2011 10:29:59 +0000
changeset 7383 635f55c596792d23cd57581aed6578f22df12949
parent 7382 711e23c7796083d2658220b5f385e560e192e1d1
child 7384 b9daee5e01fda02d9f0c36907636b3917206f255
push idunknown
push userunknown
push dateunknown
reviewersCallek
bugs639726
Bug 639726 - Once again add configure/build magic for mozilla-2.0 branch, so comm-central can track a stable release and m-c; r=Callek. This does not currently change any version numbers, it is only the supporting build config.
calendar/lightning/Makefile.in
calendar/providers/gdata/Makefile.in
calendar/timezones/Makefile.in
config/autoconf.mk.in
configure.in
mail/config/version-20.txt
mail/confvars.sh
suite/config/version-20.txt
suite/confvars.sh
--- a/calendar/lightning/Makefile.in
+++ b/calendar/lightning/Makefile.in
@@ -53,18 +53,23 @@ XPI_PKGNAME = lightning
 XPI_EM_ID = {e2fda1a4-762b-4020-b5ad-a41df1933103}
 
 STRIP_XPI = 1
 DIST_FILES = install.rdf application.ini
 PREF_JS_EXPORTS = $(srcdir)/content/lightning.js
 
 # Lighting version number
 LIGHTNING_VERSION := $(shell cat $(srcdir)/../sunbird/config/version.txt)
+ifdef MOZILLA_2_0_BRANCH
+THUNDERBIRD_VERSION := $(shell cat $(topsrcdir)/mail/config/version-20.txt)
+SEAMONKEY_VERSION := $(shell cat $(topsrcdir)/suite/config/version-20.txt)
+else
 THUNDERBIRD_VERSION := $(shell cat $(topsrcdir)/mail/config/version.txt)
 SEAMONKEY_VERSION := $(shell cat $(topsrcdir)/suite/config/version.txt)
+endif
 
 ifneq (,$(findstring pre,$(LIGHTNING_VERSION)))
 DEFINES += -DLIGHTNING_PRERELEASE_VERSION=1
 endif
 
 # Gecko milestone
 GRE_MILESTONE = $(shell $(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build Milestone)
 ifdef GRE_MILESTONE
--- a/calendar/providers/gdata/Makefile.in
+++ b/calendar/providers/gdata/Makefile.in
@@ -45,18 +45,23 @@ MODULE = gdata-provider
 
 export USE_EXTENSION_MANIFEST = 1
 export XPI_NAME = gdata-provider
 DIST_FILES = install.rdf
 XPI_PKGNAME = gdata-provider
 STRIP_XPI = 1
 
 CALENDAR_VERSION := $(shell cat $(topsrcdir)/calendar/sunbird/config/version.txt)
+ifdef MOZILLA_2_0_BRANCH
+THUNDERBIRD_VERSION := $(shell cat $(topsrcdir)/mail/config/version-20.txt)
+SEAMONKEY_VERSION := $(shell cat $(topsrcdir)/suite/config/version-20.txt)
+else
 THUNDERBIRD_VERSION := $(shell cat $(topsrcdir)/mail/config/version.txt)
 SEAMONKEY_VERSION := $(shell cat $(topsrcdir)/suite/config/version.txt)
+endif
 DEFINES += -DAB_CD=$(AB_CD) \
            -DCALENDAR_VERSION=$(CALENDAR_VERSION) \
            -DSEAMONKEY_VERSION=$(SEAMONKEY_VERSION) \
            -DTHUNDERBIRD_VERSION=$(THUNDERBIRD_VERSION) \
            -DCOMM_BUILD=$(COMM_BUILD) \
            $(NULL)
 
 PREF_JS_EXPORTS = $(srcdir)/defaults/preferences.js
--- a/calendar/timezones/Makefile.in
+++ b/calendar/timezones/Makefile.in
@@ -72,18 +72,23 @@ PREF_JS_EXPORTS = $(srcdir)/defaults/pre
 DIRS = locales
 
 ifndef DISABLE_LIGHTNING_INSTALL
 # install as a global extension in dist/bin/extensions/
 INSTALL_EXTENSION_ID = calendar-timezones@mozilla.org
 endif
 
 CALENDAR_VERSION := $(shell cat $(topsrcdir)/calendar/sunbird/config/version.txt)
+ifdef MOZILLA_2_0_BRANCH
+THUNDERBIRD_VERSION := $(shell cat $(topsrcdir)/mail/config/version-20.txt)
+SEAMONKEY_VERSION := $(shell cat $(topsrcdir)/suite/config/version-20.txt)
+else
 THUNDERBIRD_VERSION := $(shell cat $(topsrcdir)/mail/config/version.txt)
 SEAMONKEY_VERSION := $(shell cat $(topsrcdir)/suite/config/version.txt)
+endif
 TIMEZONES_VERSION := $(shell cat $(srcdir)/config/version.txt)
 
 DEFINES += -DAB_CD=$(AB_CD) \
            -DTHUNDERBIRD_VERSION=$(THUNDERBIRD_VERSION) \
            -DSEAMONKEY_VERSION=$(SEAMONKEY_VERSION) \
            -DCALENDAR_VERSION=$(CALENDAR_VERSION) \
            -DTIMEZONES_VERSION=$(TIMEZONES_VERSION) \
            $(NULL)
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -39,16 +39,17 @@
 # A netscape style .mk file for autoconf builds
 
 INCLUDED_AUTOCONF_MK = 1
 USE_AUTOCONF 	= 1
 MOZILLA_CLIENT	= 1
 COMM_BUILD = @COMM_BUILD@
 MOZILLA_SRCDIR = $(topsrcdir)/mozilla
 MOZILLA_VERSION = @MOZILLA_VERSION@
+MOZILLA_2_0_BRANCH = @MOZILLA_2_0_BRANCH@
 
 THUNDERBIRD_VERSION	= @THUNDERBIRD_VERSION@
 SUNBIRD_VERSION = @SUNBIRD_VERSION@
 SEAMONKEY_VERSION	= @SEAMONKEY_VERSION@
 
 MOZ_BUILD_APP = @MOZ_BUILD_APP@
 MOZ_APP_NAME	= @MOZ_APP_NAME@
 MOZ_APP_DISPLAYNAME = @MOZ_APP_DISPLAYNAME@
--- a/configure.in
+++ b/configure.in
@@ -77,16 +77,31 @@ TARGET_OS="${target_os}"
 dnl comm-central-specific options
 dnl (MOZILLA_SRCDIR would fit here, but is needed to find autoconf tools)
 COMM_BUILD=1
 AC_SUBST(COMM_BUILD)
 dnl export this, so the var is set for mozilla/configure
 MOZCONFIG=`$_AUTOCONF_TOOLS_DIR/mozconfig-find $topsrcdir`
 export MOZCONFIG
 
+dnl Get mozilla version from central milestone file
+MOZILLA_VERSION=`$PERL $MOZILLA_SRCDIR/config/milestone.pl -topsrcdir $MOZILLA_SRCDIR`
+
+changequote(,)
+MOZILLA_BRANCH_VERSION=`echo ${MOZILLA_VERSION} | sed -e 's/^\([0-9]\.[0-9]\).*/\1/;'`
+changequote([,])
+
+dnl Set the Gecko 2.0 branch version.
+MOZILLA_2_0_BRANCH=
+if test "$MOZILLA_BRANCH_VERSION" = "2.0"; then
+    MOZILLA_2_0_BRANCH=1
+    AC_DEFINE(MOZILLA_2_0_BRANCH)
+fi
+AC_SUBST(MOZILLA_2_0_BRANCH)
+
 MOZ_DEB_TIMESTAMP=`date +"%a, %d  %b %Y %T %z"   2>&1` 
 AC_SUBST(MOZ_DEB_TIMESTAMP)
 
 dnl ========================================================
 dnl =
 dnl = Don't change the following two lines.  Doing so breaks:
 dnl =
 dnl = CFLAGS="-foo" ./configure
copy from mail/config/version.txt
copy to mail/config/version-20.txt
--- a/mail/confvars.sh
+++ b/mail/confvars.sh
@@ -47,19 +47,29 @@ if [ "$COMM_BUILD" ]; then
   MOZ_LDAP_XPCOM=1
 fi
 MOZ_STATIC_MAIL_BUILD=1
 MOZ_COMPOSER=1
 MOZ_SAFE_BROWSING=1
 MOZ_MORK=1
 MOZ_IPC=
 MOZ_STATIC_BUILD_UNSUPPORTED=1
-
-MOZ_APP_VERSION_TXT=${_topsrcdir}/$MOZ_BUILD_APP/config/version.txt
-MOZ_BRANDING_DIRECTORY=mail/branding/nightly
-
-MOZ_APP_VERSION=`cat $MOZ_APP_VERSION_TXT`
-
-THUNDERBIRD_VERSION=$MOZ_APP_VERSION
-MOZ_OFFICIAL_BRANDING_DIRECTORY=other-licenses/branding/thunderbird
 MOZ_APP_COMPONENT_LIBS="mail msgsmime import xpautocomplete mailcomps $LDAP_COMPONENT"
 MOZ_APP_EXTRA_LIBS="$LDAP_LIBS"
 MOZ_APP_COMPONENT_INCLUDE=nsMailComponents.h
+
+# Needed for the mozilla-central build side of the system.
+# Can be dropped when we branch MOZILLA_2_0_BRANCH
+MOZILLA_BRANCH_VERSION=`echo ${MOZILLA_VERSION} | sed -e 's/^\([0-9]\.[0-9]\).*/\1/;'`
+
+if test "$MOZILLA_BRANCH_VERSION" = "2.0"; then
+  MOZ_APP_VERSION_TXT=${_topsrcdir}/$MOZ_BUILD_APP/config/version-20.txt
+  # Use unofficial branding for the 2.0 branch
+  MOZ_BRANDING_DIRECTORY=mail/branding/unofficial
+else
+  MOZ_APP_VERSION_TXT=${_topsrcdir}/$MOZ_BUILD_APP/config/version.txt
+  MOZ_BRANDING_DIRECTORY=mail/branding/nightly
+fi
+
+MOZ_APP_VERSION=`cat $MOZ_APP_VERSION_TXT`
+THUNDERBIRD_VERSION=$MOZ_APP_VERSION
+
+MOZ_OFFICIAL_BRANDING_DIRECTORY=other-licenses/branding/thunderbird
copy from suite/config/version.txt
copy to suite/config/version-20.txt
--- a/suite/confvars.sh
+++ b/suite/confvars.sh
@@ -41,22 +41,32 @@ MOZ_APP_DISPLAYNAME=SeaMonkey
 MOZ_MAIL_NEWS=1
 if [ "$COMM_BUILD" ]; then
   MOZ_LDAP_XPCOM=1
 fi
 MOZ_STATIC_MAIL_BUILD=1
 MOZ_CHROME_FILE_FORMAT=omni
 MOZ_COMPOSER=1
 MOZ_SUITE=1
-MOZ_APP_VERSION=`cat ${_topsrcdir}/$MOZ_BUILD_APP/config/version.txt`
-SEAMONKEY_VERSION=$MOZ_APP_VERSION
 MOZ_BRANDING_DIRECTORY=suite/branding/nightly
 MOZ_OFFICIAL_BRANDING_DIRECTORY=suite/branding/nightly
 MOZ_EXTENSIONS_DEFAULT=" venkman inspector irc gnomevfs"
 MOZ_UPDATER=1
 MOZ_HELP_VIEWER=1
 MOZ_MORK=1
 MOZ_STATIC_BUILD_UNSUPPORTED=1
 MOZ_APP_COMPONENT_LIBS="mail msgsmime import xpautocomplete $LDAP_COMPONENT"
 MOZ_APP_EXTRA_LIBS="$LDAP_LIBS"
 MOZ_APP_COMPONENT_INCLUDE=nsSuiteComponents.h
 MOZ_SERVICES_SYNC=1
 
+# Needed for the mozilla-central build side of the system.
+# Can be dropped when we branch MOZILLA_2_0_BRANCH
+MOZILLA_BRANCH_VERSION=`echo ${MOZILLA_VERSION} | sed -e 's/^\([0-9]\.[0-9]\).*/\1/;'`
+
+if test "$MOZILLA_BRANCH_VERSION" = "2.0"; then
+  MOZ_APP_VERSION_TXT=${_topsrcdir}/$MOZ_BUILD_APP/config/version-20.txt
+else
+  MOZ_APP_VERSION_TXT=${_topsrcdir}/$MOZ_BUILD_APP/config/version.txt
+fi
+
+MOZ_APP_VERSION=`cat $MOZ_APP_VERSION_TXT`
+SEAMONKEY_VERSION=$MOZ_APP_VERSION