imported patch mozbuild-defines
authorJoshua Cranmer <Pidgeot18@gmail.com>
Sun, 26 May 2013 18:48:09 -0500
changeset 17802 71b3e6397e98c7be2ae5938789218816f73fc07e
parent 17801 9d9df31631b8ce8cc4c5566ab1f552c143c0d302
child 17803 45dd3cb96b98418f303f0c89b8f39d547d391645
push id778
push userPidgeot18@gmail.com
push dateMon, 27 May 2013 01:27:57 +0000
treeherdertry-comm-central@6f1896b14429 [default view] [failures only]
imported patch mozbuild-defines
calendar/base/Makefile.in
calendar/base/backend/icaljs/Makefile.in
calendar/base/backend/icaljs/moz.build
calendar/base/backend/libical/build/Makefile.in
calendar/base/backend/libical/build/moz.build
calendar/base/moz.build
calendar/installer/Makefile.in
calendar/installer/moz.build
calendar/installer/windows/Makefile.in
calendar/installer/windows/moz.build
calendar/libical/src/libical/Makefile.in
calendar/libical/src/libical/moz.build
calendar/lightning/Makefile.in
calendar/lightning/locales/Makefile.in
calendar/lightning/locales/moz.build
calendar/lightning/moz.build
calendar/locales/Makefile.in
calendar/locales/moz.build
calendar/providers/gdata/Makefile.in
calendar/providers/gdata/locales/Makefile.in
calendar/providers/gdata/locales/moz.build
calendar/providers/gdata/moz.build
calendar/resources/Makefile.in
calendar/resources/moz.build
calendar/sunbird/app/Makefile.in
calendar/sunbird/app/moz.build
calendar/sunbird/app/profile/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/Makefile.in
calendar/sunbird/app/profile/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/moz.build
calendar/sunbird/app/profile/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/Makefile.in
calendar/sunbird/app/profile/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/moz.build
calendar/sunbird/base/Makefile.in
calendar/sunbird/base/moz.build
calendar/sunbird/branding/nightly/locales/Makefile.in
calendar/sunbird/branding/nightly/locales/moz.build
calendar/sunbird/locales/Makefile.in
calendar/sunbird/locales/moz.build
calendar/timezones/Makefile.in
calendar/timezones/locales/Makefile.in
calendar/timezones/locales/moz.build
calendar/timezones/moz.build
chat/locales/Makefile.in
chat/locales/moz.build
editor/ui/locales/Makefile.in
editor/ui/locales/moz.build
mail/app/Makefile.in
mail/app/moz.build
mail/app/profile/extensions/Makefile.in
mail/app/profile/extensions/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/installer/Makefile.in
mail/installer/moz.build
mail/installer/windows/Makefile.in
mail/installer/windows/moz.build
mail/locales/Makefile.in
mail/locales/moz.build
mail/themes/Makefile.in
mail/themes/moz.build
mailnews/Makefile.in
mailnews/base/util/Makefile.in
mailnews/base/util/moz.build
mailnews/mapi/mapiDll/Makefile.in
mailnews/mapi/mapiDll/moz.build
mailnews/mapi/mapihook/build/Makefile.in
mailnews/mapi/mapihook/build/moz.build
mailnews/mapi/mapihook/src/Makefile.in
mailnews/mapi/mapihook/src/moz.build
mailnews/moz.build
other-licenses/branding/sunbird/locales/Makefile.in
other-licenses/branding/sunbird/locales/moz.build
other-licenses/branding/thunderbird/locales/Makefile.in
other-licenses/branding/thunderbird/locales/moz.build
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/debugQA/locales/Makefile.in
suite/debugQA/locales/moz.build
suite/installer/Makefile.in
suite/installer/moz.build
suite/installer/windows/Makefile.in
suite/installer/windows/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/calendar/base/Makefile.in
+++ b/calendar/base/Makefile.in
@@ -26,18 +26,16 @@ endif
 WINDOW_ICONS = calendar-alarm-dialog \
                calendar-event-dialog \
                calendar-event-summary-dialog \
                calendar-task-dialog \
                calendar-task-summary-dialog \
                $(NULL)
 
 
-DEFINES += -DTHEME=$(THEME)
-
 include $(topsrcdir)/config/rules.mk
 
 # Window icons are not needed on mac
 ifneq (,$(filter windows os2 gtk gtk2,$(MOZ_WIDGET_TOOLKIT)))
 
 # Set up the icon suffix to differ between windows and linux
 ifneq (,$(filter windows os2,$(MOZ_WIDGET_TOOLKIT)))
 ICON_SUFFIX = .ico
--- a/calendar/base/backend/icaljs/Makefile.in
+++ b/calendar/base/backend/icaljs/Makefile.in
@@ -7,17 +7,16 @@ topsrcdir = @top_srcdir@
 srcdir = @srcdir@
 VPATH = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 NO_COMPONENTS_MANIFEST = 1
 EXTRA_COMPONENTS = calICALJSComponents.js
 BACKEND_MANIFESTS = icaljs.manifest
-DEFINES += -DXPIDL_MODULE=$(XPIDL_MODULE)
 NO_JS_MANIFEST = 1
 NO_INTERFACES_MANIFEST = 1
 
 EXTRA_SCRIPTS = \
 	calDateTime.js \
 	calDuration.js \
 	calICSService-worker.js \
 	calICSService.js \
--- a/calendar/base/backend/icaljs/moz.build
+++ b/calendar/base/backend/icaljs/moz.build
@@ -3,8 +3,13 @@
 # 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/.
 
 XPIDL_SOURCES += [
     'calIDateTimeJS.idl',
 ]
 
 XPIDL_MODULE = 'caldatetime_icaljs'
+
+DEFINES += [
+    '-DXPIDL_MODULE=$(XPIDL_MODULE)',
+]
+
--- a/calendar/base/backend/libical/build/Makefile.in
+++ b/calendar/base/backend/libical/build/Makefile.in
@@ -53,18 +53,16 @@ EXTRA_DSO_LDOPTS += \
 endif
 
 include $(topsrcdir)/config/rules.mk
 
 # Ensure that we don't embed a manifest referencing the CRT
 EMBED_MANIFEST_AT =
 
 BACKEND_MANIFESTS = libical.manifest
-DEFINES += -DSHARED_LIBRARY=$(SHARED_LIBRARY) -DXPIDL_MODULE=$(XPIDL_MODULE)
-
 libs:: $(BACKEND_MANIFESTS)
 	$(EXIT_ON_ERROR) \
 	$(NSINSTALL) -D $(FINAL_TARGET)/components; \
 	for i in $^; do \
 	  fname=`basename $$i`; \
 	  dest=$(FINAL_TARGET)/components/$${fname}; \
 	  $(RM) -f $$dest; \
 	  $(PYTHON) $(MOZILLA_SRCDIR)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $$i > $$dest; \
--- a/calendar/base/backend/libical/build/moz.build
+++ b/calendar/base/backend/libical/build/moz.build
@@ -1,8 +1,13 @@
 # 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/.
 
 XPIDL_MODULE = 'caldatetime_libical'
 MODULE = 'calbasecomps'
 
+DEFINES += [
+    '-DSHARED_LIBRARY=$(SHARED_LIBRARY)',
+    '-DXPIDL_MODULE=$(XPIDL_MODULE)',
+]
+
--- a/calendar/base/moz.build
+++ b/calendar/base/moz.build
@@ -7,8 +7,12 @@ DIRS = [
     'public',
     'backend',
     'src',
     'modules',
 ]
 
 MODULE = 'calbase'
 
+DEFINES += [
+    '-DTHEME=$(THEME)',
+]
+
--- a/calendar/installer/Makefile.in
+++ b/calendar/installer/Makefile.in
@@ -41,18 +41,16 @@ endif
 
 MOZ_NONLOCALIZED_PKG_LIST = \
     xpcom \
     calendar \
     $(NULL)
 
 MOZ_LOCALIZED_PKG_LIST = $(AB_CD)
 
-DEFINES += -DAB_CD=$(AB_CD)
-
 ifdef MOZ_UPDATER
 DEFINES += -DMOZ_UPDATER=1
 endif
 
 ifdef MOZ_PKG_MANIFEST_P
 MOZ_PKG_MANIFEST = packages-static
 
 $(MOZ_PKG_MANIFEST): $(MOZ_PKG_MANIFEST_P) $(GLOBAL_DEPS)
--- a/calendar/installer/moz.build
+++ b/calendar/installer/moz.build
@@ -1,5 +1,9 @@
 # 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/.
 
+DEFINES += [
+    '-DAB_CD=$(AB_CD)',
+]
+
--- a/calendar/installer/windows/Makefile.in
+++ b/calendar/installer/windows/Makefile.in
@@ -31,24 +31,16 @@ INSTALLER_FILES = \
 
 BRANDING_FILES = \
 	branding.nsi \
 	wizHeader.bmp \
 	wizHeaderRTL.bmp \
 	wizWatermark.bmp \
 	$(NULL)
 
-DEFINES += \
-	-DAB_CD=$(AB_CD) \
-	-DPKG_BASENAME=$(PKG_BASENAME) \
-	-DMOZ_APP_VERSION=$(MOZ_APP_VERSION) \
-	-DMOZ_APP_DISPLAYNAME=${MOZ_APP_DISPLAYNAME} \
-	-DMOZILLA_VERSION=${MOZILLA_VERSION} \
-	$(NULL)
-
 include $(topsrcdir)/config/config.mk
 
 installer::
 	$(MAKE) -C .. installer-stage
 	$(MAKE) $(CONFIG_DIR)/setup.exe
 
 # For building the uninstaller during the application build so it can be
 # included for mar file generation.
--- a/calendar/installer/windows/moz.build
+++ b/calendar/installer/windows/moz.build
@@ -1,5 +1,13 @@
 # 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/.
 
+DEFINES += [
+    '-DAB_CD=$(AB_CD)',
+    '-DMOZILLA_VERSION=${MOZILLA_VERSION}',
+    '-DMOZ_APP_DISPLAYNAME=${MOZ_APP_DISPLAYNAME}',
+    '-DMOZ_APP_VERSION=$(MOZ_APP_VERSION)',
+    '-DPKG_BASENAME=$(PKG_BASENAME)',
+]
+
--- a/calendar/libical/src/libical/Makefile.in
+++ b/calendar/libical/src/libical/Makefile.in
@@ -44,18 +44,16 @@ VPATH		= @srcdir@
 include $(DEPTH)/config/autoconf.mk
 
 LIBRARY_NAME     = mozical
 MODULE_NAME      = mozIcalModule
 FORCE_STATIC_LIB = 1
 FORCE_USE_PIC    = 1 # Force use of PIC
 USE_STATIC_LIBS  = 1
 
-DEFINES += -DHAVE_CONFIG_H
-
 ifneq (,$(filter BeOS Darwin OpenVMS NetBSD FreeBSD,$(OS_ARCH)))
 DEFINES	+= -D__USE_BSD=1
 endif
 
 LOCAL_INCLUDES = -I$(srcdir)/../.. -I$(srcdir) -I.
 
 SRCS_IN_OBJDIR	= 1
 
--- a/calendar/libical/src/libical/moz.build
+++ b/calendar/libical/src/libical/moz.build
@@ -33,8 +33,12 @@ CSRCS += [
     'icaltimezone.c',
     'icaltypes.c',
     'icalvalue.c',
     'pvl.c',
     'sspm.c',
     'vsnprintf.c',
 ]
 
+DEFINES += [
+    '-DHAVE_CONFIG_H',
+]
+
--- a/calendar/lightning/Makefile.in
+++ b/calendar/lightning/Makefile.in
@@ -98,31 +98,17 @@ THEME=linux
 else
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 THEME=osx
 else
 THEME=windows
 endif
 endif
 
-DEFINES += -DTHUNDERBIRD_VERSION=$(THUNDERBIRD_VERSION) \
-           -DTHUNDERBIRD_MAXVERSION=$(THUNDERBIRD_MAXVERSION) \
-           -DAB_CD=$(AB_CD) \
-           -DSEAMONKEY_VERSION=$(SEAMONKEY_VERSION) \
-           -DSEAMONKEY_MAXVERSION=$(SEAMONKEY_MAXVERSION) \
-           -DLIGHTNING_VERSION=$(LIGHTNING_VERSION) \
-           -DTARGET_PLATFORM=$(OS_TARGET)_$(TARGET_XPCOM_ABI) \
-           -DXPI_EM_ID=$(XPI_EM_ID) \
-           -DTHEME=$(THEME) \
-           $(NULL)
-
 GRE_BUILDID = $(shell $(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build BuildID)
-DEFINES += -DGRE_BUILDID=$(GRE_BUILDID)
-
-# xxx todo: unless our packaging story is revised (bug 406579) we package up timezones.sqlite
 libs::
 	$(NSINSTALL) -m 0644 $(srcdir)/../timezones/timezones.sqlite $(FINAL_TARGET)
 
 include $(topsrcdir)/config/rules.mk
 include $(srcdir)/lightning-packager.mk
 
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 # If the macbundle dist dir was already created, sync lightning here to avoid
--- a/calendar/lightning/locales/Makefile.in
+++ b/calendar/lightning/locales/Makefile.in
@@ -10,14 +10,9 @@ VPATH = @srcdir@
 # Setting this to calendar/locales sets up LOCALE_SRCDIR to the correct locale
 # directory
 relativesrcdir = calendar/locales
 
 include $(DEPTH)/config/autoconf.mk
 
 export MOZ_CHROME_FILE_FORMAT=jar
 
-DEFINES += -DAB_CD=$(AB_CD) \
-           -DTHEME=$(THEME) \
-           -DLOCALE_SRCDIR=$(LOCALE_SRCDIR) \
-           $(NULL)
-
 include $(topsrcdir)/config/rules.mk
--- a/calendar/lightning/locales/moz.build
+++ b/calendar/lightning/locales/moz.build
@@ -1,4 +1,11 @@
 # 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/.
+
+DEFINES += [
+    '-DAB_CD=$(AB_CD)',
+    '-DLOCALE_SRCDIR=$(LOCALE_SRCDIR)',
+    '-DTHEME=$(THEME)',
+]
+
--- a/calendar/lightning/moz.build
+++ b/calendar/lightning/moz.build
@@ -13,8 +13,21 @@ DIRS += [
     'components',
     'locales',
 ]
 
 TEST_DIRS += ['../test']
 
 MODULE = 'lightning'
 
+DEFINES += [
+    '-DAB_CD=$(AB_CD)',
+    '-DGRE_BUILDID=$(GRE_BUILDID)',
+    '-DLIGHTNING_VERSION=$(LIGHTNING_VERSION)',
+    '-DSEAMONKEY_MAXVERSION=$(SEAMONKEY_MAXVERSION)',
+    '-DSEAMONKEY_VERSION=$(SEAMONKEY_VERSION)',
+    '-DTARGET_PLATFORM=$(OS_TARGET)_$(TARGET_XPCOM_ABI)',
+    '-DTHEME=$(THEME)',
+    '-DTHUNDERBIRD_MAXVERSION=$(THUNDERBIRD_MAXVERSION)',
+    '-DTHUNDERBIRD_VERSION=$(THUNDERBIRD_VERSION)',
+    '-DXPI_EM_ID=$(XPI_EM_ID)',
+]
+
--- a/calendar/locales/Makefile.in
+++ b/calendar/locales/Makefile.in
@@ -35,26 +35,16 @@ endif
 # override them when MOZ_PKG_PRETTYNAMES is defined - the defaults will not
 # work in that case.
 ZIP_IN ?= $(_ABS_DIST)/$(PACKAGE)
 WIN32_INSTALLER_IN ?= $(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe
 ifdef MOZ_SUNBIRD
 RETRIEVE_WINDOWS_INSTALLER = 1
 endif
 
-DEFINES += \
-    -DAB_CD=$(AB_CD) \
-    -DMOZ_LANGPACK_EID=langpack-$(AB_CD)@sunbird.mozilla.org \
-    -DMOZ_APP_VERSION=$(MOZ_APP_VERSION) \
-    -DMOZ_APP_MAXVERSION=$(MOZ_APP_MAXVERSION) \
-    -DLOCALE_SRCDIR=$(LOCALE_SRCDIR) \
-    -DPKG_BASENAME="$(PKG_BASENAME)" \
-    -DPKG_INST_BASENAME="$(PKG_INST_BASENAME)" \
-    $(NULL)
-
 include $(topsrcdir)/config/rules.mk
 
 clobber-%:
 	$(RM) -rf $(DIST)/xpi-stage/locale-$*
 
 libs-%:
 	$(NSINSTALL) -D $(DIST)/install
 	@$(MAKE) -C ../../mozilla/toolkit/locales libs-$*
--- a/calendar/locales/moz.build
+++ b/calendar/locales/moz.build
@@ -1,8 +1,18 @@
 # 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/.
 
 if not CONFIG['AB_CD']:
     DIRS += ['../timezones']
 
+DEFINES += [
+    '-DAB_CD=$(AB_CD)',
+    '-DLOCALE_SRCDIR=$(LOCALE_SRCDIR)',
+    '-DMOZ_APP_MAXVERSION=$(MOZ_APP_MAXVERSION)',
+    '-DMOZ_APP_VERSION=$(MOZ_APP_VERSION)',
+    '-DMOZ_LANGPACK_EID=langpack-$(AB_CD)@sunbird.mozilla.org',
+    '-DPKG_BASENAME="$(PKG_BASENAME)"',
+    '-DPKG_INST_BASENAME="$(PKG_INST_BASENAME)"',
+]
+
--- a/calendar/providers/gdata/Makefile.in
+++ b/calendar/providers/gdata/Makefile.in
@@ -15,22 +15,14 @@ export XPI_NAME = gdata-provider
 DIST_FILES = install.rdf
 XPI_PKGNAME = gdata-provider-$(GDATA_VERSION).$(AB_CD).$(MOZ_PKG_PLATFORM)
 
 CALENDAR_VERSION := $(shell cat $(topsrcdir)/calendar/sunbird/config/version.txt)
 THUNDERBIRD_VERSION := $(shell cat $(topsrcdir)/mail/config/version.txt)
 SEAMONKEY_VERSION := $(shell cat $(topsrcdir)/suite/config/version.txt)
 GDATA_VERSION = $(shell $(PYTHON) $(srcdir)/makeversion.py $(CALENDAR_VERSION))
 
-DEFINES += -DAB_CD=$(AB_CD) \
-           -DCALENDAR_VERSION=$(CALENDAR_VERSION) \
-           -DSEAMONKEY_VERSION=$(SEAMONKEY_VERSION) \
-           -DTHUNDERBIRD_VERSION=$(THUNDERBIRD_VERSION) \
-           -DCOMM_BUILD=$(COMM_BUILD) \
-           -DGDATA_VERSION=$(GDATA_VERSION) \
-           $(NULL)
-
 PREF_JS_EXPORTS = $(srcdir)/defaults/preferences.js
 
 libs-%:
 	$(MAKE) -C locales libs AB_CD=$* XPI_NAME=$(XPI_NAME) USE_EXTENSION_MANIFEST=1
 
 include $(topsrcdir)/config/rules.mk
--- a/calendar/providers/gdata/locales/Makefile.in
+++ b/calendar/providers/gdata/locales/Makefile.in
@@ -8,13 +8,9 @@ srcdir = @srcdir@
 VPATH = @srcdir@
 
 # Setting this to calendar/locales sets up LOCALE_SRCDIR to the correct locale
 # directory
 relativesrcdir = calendar/locales
 
 include $(DEPTH)/config/autoconf.mk
 
-DEFINES += -DAB_CD=$(AB_CD) \
-           -DLOCALE_SRCDIR=$(LOCALE_SRCDIR) \
-           $(NULL)
-
 include $(topsrcdir)/config/rules.mk
--- a/calendar/providers/gdata/locales/moz.build
+++ b/calendar/providers/gdata/locales/moz.build
@@ -1,4 +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/.
+
+DEFINES += [
+    '-DAB_CD=$(AB_CD)',
+    '-DLOCALE_SRCDIR=$(LOCALE_SRCDIR)',
+]
+
--- a/calendar/providers/gdata/moz.build
+++ b/calendar/providers/gdata/moz.build
@@ -6,8 +6,17 @@
 DIRS += [
     'components',
     'locales',
     'public',
 ]
 
 MODULE = 'gdata-provider'
 
+DEFINES += [
+    '-DAB_CD=$(AB_CD)',
+    '-DCALENDAR_VERSION=$(CALENDAR_VERSION)',
+    '-DCOMM_BUILD=$(COMM_BUILD)',
+    '-DGDATA_VERSION=$(GDATA_VERSION)',
+    '-DSEAMONKEY_VERSION=$(SEAMONKEY_VERSION)',
+    '-DTHUNDERBIRD_VERSION=$(THUNDERBIRD_VERSION)',
+]
+
--- a/calendar/resources/Makefile.in
+++ b/calendar/resources/Makefile.in
@@ -15,15 +15,13 @@ EXTRA_COMPONENTS = \
 include $(DEPTH)/config/autoconf.mk
 
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 THEME = osx
 else
 THEME = windows
 endif
 
-DEFINES += -DTHEME=$(THEME)
-
 ifdef MOZ_UPDATER
 DEFINES += -DMOZ_UPDATER=1
 endif
 
 include $(topsrcdir)/config/rules.mk
--- a/calendar/resources/moz.build
+++ b/calendar/resources/moz.build
@@ -1,4 +1,9 @@
 # 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/.
+
+DEFINES += [
+    '-DTHEME=$(THEME)',
+]
+
--- a/calendar/sunbird/app/Makefile.in
+++ b/calendar/sunbird/app/Makefile.in
@@ -11,31 +11,23 @@ include $(DEPTH)/config/autoconf.mk
 
 PREF_JS_EXPORTS = \
     $(srcdir)/profile/sunbird.js \
     $(srcdir)/profile/channel-prefs.js \
     $(NULL)
 
 # hardcode en-US for the moment
 AB_CD = en-US
-DEFINES += -DAB_CD=$(AB_CD)
-
 APP_VERSION = $(SUNBIRD_VERSION)
-DEFINES += -DAPP_VERSION="$(APP_VERSION)"
-
 APP_UA_NAME = $(shell echo $(MOZ_APP_DISPLAYNAME) | sed -e's/[^A-Za-z]//g')
-DEFINES += -DAPP_UA_NAME="$(APP_UA_NAME)"
-
 DIST_FILES = application.ini
 
 GRE_MILESTONE = $(shell $(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build Milestone)
 GRE_BUILDID = $(shell $(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build BuildID)
  
-DEFINES += -DGRE_MILESTONE=$(GRE_MILESTONE) -DGRE_BUILDID=$(GRE_BUILDID)
-
 MOZ_SOURCE_STAMP ?= $(firstword $(shell hg -R $(topsrcdir) parent --template="{node|short}\n" 2>/dev/null))
 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)"
--- a/calendar/sunbird/app/moz.build
+++ b/calendar/sunbird/app/moz.build
@@ -5,8 +5,17 @@
 
 DIRS += ['profile/extensions']
 
 if not CONFIG['LIBXUL_SDK']:
     if CONFIG['OS_ARCH'] == "OS2" or CONFIG['OS_ARCH'] == "WINNT":
         PROGRAM = CONFIG['MOZ_APP_NAME']
     else
         PROGRAM = CONFIG['MOZ_APP_NAME'] + '-bin'
+
+DEFINES += [
+    '-DAB_CD=$(AB_CD)',
+    '-DAPP_UA_NAME="$(APP_UA_NAME)"',
+    '-DAPP_VERSION="$(APP_VERSION)"',
+    '-DGRE_BUILDID=$(GRE_BUILDID)',
+    '-DGRE_MILESTONE=$(GRE_MILESTONE)',
+]
+
--- a/calendar/sunbird/app/profile/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/Makefile.in
+++ b/calendar/sunbird/app/profile/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/Makefile.in
@@ -5,18 +5,16 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
-DEFINES += -DSUNBIRD_VERSION=$(SUNBIRD_VERSION)
-
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 THEME = osx
 else
 THEME = windows
 endif
 
 FILES := \
 	install.rdf \
--- a/calendar/sunbird/app/profile/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/moz.build
+++ b/calendar/sunbird/app/profile/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/moz.build
@@ -1,4 +1,9 @@
 # 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/.
+
+DEFINES += [
+    '-DSUNBIRD_VERSION=$(SUNBIRD_VERSION)',
+]
+
--- a/calendar/sunbird/app/profile/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/Makefile.in
+++ b/calendar/sunbird/app/profile/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/Makefile.in
@@ -5,18 +5,16 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
-DEFINES += -DSUNBIRD_VERSION=$(SUNBIRD_VERSION)
-
 FILES := \
 	install.rdf \
 	$(srcdir)/chrome.manifest \
 	$(NULL)
 
 libs::
 	$(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $(srcdir)/install.rdf.in > install.rdf
 	$(INSTALL) $(FILES) $(DIST)/bin/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}
--- a/calendar/sunbird/app/profile/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/moz.build
+++ b/calendar/sunbird/app/profile/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/moz.build
@@ -1,4 +1,9 @@
 # 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/.
+
+DEFINES += [
+    '-DSUNBIRD_VERSION=$(SUNBIRD_VERSION)',
+]
+
--- a/calendar/sunbird/base/Makefile.in
+++ b/calendar/sunbird/base/Makefile.in
@@ -13,18 +13,13 @@ include $(DEPTH)/config/autoconf.mk
 APP_VERSION = $(shell cat $(srcdir)/../config/version.txt)
 
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 THEME = osx
 else
 THEME = windows
 endif
 
-DEFINES += \
-    -DAPP_VERSION="$(APP_VERSION)" \
-    -DTHEME=$(THEME) \
-    $(NULL)
-
 ifdef MOZ_UPDATER
 DEFINES += -DMOZ_UPDATER=1
 endif
 
 include $(topsrcdir)/config/rules.mk
--- a/calendar/sunbird/base/moz.build
+++ b/calendar/sunbird/base/moz.build
@@ -1,4 +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/.
+
+DEFINES += [
+    '-DAPP_VERSION="$(APP_VERSION)"',
+    '-DTHEME=$(THEME)',
+]
+
--- a/calendar/sunbird/branding/nightly/locales/Makefile.in
+++ b/calendar/sunbird/branding/nightly/locales/Makefile.in
@@ -5,11 +5,9 @@
 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)
-
 include $(topsrcdir)/config/rules.mk
--- a/calendar/sunbird/branding/nightly/locales/moz.build
+++ b/calendar/sunbird/branding/nightly/locales/moz.build
@@ -1,4 +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/.
+
+DEFINES += [
+    '-DAB_CD=$(AB_CD)',
+    '-DMOZ_DISTRIBUTION_ID_UNQUOTED=$(MOZ_DISTRIBUTION_ID)',
+]
+
--- a/calendar/sunbird/locales/Makefile.in
+++ b/calendar/sunbird/locales/Makefile.in
@@ -12,22 +12,16 @@ include $(DEPTH)/config/autoconf.mk
 
 PREF_JS_EXPORTS = $(LOCALE_SRCDIR)/sunbird-l10n.js
 
 README_FILES= \
     README.txt \
     $(NULL)
 
 APP_VERSION = $(SUNBIRD_VERSION)
-DEFINES += \
-    -DAB_CD="$(AB_CD)" \
-	-DLOCALE_SRCDIR=$(LOCALE_SRCDIR) \
-    -DAPP_VERSION="$(APP_VERSION)" \
-	$(NULL)
-
 include $(topsrcdir)/config/rules.mk
 
 libs:: $(addprefix $(LOCALE_SRCDIR)/,$(README_FILES))
 ifeq ($(OS_ARCH),WINNT)
 	$(EXIT_ON_ERROR) \
 	for file in $^; do \
 	$(PERL) -pe 's/(?<!\r)\n/\r\n/g;' < $$file > $(FINAL_TARGET)/`basename $$file`; \
 	done
--- a/calendar/sunbird/locales/moz.build
+++ b/calendar/sunbird/locales/moz.build
@@ -1,4 +1,11 @@
 # 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/.
+
+DEFINES += [
+    '-DAB_CD="$(AB_CD)"',
+    '-DAPP_VERSION="$(APP_VERSION)"',
+    '-DLOCALE_SRCDIR=$(LOCALE_SRCDIR)',
+]
+
--- a/calendar/timezones/Makefile.in
+++ b/calendar/timezones/Makefile.in
@@ -40,23 +40,16 @@ ifndef DISABLE_LIGHTNING_INSTALL
 INSTALL_EXTENSION_ID = calendar-timezones@mozilla.org
 endif
 
 CALENDAR_VERSION := $(shell cat $(topsrcdir)/calendar/sunbird/config/version.txt)
 THUNDERBIRD_VERSION := $(shell cat $(topsrcdir)/mail/config/version.txt)
 SEAMONKEY_VERSION := $(shell cat $(topsrcdir)/suite/config/version.txt)
 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)
-
 TIMEZONES_SQLITE =  $(srcdir)/timezones.sqlite
 
 ifneq ($(strip $(update)),)
 libs::
 	echo 'SELECT * FROM tz_data ORDER BY tzid;' | sqlite3 $(TIMEZONES_SQLITE) > $(srcdir)/timezones_before_update.dump
 	$(DIST)/bin/run-mozilla.sh $(LIBXUL_DIST)/bin/xpcshell -s -w $(srcdir)/update.js $(update) $(srcdir)/$(DEPTH) $(TIMEZONES_VERSION)
 	echo 'SELECT * FROM tz_data ORDER BY tzid;' | sqlite3 $(TIMEZONES_SQLITE) > $(srcdir)/timezones.dump
 endif
--- a/calendar/timezones/locales/Makefile.in
+++ b/calendar/timezones/locales/Makefile.in
@@ -8,13 +8,9 @@ srcdir = @srcdir@
 VPATH = @srcdir@
 
 # Setting this to calendar/locales sets up LOCALE_SRCDIR to the correct locale
 # directory
 relativesrcdir = calendar/locales
 
 include $(DEPTH)/config/autoconf.mk
 
-DEFINES += -DAB_CD=$(AB_CD) \
-           -DLOCALE_SRCDIR=$(LOCALE_SRCDIR) \
-           $(NULL)
-
 include $(topsrcdir)/config/rules.mk
--- a/calendar/timezones/locales/moz.build
+++ b/calendar/timezones/locales/moz.build
@@ -1,4 +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/.
+
+DEFINES += [
+    '-DAB_CD=$(AB_CD)',
+    '-DLOCALE_SRCDIR=$(LOCALE_SRCDIR)',
+]
+
--- a/calendar/timezones/moz.build
+++ b/calendar/timezones/moz.build
@@ -2,8 +2,16 @@
 # 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/.
 
 DIRS += ['locales']
 
 MODULE = 'timezones'
 
+DEFINES += [
+    '-DAB_CD=$(AB_CD)',
+    '-DCALENDAR_VERSION=$(CALENDAR_VERSION)',
+    '-DSEAMONKEY_VERSION=$(SEAMONKEY_VERSION)',
+    '-DTHUNDERBIRD_VERSION=$(THUNDERBIRD_VERSION)',
+    '-DTIMEZONES_VERSION=$(TIMEZONES_VERSION)',
+]
+
--- a/chat/locales/Makefile.in
+++ b/chat/locales/Makefile.in
@@ -5,11 +5,9 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir	= @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-DEFINES += -DAB_CD=$(AB_CD)
-
 include $(topsrcdir)/config/rules.mk
--- a/chat/locales/moz.build
+++ b/chat/locales/moz.build
@@ -1,4 +1,9 @@
 # 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/.
+
+DEFINES += [
+    '-DAB_CD=$(AB_CD)',
+]
+
--- a/editor/ui/locales/Makefile.in
+++ b/editor/ui/locales/Makefile.in
@@ -5,11 +5,9 @@
 DEPTH          = @DEPTH@
 topsrcdir      = @top_srcdir@
 srcdir         = @srcdir@
 VPATH          = @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-DEFINES += -DAB_CD=$(AB_CD)
-
 include $(topsrcdir)/config/rules.mk
--- a/editor/ui/locales/moz.build
+++ b/editor/ui/locales/moz.build
@@ -1,4 +1,9 @@
 # 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/.
+
+DEFINES += [
+    '-DAB_CD=$(AB_CD)',
+]
+
--- a/mail/app/Makefile.in
+++ b/mail/app/Makefile.in
@@ -28,24 +28,16 @@ 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
 
 CPPSRCS = nsMailApp.cpp
 
 DIST_FILES = application.ini
--- a/mail/app/moz.build
+++ b/mail/app/moz.build
@@ -2,8 +2,17 @@
 # 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/.
 
 DIRS += ['profile']
 
 if not CONFIG['LIBXUL_SDK']:
     PROGRAM = CONFIG['MOZ_APP_NAME']
+
+DEFINES += [
+    '-DAB_CD=$(AB_CD)',
+    '-DAPP_VERSION="$(MOZ_APP_VERSION)"',
+    '-DGRE_BUILDID=$(GRE_BUILDID)',
+    '-DGRE_MILESTONE=$(GRE_MILESTONE)',
+    '-DTHUNDERBIRD_ICO=\"$(DIST)/branding/thunderbird.ico\"',
+]
+
--- a/mail/app/profile/extensions/Makefile.in
+++ b/mail/app/profile/extensions/Makefile.in
@@ -20,21 +20,16 @@ EXTENSIONS = \
   tbtestpilot@labs.mozilla.com \
   $(NULL)
 
 # We are in release mode, we don't want to ship the debug file.
 ifndef MOZ_DEBUG
 EXTRA_ARGS = -x content/debug.html
 endif
 
-DEFINES += \
-  -DMOZ_APP_VERSION=$(MOZ_APP_VERSION) \
-  -DMOZ_APP_MAXVERSION=$(MOZ_APP_MAXVERSION) \
-  $(NULL)
-
 define _INSTALL_EXTENSION
 $(NSINSTALL) -D $(dir) && \
   $(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $(srcdir)/$(dir)/install.rdf.in > $(dir)/install.rdf && \
   cd $(dir) && \
   $(ZIP) -r9XD $(DISTROEXT)/$(dir).xpi install.rdf && \
   cd $(call core_abspath,$(srcdir)/$(dir)) && \
   $(ZIP) -r9XD $(DISTROEXT)/$(dir).xpi * -x install.rdf.in $(EXTRA_ARGS)
 
--- a/mail/app/profile/extensions/moz.build
+++ b/mail/app/profile/extensions/moz.build
@@ -1,4 +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/.
+
+DEFINES += [
+    '-DMOZ_APP_MAXVERSION=$(MOZ_APP_MAXVERSION)',
+    '-DMOZ_APP_VERSION=$(MOZ_APP_VERSION)',
+]
+
--- a/mail/base/Makefile.in
+++ b/mail/base/Makefile.in
@@ -8,19 +8,16 @@ 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
 
@@ -31,12 +28,10 @@ endif
 ifneq (,$(filter windows, $(MOZ_WIDGET_TOOLKIT)))
 DEFINES += -DCAN_DRAW_IN_TITLEBAR=1
 endif
 
 abs_srcdir = $(call core_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
@@ -2,8 +2,14 @@
 # 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/.
 
 DIRS += ['modules']
 
 TEST_DIRS += ['test']
 
+DEFINES += [
+    '-DAPP_LICENSE_BLOCK=$(abs_srcdir)/content/overrides/app-license.html',
+    '-DMOZ_APP_VERSION=$(MOZ_APP_VERSION)',
+    '-DPRE_RELEASE_SUFFIX=""',
+]
+
--- a/mail/branding/aurora/locales/Makefile.in
+++ b/mail/branding/aurora/locales/Makefile.in
@@ -5,11 +5,9 @@
 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)
-
 include $(topsrcdir)/config/rules.mk
--- a/mail/branding/aurora/locales/moz.build
+++ b/mail/branding/aurora/locales/moz.build
@@ -1,4 +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/.
+
+DEFINES += [
+    '-DAB_CD=$(AB_CD)',
+    '-DMOZ_DISTRIBUTION_ID_UNQUOTED=$(MOZ_DISTRIBUTION_ID)',
+]
+
--- a/mail/branding/nightly/locales/Makefile.in
+++ b/mail/branding/nightly/locales/Makefile.in
@@ -5,11 +5,9 @@
 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)
-
 include $(topsrcdir)/config/rules.mk
--- a/mail/branding/nightly/locales/moz.build
+++ b/mail/branding/nightly/locales/moz.build
@@ -1,4 +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/.
+
+DEFINES += [
+    '-DAB_CD=$(AB_CD)',
+    '-DMOZ_DISTRIBUTION_ID_UNQUOTED=$(MOZ_DISTRIBUTION_ID)',
+]
+
--- a/mail/components/preferences/Makefile.in
+++ b/mail/components/preferences/Makefile.in
@@ -7,17 +7,15 @@ 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,4 +1,9 @@
 # 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/.
+
+DEFINES += [
+    '-DMOZ_MACBUNDLE_NAME=$(MOZ_MACBUNDLE_NAME)',
+]
+
--- a/mail/components/shell/Makefile.in
+++ b/mail/components/shell/Makefile.in
@@ -4,18 +4,16 @@
 
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-DEFINES += -DMOZ_APP_NAME=\"$(MOZ_APP_NAME)\"
-
 LIBRARY_NAME = shellservice_s
 MODULE_NAME = nsMailShellModule
 MOZILLA_INTERNAL_API = 1
 
 EXTRA_COMPONENTS = \
   nsSetDefaultMail.js \
   shell.manifest \
   $(NULL)
--- a/mail/components/shell/moz.build
+++ b/mail/components/shell/moz.build
@@ -2,8 +2,12 @@
 # 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/.
 
 DIRS += ['public']
 
 MODULE = 'shellservice'
 
+DEFINES += [
+    '-DMOZ_APP_NAME=\"$(MOZ_APP_NAME)\"',
+]
+
--- a/mail/installer/Makefile.in
+++ b/mail/installer/Makefile.in
@@ -25,47 +25,41 @@ MOZ_NONLOCALIZED_PKG_LIST = \
 	xpcom \
 	mail \
 	newsblog \
 	offline \
 	$(NULL)
 
 MOZ_LOCALIZED_PKG_LIST = $(AB_CD)
 
-DEFINES += -DAB_CD=$(AB_CD) -DMOZ_APP_NAME=$(MOZ_APP_NAME) -DPREF_DIR=$(PREF_DIR)
-
 ifdef MOZ_DEBUG
 DEFINES += -DMOZ_DEBUG=1
 endif
 
 ifdef MOZ_ENABLE_GNOME_COMPONENT
 DEFINES += -DMOZ_ENABLE_GNOME_COMPONENT=1
 endif
 
 ifeq (gtk2, $(MOZ_WIDGET_TOOLKIT))
 DEFINES += -DMOZ_GTK2=1
 endif
 
 ifdef _MSC_VER
 DEFINES += -D_MSC_VER=$(_MSC_VER)
 endif
 
-DEFINES += -DJAREXT=
-
 ifdef MOZ_ANGLE_RENDERER
 DEFINES += -DMOZ_ANGLE_RENDERER=$(MOZ_ANGLE_RENDERER)
 DEFINES += -DMOZ_D3DCOMPILER_DLL=$(MOZ_D3DCOMPILER_DLL)
 endif
 
 ifdef MOZ_UPDATER
 DEFINES += -DMOZ_UPDATER=1
 endif
 
-DEFINES += -DMOZ_CHILD_PROCESS_NAME=$(MOZ_CHILD_PROCESS_NAME)
-
 ifneq (,$(filter WINNT Darwin Android,$(OS_TARGET)))
 DEFINES += -DMOZ_SHARED_MOZGLUE=1
 endif
 
 ifdef MOZ_PKG_MANIFEST_P
 MOZ_PKG_MANIFEST = package-manifest
 
 $(MOZ_PKG_MANIFEST): $(MOZ_PKG_MANIFEST_P) $(GLOBAL_DEPS)
@@ -91,18 +85,16 @@ include $(MOZILLA_SRCDIR)/toolkit/mozapp
 include $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/packager.mk
 
 ifeq (Darwin, $(OS_ARCH))
 BINPATH = $(_BINPATH)
 DEFINES += -DAPPNAME=$(_APPNAME)
 else
 BINPATH = bin
 endif
-DEFINES += -DBINPATH=$(BINPATH)
-
 libs::
 	$(MAKE) -C $(DEPTH)/mail/locales langpack
 
 ifeq (WINNT,$(OS_ARCH))
 PKGCOMP_FIND_OPTS = 
 else
 PKGCOMP_FIND_OPTS = -L
 endif
--- a/mail/installer/moz.build
+++ b/mail/installer/moz.build
@@ -1,4 +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/.
+
+DEFINES += [
+    '-DAB_CD=$(AB_CD)',
+    '-DBINPATH=$(BINPATH)',
+    '-DJAREXT=',
+    '-DMOZ_APP_NAME=$(MOZ_APP_NAME)',
+    '-DMOZ_CHILD_PROCESS_NAME=$(MOZ_CHILD_PROCESS_NAME)',
+    '-DPREF_DIR=$(PREF_DIR)',
+]
+
--- a/mail/installer/windows/Makefile.in
+++ b/mail/installer/windows/Makefile.in
@@ -9,20 +9,17 @@ VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 include $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/package-name.mk
 
 CONFIG_DIR = instgen
 SFX_MODULE = $(topsrcdir)/other-licenses/7zstub/thunderbird/7zSD.sfx
 
-DEFINES += -DMOZ_APP_VERSION=$(MOZ_APP_VERSION)
 PRE_RELEASE_SUFFIX := ""
-DEFINES += -DPRE_RELEASE_SUFFIX="$(PRE_RELEASE_SUFFIX)"
-
 ifdef MOZ_UPDATER
 DEFINES += -DMOZ_UPDATER=1
 endif
 
 INSTALLER_FILES = \
 	app.tag \
 	nsis/installer.nsi \
 	nsis/uninstaller.nsi \
@@ -38,23 +35,16 @@ endif
 
 BRANDING_FILES = \
 	branding.nsi \
 	wizHeader.bmp \
 	wizHeaderRTL.bmp \
 	wizWatermark.bmp \
 	$(NULL)
 
-DEFINES += \
-	-DAB_CD=$(AB_CD) \
-	-DMOZ_APP_NAME=$(MOZ_APP_NAME) \
-	-DMOZ_APP_DISPLAYNAME=${MOZ_APP_DISPLAYNAME} \
-	-DMOZILLA_VERSION=${MOZILLA_VERSION} \
-	$(NULL)
-
 include $(topsrcdir)/config/config.mk
 
 installer::
 	$(MAKE) -C .. installer-stage
 	$(MAKE) $(CONFIG_DIR)/setup.exe
 
 # For building the uninstaller during the application build so it can be
 # included for mar file generation.
--- a/mail/installer/windows/moz.build
+++ b/mail/installer/windows/moz.build
@@ -1,4 +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/.
+
+DEFINES += [
+    '-DAB_CD=$(AB_CD)',
+    '-DMOZILLA_VERSION=${MOZILLA_VERSION}',
+    '-DMOZ_APP_DISPLAYNAME=${MOZ_APP_DISPLAYNAME}',
+    '-DMOZ_APP_NAME=$(MOZ_APP_NAME)',
+    '-DMOZ_APP_VERSION=$(MOZ_APP_VERSION)',
+    '-DPRE_RELEASE_SUFFIX="$(PRE_RELEASE_SUFFIX)"',
+]
+
--- 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 := $(call core_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,4 +1,9 @@
 # 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/.
+
+DEFINES += [
+    '-DMOZ_APP_MAXVERSION=$(MOZ_APP_MAXVERSION)',
+]
+
--- a/mail/themes/Makefile.in
+++ b/mail/themes/Makefile.in
@@ -8,17 +8,15 @@ srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(topsrcdir)/config/config.mk
 
 include $(topsrcdir)/config/rules.mk
 
 CLASSIC_EXTENSION_DIR = {972ce4c6-7e08-4474-a285-3208198ce6fd}
 
-DEFINES += -DTHUNDERBIRD_VERSION=$(THUNDERBIRD_VERSION)
-
 libs::
 	$(NSINSTALL) -D $(DIST)/bin/extensions/$(CLASSIC_EXTENSION_DIR)
 	$(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $(srcdir)/install.rdf > $(DIST)/bin/extensions/$(CLASSIC_EXTENSION_DIR)/install.rdf
 
 install::
 	$(NSINSTALL) -D $(DESTDIR)$(mozappdir)/extensions/$(CLASSIC_EXTENSION_DIR)
 	$(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $(srcdir)/install.rdf > $(DESTDIR)$(mozappdir)/extensions/$(CLASSIC_EXTENSION_DIR)/install.rdf
--- a/mail/themes/moz.build
+++ b/mail/themes/moz.build
@@ -5,8 +5,12 @@
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'qt'):
     DIRS += ['linux']
 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     DIRS += ['osx']
 else:
     DIRS += ['windows']
 
+DEFINES += [
+    '-DTHUNDERBIRD_VERSION=$(THUNDERBIRD_VERSION)',
+]
+
--- a/mailnews/Makefile.in
+++ b/mailnews/Makefile.in
@@ -7,21 +7,16 @@ DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 PREF_JS_EXPORTS = $(srcdir)/mailnews.js
 
-DEFINES += -DOS_ARCH=$(OS_ARCH) \
-           -DMOZ_WIDGET_TOOLKIT=$(MOZ_WIDGET_TOOLKIT) \
-           -DNO_NSPR_10_SUPPORT \
-           $(NULL)
-
 include $(topsrcdir)/config/rules.mk
 
 ifdef ENABLE_TESTS
 libs::
 	$(INSTALL) $(wildcard $(srcdir)/test/resources/*.js) $(MOZDEPTH)/_tests/xpcshell/mailnews/resources
 	$(INSTALL) $(wildcard $(srcdir)/test/data/*) $(MOZDEPTH)/_tests/xpcshell/mailnews/data
 	$(INSTALL) $(wildcard $(srcdir)/test/fakeserver/*.js) $(MOZDEPTH)/_tests/xpcshell/mailnews/fakeserver
 
--- a/mailnews/base/util/Makefile.in
+++ b/mailnews/base/util/Makefile.in
@@ -51,17 +51,15 @@ EXTRA_JS_MODULES = \
 		msgDBCacheManager.js \
 		hostnameUtils.jsm \
 		JXON.js \
 		$(NULL)
 
 # we don't want the shared lib, but we want to force the creation of a static lib.
 FORCE_STATIC_LIB = 1
 
-DEFINES		+= -D_IMPL_NS_MSG_BASE
-
 ifeq ($(OS_ARCH),WINNT)
 DEFINES		+= -DZLIB_DLL
 OS_CXXFLAGS	+= -DNOMINMAX
 endif
 
 include $(topsrcdir)/config/rules.mk
 
--- a/mailnews/base/util/moz.build
+++ b/mailnews/base/util/moz.build
@@ -23,8 +23,13 @@ EXPORTS += [
     'nsMsgTxn.h',
     'nsMsgUtils.h',
 ]
 
 EXPORTS.mozilla.mailnews += [
     'ServiceList.h',
     'Services.h',
 ]
+
+DEFINES += [
+    '-D_IMPL_NS_MSG_BASE',
+]
+
--- a/mailnews/mapi/mapiDll/Makefile.in
+++ b/mailnews/mapi/mapiDll/Makefile.in
@@ -27,10 +27,8 @@ OS_LIBS		+= ole32.lib
 
 # Force use of PIC
 FORCE_USE_PIC	= 1 
 FORCE_SHARED_LIB = 1
 
 EMBED_MANIFEST_AT = 2
 
 include $(topsrcdir)/config/rules.mk
-
-DEFINES	+= -DUNICODE -D_UNICODE
--- a/mailnews/mapi/mapiDll/moz.build
+++ b/mailnews/mapi/mapiDll/moz.build
@@ -1,7 +1,12 @@
 # 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/.
 
 MODULE = 'mozMapi32'
 
+DEFINES += [
+    '-DUNICODE',
+    '-D_UNICODE',
+]
+
--- a/mailnews/mapi/mapihook/build/Makefile.in
+++ b/mailnews/mapi/mapihook/build/Makefile.in
@@ -30,18 +30,16 @@ LOCAL_INCLUDES	= -I.
 FORCE_USE_PIC	= 1 
 FORCE_SHARED_LIB = 1
 SRCS_IN_OBJDIR	= 1
 
 EMBED_MANIFEST_AT = 2
 
 include $(topsrcdir)/config/rules.mk
 
-DEFINES += -DREGISTER_PROXY_DLL -DUNICODE -D_UNICODE -D_WIN32_WINNT=0x400
-
 $(MIDL_GENERATED_FILES): done_gen
 
 done_gen: msgMapi.idl
 	$(RM) $(SRCDIR_CSRCS)
 	$(MIDL) $(MIDL_FLAGS) $(UNICODE_FLAGS) $(srcdir)/msgMapi.idl
 	touch $@
 
 export:: done_gen
--- a/mailnews/mapi/mapihook/build/moz.build
+++ b/mailnews/mapi/mapihook/build/moz.build
@@ -10,8 +10,15 @@ EXPORTS += [
 ]
 
 CSRCS += [
     'dlldata.c',
     'msgMapi_i.c',
     'msgMapi_p.c',
 ]
 
+DEFINES += [
+    '-DREGISTER_PROXY_DLL',
+    '-DUNICODE',
+    '-D_UNICODE',
+    '-D_WIN32_WINNT=0x400',
+]
+
--- a/mailnews/mapi/mapihook/src/Makefile.in
+++ b/mailnews/mapi/mapihook/src/Makefile.in
@@ -49,10 +49,8 @@ endif
 
 EXTRA_DSO_LDOPTS += ../../../base/util/$(LIB_PREFIX)msgbsutl_s.$(LIB_SUFFIX)
 
 OS_LIBS		+= ole32.lib
 
 SRCS_IN_OBJDIR	= 1
 
 include $(topsrcdir)/config/rules.mk
-
-DEFINES	+= -DUNICODE -D_UNICODE
--- a/mailnews/mapi/mapihook/src/moz.build
+++ b/mailnews/mapi/mapihook/src/moz.build
@@ -1,7 +1,12 @@
 # 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/.
 
 MODULE = 'msgMapi'
 
+DEFINES += [
+    '-DUNICODE',
+    '-D_UNICODE',
+]
+
--- a/mailnews/moz.build
+++ b/mailnews/moz.build
@@ -53,8 +53,14 @@ if CONFIG['OS_ARCH'] == 'WINNT' and not 
 
 DIRS += [
     'build',
     'import/build',
 ]
 
 MODULE = 'mailnews'
 
+DEFINES += [
+    '-DMOZ_WIDGET_TOOLKIT=$(MOZ_WIDGET_TOOLKIT)',
+    '-DNO_NSPR_10_SUPPORT',
+    '-DOS_ARCH=$(OS_ARCH)',
+]
+
--- a/other-licenses/branding/sunbird/locales/Makefile.in
+++ b/other-licenses/branding/sunbird/locales/Makefile.in
@@ -38,11 +38,9 @@
 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)
-
 include $(topsrcdir)/config/rules.mk
--- a/other-licenses/branding/sunbird/locales/moz.build
+++ b/other-licenses/branding/sunbird/locales/moz.build
@@ -1,4 +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/.
+
+DEFINES += [
+    '-DAB_CD=$(AB_CD)',
+    '-DMOZ_DISTRIBUTION_ID_UNQUOTED=$(MOZ_DISTRIBUTION_ID)',
+]
+
--- a/other-licenses/branding/thunderbird/locales/Makefile.in
+++ b/other-licenses/branding/thunderbird/locales/Makefile.in
@@ -37,11 +37,9 @@
 DEPTH          = @DEPTH@
 topsrcdir      = @top_srcdir@
 srcdir         = @srcdir@
 VPATH          = @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-DEFINES += -DAB_CD=$(AB_CD)
-
 include $(topsrcdir)/config/rules.mk
--- a/other-licenses/branding/thunderbird/locales/moz.build
+++ b/other-licenses/branding/thunderbird/locales/moz.build
@@ -1,4 +1,9 @@
 # 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/.
+
+DEFINES += [
+    '-DAB_CD=$(AB_CD)',
+]
+
--- a/suite/app/Makefile.in
+++ b/suite/app/Makefile.in
@@ -6,23 +6,16 @@ DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 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
 
 CPPSRCS = nsSuiteApp.cpp
 
 LOCAL_INCLUDES += \
--- a/suite/app/moz.build
+++ b/suite/app/moz.build
@@ -1,7 +1,15 @@
 # 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/.
 
 if not CONFIG['LIBXUL_SDK']:
     PROGRAM = CONFIG['MOZ_APP_NAME']
+
+DEFINES += [
+    '-DAPP_VERSION="$(MOZ_APP_VERSION)"',
+    '-DHTML_FILE_ICO=\"$(DIST)/branding/html-file.ico\"',
+    '-DNO_BLOCKLIST_CRASHREPORTER',
+    '-DSEAMONKEY_ICO=\"$(DIST)/branding/seamonkey.ico\"',
+]
+
--- a/suite/browser/Makefile.in
+++ b/suite/browser/Makefile.in
@@ -21,21 +21,16 @@ 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.
--- a/suite/browser/moz.build
+++ b/suite/browser/moz.build
@@ -1,7 +1,13 @@
 # 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/.
 
 TEST_DIRS += ['test']
 
+DEFINES += [
+    '-DMOZ_APP_DISPLAYNAME="$(MOZ_APP_DISPLAYNAME)"',
+    '-DMOZ_APP_NAME="$(MOZ_APP_NAME)"',
+    '-DMOZ_APP_VERSION="$(MOZ_APP_VERSION)"',
+]
+
--- a/suite/common/Makefile.in
+++ b/suite/common/Makefile.in
@@ -14,13 +14,9 @@ include $(topsrcdir)/config/rules.mk
 abs_srcdir = $(call core_abspath,$(srcdir))
 
 CHROME_DEPS += $(abs_srcdir)/app-license.html
 
 # 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_EULA_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
@@ -9,8 +9,15 @@ PARALLEL_DIRS += [
 ]
 
 TEST_DIRS += [
     'tests',
     'dataman/tests',
     'downloads/tests',
     'places/tests',
 ]
+
+DEFINES += [
+    '-DAPP_EULA_BLOCK=$(abs_srcdir)/app-license.html',
+    '-DMOZ_APP_VERSION=$(MOZ_APP_VERSION)',
+    '-DMOZ_MACBUNDLE_NAME=$(MOZ_MACBUNDLE_NAME)',
+]
+
--- a/suite/debugQA/locales/Makefile.in
+++ b/suite/debugQA/locales/Makefile.in
@@ -13,11 +13,9 @@ relativesrcdir=@relativesrcdir@
 XPI_NAME               = debugQA
 USE_EXTENSION_MANIFEST = 1
 
 # include config.mk before we override the AB_CD var it sets
 include $(topsrcdir)/config/config.mk
 
 # override UI locale with en-US so that we don't need to provide L10n for this
 AB_CD = en-US
-DEFINES += -DAB_CD=$(AB_CD)
-
 include $(topsrcdir)/config/rules.mk
--- a/suite/debugQA/locales/moz.build
+++ b/suite/debugQA/locales/moz.build
@@ -1,4 +1,9 @@
 # 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/.
+
+DEFINES += [
+    '-DAB_CD=$(AB_CD)',
+]
+
--- a/suite/installer/Makefile.in
+++ b/suite/installer/Makefile.in
@@ -26,20 +26,16 @@ MOZ_NONLOCALIZED_PKG_LIST = \
 	browser \
 	mail \
 	$(NULL)
 
 MOZ_LOCALIZED_PKG_LIST = \
 	$(AB_CD) \
 	$(NULL)
 
-DEFINES += -DAB_CD=$(AB_CD) -DMOZ_APP_NAME=$(MOZ_APP_NAME) -DPREF_DIR=$(PREF_DIR)
-
-DEFINES += -DJAREXT=
-
 ifdef ENABLE_TESTS
 DEFINES += -DENABLE_TESTS=1
 endif
 
 ifdef LIBXUL_SDK
 DEFINES += -DLIBXUL_SDK=1
 endif
 
@@ -109,18 +105,16 @@ endif
 ifneq (en-US, $(AB_CD))
 DEFINES += -DLOCALE_BUILD=1
 endif
 
 ifeq (,$(filter-out WINNT OS2,$(OS_ARCH)))
 DEFINES += -DWIN_OR_OS2=1
 endif
 
-DEFINES += -DMOZ_CHILD_PROCESS_NAME=$(MOZ_CHILD_PROCESS_NAME)
-
 ifdef MOZ_PKG_MANIFEST_P
 MOZ_PKG_MANIFEST = package-manifest
 
 $(MOZ_PKG_MANIFEST): $(MOZ_PKG_MANIFEST_P) $(GLOBAL_DEPS)
 	$(PYTHON) $(MOZILLA_SRCDIR)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $< > $@
 
 GARBAGE += $(MOZ_PKG_MANIFEST)
 endif
@@ -147,18 +141,16 @@ GENERATE_CACHE=1
 include $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/packager.mk
 
 ifeq (Darwin, $(OS_ARCH))
 BINPATH = $(_BINPATH)
 DEFINES += -DAPPNAME=$(_APPNAME)
 else
 BINPATH = bin
 endif
-DEFINES += -DBINPATH=$(BINPATH)
-
 libs::
 	$(MAKE) -C $(DEPTH)/suite/locales langpack
 
 ifeq (WINNT,$(OS_ARCH))
 PKGCOMP_FIND_OPTS = 
 else
 PKGCOMP_FIND_OPTS = -L
 endif
--- a/suite/installer/moz.build
+++ b/suite/installer/moz.build
@@ -1,4 +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/.
+
+DEFINES += [
+    '-DAB_CD=$(AB_CD)',
+    '-DBINPATH=$(BINPATH)',
+    '-DJAREXT=',
+    '-DMOZ_APP_NAME=$(MOZ_APP_NAME)',
+    '-DMOZ_CHILD_PROCESS_NAME=$(MOZ_CHILD_PROCESS_NAME)',
+    '-DPREF_DIR=$(PREF_DIR)',
+]
+
--- a/suite/installer/windows/Makefile.in
+++ b/suite/installer/windows/Makefile.in
@@ -24,26 +24,16 @@ INSTALLER_FILES = \
 
 BRANDING_FILES = \
 	branding.nsi \
 	wizHeader.bmp \
 	wizHeaderRTL.bmp \
 	wizWatermark.bmp \
 	$(NULL)
 
-DEFINES += \
-	-DAB_CD=$(AB_CD) \
-	-DPKG_BASENAME="$(PKG_BASENAME)" \
-	-DPKG_INST_BASENAME="$(PKG_INST_BASENAME)" \
-	-DMOZ_APP_VERSION=$(MOZ_APP_VERSION) \
-	-DMOZ_APP_NAME=$(MOZ_APP_NAME) \
-	-DMOZ_APP_DISPLAYNAME=${MOZ_APP_DISPLAYNAME} \
-	-DMOZILLA_VERSION=${MOZILLA_VERSION} \
-	$(NULL)
-
 ifdef MOZ_UPDATER
 DEFINES += -DMOZ_UPDATER=1
 endif
 
 include $(topsrcdir)/config/config.mk
 
 installer::
 	$(MAKE) -C .. installer-stage
--- a/suite/installer/windows/moz.build
+++ b/suite/installer/windows/moz.build
@@ -1,4 +1,15 @@
 # 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/.
+
+DEFINES += [
+    '-DAB_CD=$(AB_CD)',
+    '-DMOZILLA_VERSION=${MOZILLA_VERSION}',
+    '-DMOZ_APP_DISPLAYNAME=${MOZ_APP_DISPLAYNAME}',
+    '-DMOZ_APP_NAME=$(MOZ_APP_NAME)',
+    '-DMOZ_APP_VERSION=$(MOZ_APP_VERSION)',
+    '-DPKG_BASENAME="$(PKG_BASENAME)"',
+    '-DPKG_INST_BASENAME="$(PKG_INST_BASENAME)"',
+]
+
--- 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 := $(call core_abspath,$(topsrcdir))
 
 vpath %.xml @srcdir@/en-US/searchplugins
 vpath %.xml $(LOCALE_SRCDIR)/searchplugins
 
 SUBMAKEFILES += \
 	$(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/Makefile \
 	$(NULL)
@@ -33,20 +31,16 @@ PWD := $(CURDIR)
 # override them when MOZ_PKG_PRETTYNAMES is defined - the defaults will not
 # work in that case.
 ZIP_IN ?= $(_ABS_DIST)/$(PACKAGE)
 WIN32_INSTALLER_IN ?= $(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe
 RETRIEVE_WINDOWS_INSTALLER = 1
 
 MOZ_LANGPACK_EID=langpack-$(AB_CD)@seamonkey.mozilla.org
 
-DEFINES += \
-	-DMOZ_PSM=$(MOZ_PSM) \
-	$(NULL)
-
 PREF_JS_EXPORTS = $(call MERGE_FILE,suite-l10n.js)
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
 MOZ_PKG_MAC_DSSTORE=$(_ABS_DIST)/branding/dsstore
 MOZ_PKG_MAC_BACKGROUND=$(_ABS_DIST)/branding/background.png
 MOZ_PKG_MAC_ICON=$(_ABS_DIST)/branding/disk.icns
 MOZ_PKG_MAC_EXTRA=--symlink "/Applications:/ "
 endif
--- a/suite/locales/moz.build
+++ b/suite/locales/moz.build
@@ -1,4 +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/.
+
+DEFINES += [
+    '-DMOZ_APP_MAXVERSION=$(MOZ_APP_MAXVERSION)',
+    '-DMOZ_PSM=$(MOZ_PSM)',
+]
+
--- a/suite/themes/classic/Makefile.in
+++ b/suite/themes/classic/Makefile.in
@@ -9,18 +9,16 @@ 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)
--- a/suite/themes/classic/moz.build
+++ b/suite/themes/classic/moz.build
@@ -1,4 +1,9 @@
 # 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/.
+
+DEFINES += [
+    '-DSEAMONKEY_VERSION=$(SEAMONKEY_VERSION)',
+]
+
--- a/suite/themes/modern/Makefile.in
+++ b/suite/themes/modern/Makefile.in
@@ -9,18 +9,16 @@ srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 USE_EXTENSION_MANIFEST = 1
 
 include $(topsrcdir)/config/config.mk
 
 FINAL_TARGET = $(DIST)/bin/extensions/modern@themes.mozilla.org
 
-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,4 +1,9 @@
 # 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/.
+
+DEFINES += [
+    '-DSEAMONKEY_VERSION=$(SEAMONKEY_VERSION)',
+]
+