Bug 1124736: Move PREF_JS_EXPORTS to moz.build (c-c easy moves) r=jcranmer
authorBrian O'Keefe <bokeefe@alum.wpi.edu>
Mon, 19 Jan 2015 12:25:24 -0500
changeset 21776 1f6763b45c6743634d7cee235993191c0c3e6d39
parent 21775 658d9430c6c1d9e1c897393d48bc968052499c9b
child 21777 338986d73c026f53105c68565e236c9dbee755fd
push id1326
push usermbanner@mozilla.com
push dateMon, 30 Mar 2015 20:10:12 +0000
treeherdercomm-beta@69663dd6f687 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjcranmer
bugs1124736
Bug 1124736: Move PREF_JS_EXPORTS to moz.build (c-c easy moves) r=jcranmer
calendar/lightning/Makefile.in
calendar/lightning/moz.build
calendar/providers/gdata/Makefile.in
calendar/providers/gdata/moz.build
calendar/timezones/Makefile.in
calendar/timezones/moz.build
chat/Makefile.in
chat/moz.build
editor/ui/Makefile.in
editor/ui/moz.build
im/app/Makefile.in
im/app/moz.build
mail/app/Makefile.in
mail/app/moz.build
mail/branding/aurora/Makefile.in
mail/branding/aurora/moz.build
mail/branding/nightly/Makefile.in
mail/branding/nightly/moz.build
mail/components/im/Makefile.in
mail/components/im/moz.build
mailnews/Makefile.in
mailnews/moz.build
other-licenses/branding/thunderbird/Makefile.in
other-licenses/branding/thunderbird/moz.build
suite/browser/Makefile.in
suite/browser/moz.build
--- a/calendar/lightning/Makefile.in
+++ b/calendar/lightning/Makefile.in
@@ -1,30 +1,22 @@
 # 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
-
 # Calendar builders currently use STRIP_XPI to reduce the binary component in
 # Lightning.
 
 USE_EXTENSION_MANIFEST = 1
 XPI_PKGNAME = lightning-$(LIGHTNING_VERSION).$(AB_CD).$(MOZ_PKG_PLATFORM)
 XPI_VERSION = $(LIGHTNING_VERSION)
 
 XPI_EM_ID = {e2fda1a4-762b-4020-b5ad-a41df1933103}
 
 DIST_FILES = install.rdf application.ini
-PREF_JS_EXPORTS = $(srcdir)/content/lightning.js
 
 # 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.
--- a/calendar/lightning/moz.build
+++ b/calendar/lightning/moz.build
@@ -21,8 +21,13 @@ 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'
+
+JS_PREFERENCE_FILES += [
+    'content/lightning.js',
+]
+
--- a/calendar/providers/gdata/Makefile.in
+++ b/calendar/providers/gdata/Makefile.in
@@ -1,19 +1,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/.
 
-DEPTH = @DEPTH@
-topsrcdir = @top_srcdir@
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
 USE_EXTENSION_MANIFEST = 1
 DIST_FILES = install.rdf
 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}
 ifndef DISABLE_LIGHTNING_INSTALL
 XPI_INSTALL_EXTENSION = $(XPI_EM_ID)
@@ -27,18 +20,16 @@ GDATA_VERSION = $(shell $(PYTHON) $(srcd
 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
-
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 # If the macbundle dist dir was already created, sync the gdata provider here to avoid
 # the need to make -C objdir/mail/app each time
 tools repackage::
 	[ -d $(DIST)/$(MOZ_MACBUNDLE_NAME) ] && rsync -a $(FINAL_TARGET)/ $(DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/Resources/extensions/$(XPI_EM_ID) || true
 endif
 
 # stage the extension for use in packaged tests
--- a/calendar/providers/gdata/moz.build
+++ b/calendar/providers/gdata/moz.build
@@ -31,8 +31,13 @@ EXTRA_JS_MODULES.shim = [
 ]
 
 EXTRA_COMPONENTS += [
     'components/calGoogleCalendar.js',
     'components/calGoogleCalendar.manifest',
 ]
 
 JAR_MANIFESTS += ['jar.mn']
+
+JS_PREFERENCE_FILES += [
+    'defaults/preferences.js',
+]
+
--- a/calendar/timezones/Makefile.in
+++ b/calendar/timezones/Makefile.in
@@ -1,25 +1,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/.
 
-DEPTH = @DEPTH@
-topsrcdir = @top_srcdir@
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
 USE_EXTENSION_MANIFEST = 1
 DIST_FILES = install.rdf
 XPI_PKGNAME = calendar-timezones
 
-PREF_JS_EXPORTS = $(srcdir)/defaults/preferences.js
-
 ifndef DISABLE_LIGHTNING_INSTALL
 # install as a global extension in dist/bin/extensions/
 INSTALL_EXTENSION_ID = calendar-timezones@mozilla.org
 endif
 
 THUNDERBIRD_VERSION := $(shell cat $(topsrcdir)/mail/config/version.txt)
 SEAMONKEY_VERSION := $(shell cat $(topsrcdir)/suite/config/version.txt)
 CALENDAR_VERSION := $(shell $(PYTHON) $(topsrcdir)/calendar/lightning/build/makeversion.py $(word 1,$(MOZ_PKG_VERSION) $(THUNDERBIRD_VERSION)))
--- a/calendar/timezones/moz.build
+++ b/calendar/timezones/moz.build
@@ -4,8 +4,13 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += ['locales']
 
 XPI_NAME = 'calendar-timezones'
 export('XPI_NAME')
 
 JAR_MANIFESTS += ['jar.mn']
+
+JS_PREFERENCE_FILES += [
+    'defaults/preferences.js',
+]
+
deleted file mode 100644
--- a/chat/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
-
-PREF_JS_EXPORTS = $(srcdir)/chat-prefs.js
-
-include $(topsrcdir)/config/rules.mk
--- a/chat/moz.build
+++ b/chat/moz.build
@@ -17,8 +17,12 @@ DIRS += [
     'protocols/twitter',
     'protocols/xmpp',
     'protocols/yahoo',
 ]
 
 if CONFIG['MOZ_DEBUG']:
     DIRS += ['protocols/jsTest']
 
+JS_PREFERENCE_FILES += [
+    'chat-prefs.js',
+]
+
deleted file mode 100644
--- a/editor/ui/Makefile.in
+++ /dev/null
@@ -1,16 +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
-
-ifndef MOZ_STANDALONE_COMPOSER
-PREF_JS_EXPORTS = $(srcdir)/composer.js
-endif
-
-include $(topsrcdir)/config/rules.mk
--- a/editor/ui/moz.build
+++ b/editor/ui/moz.build
@@ -12,8 +12,13 @@ if not CONFIG['MOZ_STANDALONE_COMPOSER']
             'nsComposerCmdLineHandler.manifest',
         ]
 
 EXTRA_JS_MODULES += [
     'editorUtilities.jsm',
 ]
 
 JAR_MANIFESTS += ['jar.mn']
+
+if not CONFIG['MOZ_STANDALONE_COMPOSER']:
+    JS_PREFERENCE_FILES += [
+        'composer.js'
+    ]
--- a/im/app/Makefile.in
+++ b/im/app/Makefile.in
@@ -1,19 +1,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/.
 
-DEPTH		= @DEPTH@
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
 AB_CD = $(MOZ_UI_LOCALE)
 
 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)
 
 LICENSE_TXT_FILE = $(topsrcdir)/im/LICENSE.txt
 
 MOZ_SOURCE_STAMP = $(firstword $(shell hg -R $(topsrcdir) parent --template="{node|short}\n" 2>/dev/null))
@@ -21,21 +14,16 @@ 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
 
-PREF_JS_EXPORTS = \
-    $(srcdir)/profile/all-instantbird.js \
-    $(srcdir)/profile/channel-prefs.js \
-    $(NULL)
-
 DEFINES += \
   -DAB_CD=$(AB_CD) \
   -DINSTANTBIRD_ICO=\"$(DIST)/branding/instantbird.ico\" \
   -DGRE_MILESTONE=$(GRE_MILESTONE) \
   -DGRE_BUILDID=$(GRE_BUILDID) \
    $(NULL)
 
 ifdef LIBXUL_SDK
--- a/im/app/moz.build
+++ b/im/app/moz.build
@@ -47,8 +47,14 @@ if not CONFIG['LIBXUL_SDK']:
         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
+
+JS_PREFERENCE_FILES += [
+    'profile/all-instantbird.js',
+    'profile/channel-prefs.js',
+]
+
--- a/mail/app/Makefile.in
+++ b/mail/app/Makefile.in
@@ -1,39 +1,27 @@
 # 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
-
 AB_CD = $(MOZ_UI_LOCALE) 
 
 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)
 
 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)"
 endif
 
-PREF_JS_EXPORTS = \
-    $(srcdir)/profile/all-thunderbird.js \
-    $(srcdir)/profile/channel-prefs.js \
-    $(NULL)
-
 DEFINES += \
   -DAB_CD=$(AB_CD) \
   -DTHUNDERBIRD_ICO='"$(DIST)/branding/thunderbird.ico"' \
   -DGRE_MILESTONE=$(GRE_MILESTONE) \
   -DGRE_BUILDID=$(GRE_BUILDID) \
    $(NULL)
 
 ifdef LIBXUL_SDK
--- a/mail/app/moz.build
+++ b/mail/app/moz.build
@@ -47,8 +47,14 @@ if not CONFIG['LIBXUL_SDK']:
         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
+
+JS_PREFERENCE_FILES += [
+    'profile/all-thunderbird.js',
+    'profile/channel-prefs.js',
+]
+
--- a/mail/branding/aurora/Makefile.in
+++ b/mail/branding/aurora/Makefile.in
@@ -1,23 +1,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/.
 
 # Branding Makefile for nightlies/unofficial branding
 
-DEPTH = @DEPTH@
-topsrcdir = @top_srcdir@
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-PREF_JS_EXPORTS += $(srcdir)/thunderbird-branding.js
-
 include $(topsrcdir)/config/rules.mk
 
 export::
 	$(NSINSTALL) -D $(DIST)/branding
 ifeq ($(OS_ARCH),WINNT)
 	cp $(srcdir)/thunderbird.ico   $(DIST)/branding/thunderbird.ico
 	cp $(srcdir)/branding.nsi      $(DIST)/branding/branding.nsi
 	cp $(srcdir)/wizHeader.bmp     $(DIST)/branding/wizHeader.bmp
--- a/mail/branding/aurora/moz.build
+++ b/mail/branding/aurora/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/.
 
 DIRS += ['locales']
 
 JAR_MANIFESTS += ['jar.mn']
+
+JS_PREFERENCE_FILES += [
+    'thunderbird-branding.js',
+]
+
--- a/mail/branding/nightly/Makefile.in
+++ b/mail/branding/nightly/Makefile.in
@@ -1,23 +1,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/.
 
 # Branding Makefile for nightlies/unofficial branding
 
-DEPTH = @DEPTH@
-topsrcdir = @top_srcdir@
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-PREF_JS_EXPORTS += $(srcdir)/thunderbird-branding.js
-
 include $(topsrcdir)/config/rules.mk
 
 export::
 	$(NSINSTALL) -D $(DIST)/branding
 ifeq ($(OS_ARCH),WINNT)
 	cp $(srcdir)/thunderbird.ico   $(DIST)/branding/thunderbird.ico
 	cp $(srcdir)/branding.nsi      $(DIST)/branding/branding.nsi
 	cp $(srcdir)/wizHeader.bmp     $(DIST)/branding/wizHeader.bmp
--- a/mail/branding/nightly/moz.build
+++ b/mail/branding/nightly/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/.
 
 DIRS += ['locales']
 
 JAR_MANIFESTS += ['jar.mn']
+
+JS_PREFERENCE_FILES += [
+    'thunderbird-branding.js',
+]
+
deleted file mode 100644
--- a/mail/components/im/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
-
-PREF_JS_EXPORTS = $(srcdir)/all-im.js
-
-include $(topsrcdir)/config/rules.mk
--- a/mail/components/im/moz.build
+++ b/mail/components/im/moz.build
@@ -12,8 +12,13 @@ EXTRA_COMPONENTS += [
 EXTRA_JS_MODULES += [
     'modules/chatHandler.jsm',
     'modules/chatNotifications.jsm',
     'modules/index_im.js',
     'modules/search_im.js',
 ]
 
 JAR_MANIFESTS += ['jar.mn']
+
+JS_PREFERENCE_FILES += [
+    'all-im.js',
+]
+
--- a/mailnews/Makefile.in
+++ b/mailnews/Makefile.in
@@ -1,21 +1,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/.
 
-DEPTH		= @DEPTH@
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-PREF_JS_EXPORTS = $(srcdir)/mailnews.js
-
 include $(topsrcdir)/config/rules.mk
 
 ifdef ENABLE_TESTS
 libs::
 	$(INSTALL) $(wildcard $(srcdir)/test/resources/*.js) $(DEPTH)/_tests/xpcshell/mailnews/resources
 	$(INSTALL) $(wildcard $(srcdir)/test/data/*) $(DEPTH)/_tests/xpcshell/mailnews/data
 endif
--- a/mailnews/moz.build
+++ b/mailnews/moz.build
@@ -71,8 +71,13 @@ TESTING_JS_MODULES.mailnews += [
 	'test/fakeserver/pop3d.js',
 	'test/fakeserver/smtpd.js',
 	'test/resources/IMAPpump.js',
 	'test/resources/localAccountUtils.js',
 	'test/resources/mailTestUtils.js',
 	'test/resources/MockFactory.js',
 	'test/resources/PromiseTestUtils.jsm',
 ]
+
+JS_PREFERENCE_FILES += [
+    'mailnews.js',
+]
+
--- a/other-licenses/branding/thunderbird/Makefile.in
+++ b/other-licenses/branding/thunderbird/Makefile.in
@@ -1,22 +1,13 @@
 # Branding Makefile
 #  - jars chrome artwork
 #  - copies artwork to appropriate places in objdir for bundling into app 
 #    resources
 
-DEPTH = @DEPTH@
-topsrcdir = @top_srcdir@
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-PREF_JS_EXPORTS = $(srcdir)/thunderbird-branding.js
-
 include $(topsrcdir)/config/rules.mk
 
 export::
 	$(NSINSTALL) -D $(DIST)/branding
 # Export items into the branding directory first
 ifeq ($(OS_ARCH),WINNT)
 	cp $(srcdir)/thunderbird.ico   $(DIST)/branding/thunderbird.ico
 	cp $(srcdir)/branding.nsi      $(DIST)/branding/branding.nsi
--- a/other-licenses/branding/thunderbird/moz.build
+++ b/other-licenses/branding/thunderbird/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/.
 
 DIRS += ['locales']
 
 JAR_MANIFESTS += ['jar.mn']
+
+JS_PREFERENCE_FILES += [
+    'thunderbird-branding.js',
+]
+
--- a/suite/browser/Makefile.in
+++ b/suite/browser/Makefile.in
@@ -1,29 +1,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/.
 
-DEPTH		= @DEPTH@
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-PREF_JS_EXPORTS = \
-	$(srcdir)/browser-prefs.js \
-	$(NULL)
-
-ifdef LIBXUL_SDK
-PREF_JS_EXPORTS += \
-	$(srcdir)/channel-prefs.js
-	$(NULL)
-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,-Fsubstitution $(PREF_PPFLAGS) $(ACDEFINES) $^ -o $(DIST)/bin/defaults/pref/channel-prefs.js)
 endif
--- a/suite/browser/moz.build
+++ b/suite/browser/moz.build
@@ -13,8 +13,18 @@ EXTRA_COMPONENTS += [
 
 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
+
+if CONFIG['LIBXUL_SDK']:
+    PREF_JS_EXPORTS += [
+        'channel-prefs.js'
+    ]
+
+JS_PREFERENCE_FILES += [
+    'browser-prefs.js',
+]
+