Bug 882968 - Clean up and move DEFINES and friends to moz.build in comm-central - Part 3 v2: mail/ files r=cranmer for a CLOSED TREE
authorIan Neal <iann_cvs@blueyonder.co.uk>
Sun, 07 Sep 2014 17:58:59 +0100
changeset 20929 91c36d25d1130cf5fd72d89fb7070b3d7a3217f1
parent 20928 4ec1bfcdda824ea2fc3a487379128f287b426503
child 20930 a8b23b49d30ff867b802dc8081961a63cf033a8e
push id1259
push usermbanner@mozilla.com
push dateFri, 28 Nov 2014 16:21:42 +0000
treeherdercomm-beta@219e12aa22c1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscranmer
bugs882968
Bug 882968 - Clean up and move DEFINES and friends to moz.build in comm-central - Part 3 v2: mail/ files r=cranmer for a CLOSED TREE
mail/app/Makefile.in
mail/app/moz.build
mail/base/Makefile.in
mail/base/moz.build
mail/branding/aurora/locales/Makefile.in
mail/branding/aurora/locales/moz.build
mail/branding/nightly/locales/Makefile.in
mail/branding/nightly/locales/moz.build
mail/components/preferences/Makefile.in
mail/components/preferences/moz.build
mail/components/shell/Makefile.in
mail/components/shell/moz.build
mail/locales/Makefile.in
mail/locales/moz.build
--- a/mail/app/Makefile.in
+++ b/mail/app/Makefile.in
@@ -19,40 +19,33 @@ ifdef MOZ_SOURCE_STAMP
 DEFINES += -DMOZ_SOURCE_STAMP="$(MOZ_SOURCE_STAMP)"
 endif
 
 SOURCE_REPO := $(shell hg -R $(topsrcdir) showconfig paths.default 2>/dev/null | sed -e "s/^ssh:/http:/")
 ifdef SOURCE_REPO
 DEFINES += -DMOZ_SOURCE_REPO="$(SOURCE_REPO)"
 endif
 
-ifdef MOZILLA_OFFICIAL
-DEFINES += -DMOZILLA_OFFICIAL
-endif
-
 PREF_JS_EXPORTS = \
     $(srcdir)/profile/all-thunderbird.js \
     $(srcdir)/profile/channel-prefs.js \
     $(NULL)
 
 DEFINES += \
   -DAB_CD=$(AB_CD) \
-  -DAPP_VERSION="$(MOZ_APP_VERSION)" \
   -DTHUNDERBIRD_ICO='"$(DIST)/branding/thunderbird.ico"' \
   -DGRE_MILESTONE=$(GRE_MILESTONE) \
   -DGRE_BUILDID=$(GRE_BUILDID) \
    $(NULL)
 
 ifdef LIBXUL_SDK
 include $(topsrcdir)/config/rules.mk
 else
 # Build a binary bootstrapping with XRE_main
 
-DEFINES += -DXPCOM_GLUE
-
 ifndef MOZ_WINCONSOLE
 ifdef MOZ_DEBUG
 MOZ_WINCONSOLE = 1
 else
 MOZ_WINCONSOLE = 0
 endif
 endif
 
--- a/mail/app/moz.build
+++ b/mail/app/moz.build
@@ -18,16 +18,18 @@ if not CONFIG['LIBXUL_SDK']:
         '/mozilla/xpcom/build',
     ]
 
     DELAYLOAD_DLLS += [
         'mozglue.dll',
     ]
     USE_STATIC_LIBS = True    
 
+    DEFINES['XPCOM_GLUE'] = True
+
     if CONFIG['OS_ARCH'] == 'WINNT':
         RCINCLUDE = 'splash.rc'
         DEFINES['MOZ_THUNDERBIRD'] = True
 
     if CONFIG['_MSC_VER']:
         # Always enter a Windows program through wmain, whether or not we're
         # a console application.
         WIN32_EXE_LDFLAGS += ['-ENTRY:wmainCRTStartup']
@@ -51,9 +53,14 @@ if not CONFIG['LIBXUL_SDK']:
     else:
         USE_LIBS += [
             'xpcomglue',
         ]
 
     if CONFIG['MOZ_LINKER']:
         OS_LIBS += CONFIG['MOZ_ZLIB_LIBS']
 
+DEFINES['APP_VERSION'] = CONFIG['MOZ_APP_VERSION']
+
+if CONFIG['MOZILLA_OFFICIAL']:
+    DEFINES['MOZILLA_OFFICIAL'] = True
+
 DISABLE_STL_WRAPPING = True
deleted file mode 100644
--- a/mail/base/Makefile.in
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# 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/.
-
-DEPTH		= @DEPTH@
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-PRE_RELEASE_SUFFIX := $(shell $(PYTHON) $(topsrcdir)/mozilla/config/printprereleasesuffix.py \
-                      $(MOZ_APP_VERSION))
-
-DEFINES += -DMOZ_APP_VERSION=$(MOZ_APP_VERSION) \
-           -DPRE_RELEASE_SUFFIX=""
-
-ifdef MOZILLA_OFFICIAL
-DEFINES += -DOFFICIAL_BUILD=1
-endif
-
-ifneq (,$(filter windows gtk2 cocoa, $(MOZ_WIDGET_TOOLKIT)))
-DEFINES += -DHAVE_SHELL_SERVICE=1
-endif
-
-ifdef MOZ_UPDATER
-DEFINES += -DMOZ_UPDATER=1
-endif
-
-ifneq (,$(filter windows cocoa, $(MOZ_WIDGET_TOOLKIT)))
-DEFINES += -DCAN_DRAW_IN_TITLEBAR=1
-endif
-
-abs_srcdir = $(abspath $(srcdir))
-
-CHROME_DEPS += $(abs_srcdir)/content/overrides/app-license.html
-
-DEFINES += -DAPP_LICENSE_BLOCK=$(abs_srcdir)/content/overrides/app-license.html
-
-include $(topsrcdir)/config/rules.mk
-
--- a/mail/base/moz.build
+++ b/mail/base/moz.build
@@ -3,8 +3,24 @@
 # 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/.
 
 DIRS += ['modules']
 
 TEST_DIRS += ['test']
 
 JAR_MANIFESTS += ['jar.mn']
+
+DEFINES['PRE_RELEASE_SUFFIX'] = ''
+DEFINES['MOZ_APP_VERSION'] = CONFIG['MOZ_APP_VERSION']
+DEFINES['APP_LICENSE_BLOCK'] = '%s/content/overrides/app-license.html' % SRCDIR
+
+if CONFIG['MOZILLA_OFFICIAL']:
+    DEFINES['OFFICIAL_BUILD'] = 1
+
+if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk2', 'cocoa'):
+    DEFINES['HAVE_SHELL_SERVICE'] = 1
+
+if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'cocoa'):
+    DEFINES['CAN_DRAW_IN_TITLEBAR'] = 1
+
+if CONFIG['MOZ_UPDATER']:
+    DEFINES['MOZ_UPDATER'] = 1
--- a/mail/branding/aurora/locales/Makefile.in
+++ b/mail/branding/aurora/locales/Makefile.in
@@ -5,11 +5,11 @@
 DEPTH          = @DEPTH@
 topsrcdir      = @top_srcdir@
 srcdir         = @srcdir@
 VPATH          = @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-DEFINES += -DAB_CD=$(AB_CD) -DMOZ_DISTRIBUTION_ID_UNQUOTED=$(MOZ_DISTRIBUTION_ID)
+DEFINES += -DAB_CD=$(AB_CD)
 
 include $(topsrcdir)/config/rules.mk
--- a/mail/branding/aurora/locales/moz.build
+++ b/mail/branding/aurora/locales/moz.build
@@ -1,6 +1,8 @@
 # vim: set filetype=python:
 # 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/.
 
 JAR_MANIFESTS += ['jar.mn']
+
+DEFINES['MOZ_DISTRIBUTION_ID_UNQUOTED'] = CONFIG['MOZ_DISTRIBUTION_ID']
--- a/mail/branding/nightly/locales/Makefile.in
+++ b/mail/branding/nightly/locales/Makefile.in
@@ -5,11 +5,11 @@
 DEPTH          = @DEPTH@
 topsrcdir      = @top_srcdir@
 srcdir         = @srcdir@
 VPATH          = @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-DEFINES += -DAB_CD=$(AB_CD) -DMOZ_DISTRIBUTION_ID_UNQUOTED=$(MOZ_DISTRIBUTION_ID)
+DEFINES += -DAB_CD=$(AB_CD)
 
 include $(topsrcdir)/config/rules.mk
--- a/mail/branding/nightly/locales/moz.build
+++ b/mail/branding/nightly/locales/moz.build
@@ -1,6 +1,8 @@
 # vim: set filetype=python:
 # 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/.
 
 JAR_MANIFESTS += ['jar.mn']
+
+DEFINES['MOZ_DISTRIBUTION_ID_UNQUOTED'] = CONFIG['MOZ_DISTRIBUTION_ID']
deleted file mode 100644
--- a/mail/components/preferences/Makefile.in
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# 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/.
-
-DEPTH		= @DEPTH@
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-include $(topsrcdir)/config/rules.mk
-
-DEFINES += -DMOZ_MACBUNDLE_NAME=$(MOZ_MACBUNDLE_NAME)
-
-ifneq (,$(filter windows gtk2 cocoa, $(MOZ_WIDGET_TOOLKIT)))
-DEFINES += -DHAVE_SHELL_SERVICE=1
-endif
-
-ifdef MOZ_UPDATER
-DEFINES += -DMOZ_UPDATER=1
-endif
--- a/mail/components/preferences/moz.build
+++ b/mail/components/preferences/moz.build
@@ -1,6 +1,14 @@
 # vim: set filetype=python:
 # 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/.
 
 JAR_MANIFESTS += ['jar.mn']
+
+DEFINES['MOZ_MACBUNDLE_NAME'] = CONFIG['MOZ_MACBUNDLE_NAME']
+
+if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk2', 'cocoa'):
+    DEFINES['HAVE_SHELL_SERVICE'] = 1
+
+if CONFIG['MOZ_UPDATER']:
+    DEFINES['MOZ_UPDATER'] = 1
deleted file mode 100644
--- a/mail/components/shell/Makefile.in
+++ /dev/null
@@ -1,14 +0,0 @@
-# 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/.
-
-DEPTH		= @DEPTH@
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-DEFINES += -DMOZ_APP_NAME=\"$(MOZ_APP_NAME)\"
-
-include $(topsrcdir)/config/rules.mk
--- a/mail/components/shell/moz.build
+++ b/mail/components/shell/moz.build
@@ -4,16 +4,18 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += ['public']
 
 SOURCES += [
     'DirectoryProvider.cpp',
 ]
 
+DEFINES['MOZ_APP_NAME'] = '"%s"' % CONFIG['MOZ_APP_NAME']
+
 if CONFIG['OS_ARCH'] == 'WINNT':
     SOURCES += ['nsMailWinIntegration.cpp']
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk2':
     SOURCES += ['nsMailGNOMEIntegration.cpp']
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     SOURCES += ['nsMailMacIntegration.cpp']
--- a/mail/locales/Makefile.in
+++ b/mail/locales/Makefile.in
@@ -7,18 +7,16 @@ topsrcdir       = @top_srcdir@
 srcdir          = @srcdir@
 VPATH           = @srcdir@
 relativesrcdir  = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 include $(topsrcdir)/config/config.mk
 
-DEFINES += -DMOZ_APP_MAXVERSION=$(MOZ_APP_MAXVERSION)
-
 vpath %.xml @srcdir@/en-US/searchplugins
 vpath %.xml $(LOCALE_SRCDIR)/searchplugins
 
 _ABS_SRCDIR := $(abspath $(topsrcdir))
 
 SUBMAKEFILES += \
 	$(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/Makefile \
 	$(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales/Makefile \
--- a/mail/locales/moz.build
+++ b/mail/locales/moz.build
@@ -1,6 +1,8 @@
 # vim: set filetype=python:
 # 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/.
 
 JAR_MANIFESTS += ['jar.mn']
+
+DEFINES['MOZ_APP_MAXVERSION'] = CONFIG['MOZ_APP_MAXVERSION']