Bug 882968 - Clean up and move DEFINES and friends to moz.build in comm-central - Part 6: calendar/ files r=philipp for a CLOSED TREE
authorIan Neal <iann_cvs@blueyonder.co.uk>
Wed, 03 Sep 2014 22:34:12 +0100
changeset 18767 3fafdae610c9060bb5b2b2752e40f53d561f9785
parent 18766 f1a862465033dc9e49c8dbfd483d121224cc0025
child 18768 82ea94ece3eac42b6d80bb48262220a3dc608a14
push id1303
push usermbanner@mozilla.com
push dateMon, 13 Oct 2014 18:10:00 +0000
treeherdercomm-aurora@495dc41ddfd5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersphilipp
bugs882968
Bug 882968 - Clean up and move DEFINES and friends to moz.build in comm-central - Part 6: calendar/ files r=philipp for a CLOSED TREE
calendar/base/Makefile.in
calendar/base/moz.build
calendar/lightning/Makefile.in
calendar/lightning/moz.build
calendar/resources/Makefile.in
calendar/resources/moz.build
--- a/calendar/base/Makefile.in
+++ b/calendar/base/Makefile.in
@@ -7,37 +7,23 @@ DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 USE_EXTENSION_MANIFEST = 1
 
-ifneq (,$(filter gtk2 qt,$(MOZ_WIDGET_TOOLKIT)))
-THEME = linux
-else
-ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
-THEME = osx
-else
-THEME = windows
-endif
-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 gtk gtk2,$(MOZ_WIDGET_TOOLKIT)))
 
 # Set up the icon suffix to differ between windows and linux
 ifneq (,$(filter windows,$(MOZ_WIDGET_TOOLKIT)))
 ICON_SUFFIX = .ico
--- a/calendar/base/moz.build
+++ b/calendar/base/moz.build
@@ -6,8 +6,15 @@
 DIRS = [
     'public',
     'backend',
     'src',
     'modules',
 ]
 
 JAR_MANIFESTS += ['jar.mn']
+
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
+    DEFINES['THEME'] = 'windows'
+elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
+    DEFINES['THEME'] = 'osx'
+else:
+    DEFINES['THEME'] = 'linux'
--- a/calendar/lightning/Makefile.in
+++ b/calendar/lightning/Makefile.in
@@ -85,35 +85,24 @@ include $(topsrcdir)/config/config.mk
 # installing lightning in a thunderbird build causes problems on tinderboxes
 # (see bug 406441 and bug 440017), so we need to provide a hook for the
 # tinderboxen to disable that.
 ifndef DISABLE_LIGHTNING_INSTALL
 # install Lightning as a global extension in dist/bin/extensions/
 INSTALL_EXTENSION_ID = $(XPI_EM_ID)
 endif
 
-ifneq (,$(filter gtk2 qt,$(MOZ_WIDGET_TOOLKIT)))
-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)
--- a/calendar/lightning/moz.build
+++ b/calendar/lightning/moz.build
@@ -14,8 +14,15 @@ DIRS += [
 ]
 
 TEST_DIRS += ['../test']
 
 XPI_NAME = 'lightning'
 export('XPI_NAME')
 
 JAR_MANIFESTS += ['jar.mn']
+
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
+    DEFINES['THEME'] = 'windows'
+elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
+    DEFINES['THEME'] = 'osx'
+else:
+    DEFINES['THEME'] = 'linux'
--- a/calendar/resources/Makefile.in
+++ b/calendar/resources/Makefile.in
@@ -6,21 +6,9 @@ DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 USE_EXTENSION_MANIFEST = 1
 
-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,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']
+
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
+    DEFINES['THEME'] = 'osx'
+else:
+    DEFINES['THEME'] = 'windows'
+
+if CONFIG['MOZ_UPDATER']:
+    DEFINES['MOZ_UPDATER'] = 1