Bug 1309372 - Do not use MOZ_PKG_VERSION when building SeaMonkey. r=ewong a=ewong SEA_COMM490_20160927_RELBRANCH
authorFrank-Rainer Grahl <frgrahl@gmx.net>
Fri, 02 Dec 2016 16:42:44 +0100
branchSEA_COMM490_20160927_RELBRANCH
changeset 31361 e7b567232679c37b3af209864f35e5e94871becd
parent 31356 ed282105babbd19b1d899d5a27500d8ade5680e4
child 31364 2229823cdfa83745335eb45860571daf1f6fce93
push id1
push userclokep@gmail.com
push dateMon, 07 May 2018 22:45:56 +0000
treeherdercomm-esr60@57eacde5ef40 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersewong, ewong
bugs1309372
Bug 1309372 - Do not use MOZ_PKG_VERSION when building SeaMonkey. r=ewong a=ewong SEA_COMM490_20160927_RELBRANCH only
calendar/lightning/Makefile.in
calendar/lightning/versions.mk
calendar/providers/gdata/Makefile.in
--- a/calendar/lightning/Makefile.in
+++ b/calendar/lightning/Makefile.in
@@ -5,37 +5,16 @@
 # Calendar builders currently use STRIP_XPI to reduce the binary component in
 # Lightning.
 
 XPI_PKGNAME = lightning-$(LIGHTNING_VERSION).$(AB_CD).$(MOZ_PKG_PLATFORM)
 XPI_VERSION = $(LIGHTNING_VERSION)
 
 XPI_EM_ID = {e2fda1a4-762b-4020-b5ad-a41df1933103}
 
-# Lighting version number
-THUNDERBIRD_VERSION := $(shell cat $(topsrcdir)/mail/config/version.txt)
-SEAMONKEY_VERSION := $(shell cat $(topsrcdir)/suite/config/version.txt)
-LIGHTNING_VERSION := $(shell $(PYTHON) $(srcdir)/build/makeversion.py $(word 1,$(MOZ_PKG_VERSION) $(THUNDERBIRD_VERSION)))
-GDATA_VERSION := $(shell $(PYTHON) $(topsrcdir)/calendar/providers/gdata/makeversion.py $(LIGHTNING_VERSION))
-
-# For extensions we require a max version that is compatible across security releases.
-# THUNDERBIRD_MAXVERSION and SEAMONKEY_MAXVERSION is our method for doing that.
-# Alpha versions 10.0a1 and 10.0a2 aren't affected
-# For Seamonkey, 2.17 becomes 2.17.*, 2.17.1 becomes 2.17.*
-# For Thunderbird, 10.0 becomes 10.*, 10.0.1 becomes 10.*
-THUNDERBIRD_MAXVERSION := $(THUNDERBIRD_VERSION)
-ifneq (a,$(findstring a,$(THUNDERBIRD_VERSION)))
-THUNDERBIRD_MAXVERSION := $(shell echo $(THUNDERBIRD_VERSION) | sed 's|\(^[0-9]*\)\.\([0-9]*\).*|\1|' ).*
-endif
-
-SEAMONKEY_MAXVERSION := $(SEAMONKEY_VERSION)
-ifneq (a,$(findstring a,$(SEAMONKEY_VERSION)))
-SEAMONKEY_MAXVERSION := $(shell echo $(SEAMONKEY_VERSION) | sed 's|\(^[0-9]*.[0-9]*\).*|\1|' ).*
-endif
-
 ifneq (,$(findstring a,$(LIGHTNING_VERSION)))
 DEFINES += -DLIGHTNING_PRERELEASE_VERSION=1
 endif
 
 # Enable nightly updates on aurora and nightly channel
 ifeq (nightly,$(subst aurora,nightly,$(MOZ_UPDATE_CHANNEL)))
 DEFINES += -DLIGHTNING_UPDATE_LOCATION=https://calendar.mozilla.org/update.php
 endif
@@ -86,16 +65,17 @@ DEFINES += -DTHUNDERBIRD_VERSION=$(THUND
            -DTARGET_PLATFORM=$(OS_TARGET)_$(TARGET_XPCOM_ABI) \
            -DXPI_EM_ID="$(XPI_EM_ID)" \
            $(NULL)
 
 MOZ_BUILDID = $(shell $(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py $(DIST)/bin/application.ini App BuildID)
 DEFINES += -DMOZ_BUILDID=$(MOZ_BUILDID)
 
 include $(topsrcdir)/config/rules.mk
+include $(srcdir)/versions.mk
 include $(srcdir)/lightning-packager.mk
 include $(srcdir)/lightning-tests.mk
 
 # For Lightning, we also need to preprocess the l10n prefs. Pull in the en-US
 # copy if the files doesn't exist.
 repack-process-extrafiles: lightning-extrafiles
 lightning-extrafiles: LTN_ABCD_L10NJS=$(call EXPAND_LOCALE_SRCDIR,calendar/locales)/lightning-l10n.js
 lightning-extrafiles: LTN_ANY_L10NJS=$(if $(wildcard $(LTN_ABCD_L10NJS)),$(LTN_ABCD_L10NJS),$(topsrcdir)/calendar/locales/en-US/lightning-l10n.js)
new file mode 100644
--- /dev/null
+++ b/calendar/lightning/versions.mk
@@ -0,0 +1,30 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+# Lighting version number
+THUNDERBIRD_VERSION := $(shell cat $(topsrcdir)/mail/config/version.txt)
+SEAMONKEY_VERSION := $(shell cat $(topsrcdir)/suite/config/version.txt)
+
+ifdef MOZ_SUITE
+LIGHTNING_VERSION := $(shell $(PYTHON) $(topsrcdir)/calendar/lightning/build/makeversion.py $(THUNDERBIRD_VERSION))
+else
+LIGHTNING_VERSION := $(shell $(PYTHON) $(topsrcdir)/calendar/lightning/build/makeversion.py $(word 1,$(MOZ_PKG_VERSION) $(THUNDERBIRD_VERSION)))
+endif
+
+GDATA_VERSION := $(shell $(PYTHON) $(topsrcdir)/calendar/providers/gdata/makeversion.py $(LIGHTNING_VERSION))
+
+# For extensions we require a max version that is compatible across security releases.
+# THUNDERBIRD_MAXVERSION and SEAMONKEY_MAXVERSION is our method for doing that.
+# Alpha versions 10.0a1 and 10.0a2 aren't affected
+# For Seamonkey, 2.17 becomes 2.17.*, 2.17.1 becomes 2.17.*
+# For Thunderbird, 10.0 becomes 10.*, 10.0.1 becomes 10.*
+THUNDERBIRD_MAXVERSION := $(THUNDERBIRD_VERSION)
+ifneq (a,$(findstring a,$(THUNDERBIRD_VERSION)))
+THUNDERBIRD_MAXVERSION := $(shell echo $(THUNDERBIRD_VERSION) | sed 's|\(^[0-9]*\)\.\([0-9]*\).*|\1|' ).*
+endif
+
+SEAMONKEY_MAXVERSION := $(SEAMONKEY_VERSION)
+ifneq (a,$(findstring a,$(SEAMONKEY_VERSION)))
+SEAMONKEY_MAXVERSION := $(shell echo $(SEAMONKEY_VERSION) | sed 's|\(^[0-9]*.[0-9]*\).*|\1|' ).*
+endif
--- a/calendar/providers/gdata/Makefile.in
+++ b/calendar/providers/gdata/Makefile.in
@@ -3,21 +3,16 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 XPI_PKGNAME = gdata-provider-$(GDATA_VERSION).$(AB_CD).$(MOZ_PKG_PLATFORM)
 XPI_VERSION = $(GDATA_VERSION)
 XPI_NO_UNIVERSAL = 1
 XPI_EM_ID = {a62ef8ec-5fdc-40c2-873c-223b8a6925cc}
 XPI_INSTALL_EXTENSION = $(XPI_EM_ID)
 
-THUNDERBIRD_VERSION := $(shell cat $(topsrcdir)/mail/config/version.txt)
-SEAMONKEY_VERSION := $(shell cat $(topsrcdir)/suite/config/version.txt)
-LIGHTNING_VERSION := $(shell $(PYTHON) $(topsrcdir)/calendar/lightning/build/makeversion.py $(word 1,$(MOZ_PKG_VERSION) $(THUNDERBIRD_VERSION)))
-GDATA_VERSION = $(shell $(PYTHON) $(srcdir)/makeversion.py $(LIGHTNING_VERSION))
-
 DEFINES += -DLIGHTNING_VERSION=$(LIGHTNING_VERSION) \
            -DSEAMONKEY_VERSION=$(SEAMONKEY_VERSION) \
            -DTHUNDERBIRD_VERSION=$(THUNDERBIRD_VERSION) \
            -DCOMM_BUILD=$(COMM_BUILD) \
            -DGDATA_VERSION=$(GDATA_VERSION) \
            $(NULL)
 
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
@@ -30,9 +25,10 @@ endif
 # stage the extension for use in packaged tests
 PKG_STAGE = $(DIST)/test-stage
 
 stage-package:
 	$(NSINSTALL) -D $(PKG_STAGE)/extensions/$(XPI_EM_ID)
 	(cd $(FINAL_TARGET) && tar $(TAR_CREATE_FLAGS) - *) | (cd $(PKG_STAGE)/extensions/$(XPI_EM_ID) && tar -xf -)
 
 include $(topsrcdir)/config/rules.mk
+include $(topsrcdir)/calendar/lightning/versions.mk
 include $(topsrcdir)/calendar/lightning/lightning-packager.mk