Bug 882968 - Clean up and move DEFINES and friends to moz.build in comm-central - Part 4 v2: suite/ files r=callek for a CLOSED TREE
authorIan Neal <iann_cvs@blueyonder.co.uk>
Wed, 03 Sep 2014 22:34:02 +0100
changeset 20917 7f8be51ebb195bb4380bae2b882b043aa18590ea
parent 20916 77c907e1b6bac0df293ad03cd8d96ed52c048957
child 20918 f1a862465033dc9e49c8dbfd483d121224cc0025
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)
reviewerscallek
bugs882968
Bug 882968 - Clean up and move DEFINES and friends to moz.build in comm-central - Part 4 v2: suite/ files r=callek for a CLOSED TREE
suite/app/Makefile.in
suite/app/moz.build
suite/browser/Makefile.in
suite/browser/moz.build
suite/common/Makefile.in
suite/common/moz.build
suite/locales/Makefile.in
suite/locales/moz.build
suite/themes/classic/Makefile.in
suite/themes/classic/moz.build
suite/themes/modern/Makefile.in
suite/themes/modern/moz.build
--- a/suite/app/Makefile.in
+++ b/suite/app/Makefile.in
@@ -9,27 +9,23 @@ VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 AB_CD = $(MOZ_UI_LOCALE) 
 
 DEFINES += \
 	-DSEAMONKEY_ICO=\"$(DIST)/branding/seamonkey.ico\" \
 	-DHTML_FILE_ICO=\"$(DIST)/branding/html-file.ico\" \
-	-DAPP_VERSION="$(MOZ_APP_VERSION)" \
-	-DNO_BLOCKLIST_CRASHREPORTER \
 	$(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/suite/app/moz.build
+++ b/suite/app/moz.build
@@ -12,16 +12,18 @@ if not CONFIG['LIBXUL_SDK']:
         '/mozilla/xpcom/build',
     ]
     GENERATED_INCLUDES += ['/build']
 
     USE_LIBS += [
         'xpcomglue',
     ]
 
+    DEFINES['XPCOM_GLUE'] = True
+
     if CONFIG['OS_ARCH'] == 'WINNT':
         RCINCLUDE = 'splash.rc'
         DEFINES['MOZ_SUITE'] = 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']
@@ -35,9 +37,11 @@ if not CONFIG['LIBXUL_SDK']:
     #
     # Set it to 256k.  See bug 127069.
     if CONFIG['OS_ARCH'] == 'WINNT' and not CONFIG['GNU_CC']:
         LDFLAGS += ['/HEAP:0x40000']
 
     if CONFIG['MOZ_LINKER']:
         OS_LIBS += CONFIG['MOZ_ZLIB_LIBS']
 
+DEFINES['APP_VERSION'] = CONFIG['MOZ_APP_VERSION']
+
 DISABLE_STL_WRAPPING = True
--- a/suite/browser/Makefile.in
+++ b/suite/browser/Makefile.in
@@ -15,24 +15,15 @@ PREF_JS_EXPORTS = \
 	$(NULL)
 
 ifdef LIBXUL_SDK
 PREF_JS_EXPORTS += \
 	$(srcdir)/channel-prefs.js
 	$(NULL)
 endif
 
-DEFINES += -DMOZ_APP_NAME="$(MOZ_APP_NAME)" \
-           -DMOZ_APP_DISPLAYNAME="$(MOZ_APP_DISPLAYNAME)" \
-           -DMOZ_APP_VERSION="$(MOZ_APP_VERSION)" \
-           $(NULL)
-
-ifdef MOZILLA_OFFICIAL
-DEFINES += -DOFFICIAL_BUILD=1
-endif
-
 include $(topsrcdir)/config/rules.mk
 
 ifndef LIBXUL_SDK
 # channel-prefs.js is handled separate from other prefs due to bug 756325.
 libs:: $(srcdir)/channel-prefs.js
 	$(call py_action,preprocessor,$(PREF_PPFLAGS) $(ACDEFINES) $^ -o $(DIST)/bin/defaults/pref/channel-prefs.js)
 endif
--- a/suite/browser/moz.build
+++ b/suite/browser/moz.build
@@ -7,8 +7,14 @@ TEST_DIRS += ['test']
 
 EXTRA_COMPONENTS += [
     'nsBrowserContentHandler.js',
     'nsTypeAheadFind.js',
     'SuiteBrowser.manifest',
 ]
 
 JAR_MANIFESTS += ['jar.mn']
+
+for var in ('MOZ_APP_NAME', 'MOZ_APP_DISPLAYNAME', 'MOZ_APP_VERSION'):
+    DEFINES[var] = '"%s"' % CONFIG[var]
+
+if CONFIG['MOZILLA_OFFICIAL']:
+    DEFINES['OFFICIAL_BUILD'] = 1
deleted file mode 100644
--- a/suite/common/Makefile.in
+++ /dev/null
@@ -1,24 +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
-
-abs_srcdir = $(abspath $(srcdir))
-
-# DEFINES for preprocessing
-# Use suite/common/app-license.html as input when generating 
-# chrome://content/communicator/license.html to override 
-# chrome://global/content/license.html (about:license)
-DEFINES += -DAPP_LICENSE_BLOCK=$(abs_srcdir)/app-license.html \
-           -DMOZ_APP_VERSION=$(MOZ_APP_VERSION) \
-           -DMOZ_MACBUNDLE_NAME=$(MOZ_MACBUNDLE_NAME) \
-           $(NULL)
-
--- a/suite/common/moz.build
+++ b/suite/common/moz.build
@@ -11,8 +11,17 @@ DIRS += [
 TEST_DIRS += [
     'tests',
     'dataman/tests',
     'downloads/tests',
     'places/tests',
 ]
 
 JAR_MANIFESTS += ['jar.mn']
+
+# DEFINES for preprocessing
+# Use suite/common/app-license.html as input when generating 
+# chrome://content/communicator/license.html to override 
+# chrome://global/content/license.html (about:license)
+DEFINES['APP_LICENSE_BLOCK'] = '%s/app-license.html' % SRCDIR
+
+for var in ('MOZ_APP_NAME', 'MOZ_MACBUNDLE_NAME'):
+    DEFINES[var] = CONFIG[var]
--- a/suite/locales/Makefile.in
+++ b/suite/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)
-
 _ABS_SRCDIR := $(abspath $(topsrcdir))
 
 vpath %.xml @srcdir@/en-US/searchplugins
 vpath %.xml $(LOCALE_SRCDIR)/searchplugins
 
 SUBMAKEFILES += \
 	$(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/Makefile \
 	$(NULL)
--- a/suite/locales/moz.build
+++ b/suite/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']
--- a/suite/themes/classic/Makefile.in
+++ b/suite/themes/classic/Makefile.in
@@ -8,19 +8,17 @@ srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 include $(topsrcdir)/config/rules.mk
 
 CLASSIC_EXTENSION_DIR = {972ce4c6-7e08-4474-a285-3208198ce6fd}
 
-DEFINES += -DSEAMONKEY_VERSION=$(SEAMONKEY_VERSION)
-
 FILES = \
 	$(srcdir)/chrome.manifest \
 	$(srcdir)/icon.png \
 	$(srcdir)/preview.png \
 	$(NULL)
 
 libs::
-	$(INSTALL) $(FILES) $(DIST)/bin/extensions/$(CLASSIC_EXTENSION_DIR)
+	$(INSTALL) $(FILES) $(DIST)/bin/extensions/$(CLASSIC_EXTENSION_DIR)
 	$(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) $(srcdir)/install.rdf -o $(DIST)/bin/extensions/$(CLASSIC_EXTENSION_DIR)/install.rdf)
--- a/suite/themes/classic/moz.build
+++ b/suite/themes/classic/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['SEAMONKEY_VERSION'] = CONFIG['SEAMONKEY_VERSION']
--- a/suite/themes/modern/Makefile.in
+++ b/suite/themes/modern/Makefile.in
@@ -7,18 +7,16 @@ DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 USE_EXTENSION_MANIFEST = 1
 
 include $(topsrcdir)/config/config.mk
 
-DEFINES += -DSEAMONKEY_VERSION=$(SEAMONKEY_VERSION)
-
 DIST_FILES = \
 	install.rdf \
 	$(NULL)
 
 FILES = \
 	$(srcdir)/preview.png \
 	$(srcdir)/icon.png \
 	$(NULL)
--- a/suite/themes/modern/moz.build
+++ b/suite/themes/modern/moz.build
@@ -1,8 +1,10 @@
 # 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/.
 
 DIST_SUBDIR = 'extensions/modern@themes.mozilla.org'
 
 JAR_MANIFESTS += ['jar.mn']
+
+DEFINES['SEAMONKEY_VERSION'] = CONFIG['SEAMONKEY_VERSION']