Bug 884824 - Move EXTRA_JS_MODULES and JS_MODULES_PATH to moz.build, r=Standard8
authorJoshua Cranmer <Pidgeot18@gmail.com>
Fri, 21 Jun 2013 09:56:27 -0500
changeset 15780 993bb2a45132dc51b6fdc821dee9a0124085e100
parent 15779 08a888eb7a776400f3904909a6526fb554024d50
child 15781 1d81563ab6cdf95fa5ba306e450e9c47ff328e69
push idunknown
push userunknown
push dateunknown
reviewersStandard8
bugs884824
Bug 884824 - Move EXTRA_JS_MODULES and JS_MODULES_PATH to moz.build, r=Standard8 CLOSED TREE for the SeaMonkey migration as well.
calendar/base/modules/Makefile.in
calendar/base/modules/moz.build
calendar/providers/storage/Makefile.in
calendar/providers/storage/moz.build
chat/modules/Makefile.in
chat/modules/moz.build
chat/protocols/irc/Makefile.in
chat/protocols/irc/moz.build
chat/protocols/xmpp/Makefile.in
chat/protocols/xmpp/moz.build
config/rules.mk
editor/ui/Makefile.in
editor/ui/moz.build
mail/base/modules/Makefile.in
mail/base/modules/moz.build
mail/components/Makefile.in
mail/components/about-support/Makefile.in
mail/components/about-support/moz.build
mail/components/activity/Makefile.in
mail/components/activity/moz.build
mail/components/cloudfile/Makefile.in
mail/components/cloudfile/moz.build
mail/components/debugger/Makefile.in
mail/components/im/Makefile.in
mail/components/im/moz.build
mail/components/moz.build
mail/components/wintaskbar/Makefile.in
mail/components/wintaskbar/moz.build
mailnews/base/src/Makefile.in
mailnews/base/src/moz.build
mailnews/base/util/Makefile.in
mailnews/base/util/moz.build
mailnews/db/gloda/modules/Makefile.in
mailnews/db/gloda/modules/moz.build
mailnews/mime/Makefile.in
mailnews/mime/moz.build
suite/common/src/Makefile.in
suite/common/src/moz.build
suite/mailnews/modules/Makefile.in
suite/mailnews/modules/moz.build
suite/modules/Makefile.in
suite/modules/moz.build
deleted file mode 100644
--- a/calendar/base/modules/Makefile.in
+++ /dev/null
@@ -1,28 +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
-
-EXTRA_JS_MODULES = \
-    calAlarmUtils.jsm \
-    calAuthUtils.jsm \
-    calHashedArray.jsm \
-    calItemUtils.jsm \
-    calIteratorUtils.jsm \
-    calItipUtils.jsm \
-    calPrintUtils.jsm \
-    calProviderUtils.jsm \
-    calRecurrenceUtils.jsm \
-    calUtils.jsm \
-    calXMLUtils.jsm \
-    OAuth2.jsm \
-    ical.js \
-    $(NULL)
-
-include $(topsrcdir)/config/rules.mk
--- a/calendar/base/modules/moz.build
+++ b/calendar/base/modules/moz.build
@@ -1,7 +1,22 @@
 # 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 = 'calbase'
 
+EXTRA_JS_MODULES += [
+    'calAlarmUtils.jsm',
+    'calAuthUtils.jsm',
+    'calHashedArray.jsm',
+    'calItemUtils.jsm',
+    'calIteratorUtils.jsm',
+    'calItipUtils.jsm',
+    'calPrintUtils.jsm',
+    'calProviderUtils.jsm',
+    'calRecurrenceUtils.jsm',
+    'calUtils.jsm',
+    'calXMLUtils.jsm',
+    'ical.js',
+]
+
deleted file mode 100644
--- a/calendar/providers/storage/Makefile.in
+++ /dev/null
@@ -1,17 +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
-
-EXTRA_JS_MODULES = \
-    calStorageHelpers.jsm \
-    calStorageUpgrade.jsm \
-    $(NULL)
-
-include $(topsrcdir)/config/rules.mk
--- a/calendar/providers/storage/moz.build
+++ b/calendar/providers/storage/moz.build
@@ -5,8 +5,13 @@
 
 MODULE = 'calStorageCalendar'
 
 EXTRA_COMPONENTS += [
     'calStorageCalendar.js',
     'calStorageCalendar.manifest',
 ]
 
+EXTRA_JS_MODULES += [
+    'calStorageHelpers.jsm',
+    'calStorageUpgrade.jsm',
+]
+
--- a/chat/modules/Makefile.in
+++ b/chat/modules/Makefile.in
@@ -5,29 +5,14 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-EXTRA_JS_MODULES = \
-	imContentSink.jsm \
-	imServices.jsm \
-	imSmileys.jsm \
-	imStatusUtils.jsm \
-	imThemes.jsm \
-	imXPCOMUtils.jsm \
-	jsProtoHelper.jsm \
-	socket.jsm \
-	$(NULL)
-
-ifndef MOZ_THUNDERBIRD
-EXTRA_JS_MODULES += http.jsm
-endif
-
 EXTRA_PP_JS_MODULES = \
 	hiddenWindow.jsm \
 	imTextboxUtils.jsm \
 	$(NULL)
 
 include $(topsrcdir)/config/rules.mk
--- a/chat/modules/moz.build
+++ b/chat/modules/moz.build
@@ -1,7 +1,20 @@
 # 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/.
 
 XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell.ini']
 
+EXTRA_JS_MODULES += [
+    'imContentSink.jsm',
+    'imServices.jsm',
+    'imSmileys.jsm',
+    'imStatusUtils.jsm',
+    'imThemes.jsm',
+    'imXPCOMUtils.jsm',
+    'jsProtoHelper.jsm',
+    'socket.jsm',
+]
+
+if not CONFIG['MOZ_THUNDERBIRD']:
+    EXTRA_JS_MODULES += ['http.jsm']
deleted file mode 100644
--- a/chat/protocols/irc/Makefile.in
+++ /dev/null
@@ -1,29 +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@
-relativesrcdir = @relativesrcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-EXTRA_JS_MODULES = \
-		ircBase.jsm \
-		ircCAP.jsm \
-		ircCommands.jsm \
-		ircCTCP.jsm \
-		ircDCC.jsm \
-		ircHandlers.jsm \
-		ircISUPPORT.jsm \
-		ircMultiPrefix.jsm \
-		ircNonStandard.jsm \
-		ircSASL.jsm \
-		ircServices.jsm \
-		ircUtils.jsm \
-		ircWatchMonitor.jsm \
-		$(NULL)
-
-include $(topsrcdir)/config/rules.mk
--- a/chat/protocols/irc/moz.build
+++ b/chat/protocols/irc/moz.build
@@ -5,8 +5,24 @@
 
 XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell.ini']
 
 EXTRA_COMPONENTS += [
     'irc.js',
     'irc.manifest',
 ]
 
+EXTRA_JS_MODULES += [
+    'ircBase.jsm',
+    'ircCAP.jsm',
+    'ircCTCP.jsm',
+    'ircCommands.jsm',
+    'ircDCC.jsm',
+    'ircHandlers.jsm',
+    'ircISUPPORT.jsm',
+    'ircMultiPrefix.jsm',
+    'ircNonStandard.jsm',
+    'ircSASL.jsm',
+    'ircServices.jsm',
+    'ircUtils.jsm',
+    'ircWatchMonitor.jsm',
+]
+
deleted file mode 100644
--- a/chat/protocols/xmpp/Makefile.in
+++ /dev/null
@@ -1,19 +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
-
-EXTRA_JS_MODULES = \
-		xmpp.jsm \
-		xmpp-authmechs.jsm \
-		xmpp-session.jsm \
-		xmpp-xml.jsm \
-		$(NULL)
-
-include $(topsrcdir)/config/rules.mk
--- a/chat/protocols/xmpp/moz.build
+++ b/chat/protocols/xmpp/moz.build
@@ -3,8 +3,15 @@
 # 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/.
 
 EXTRA_COMPONENTS += [
     'xmpp.js',
     'xmpp.manifest',
 ]
 
+EXTRA_JS_MODULES += [
+    'xmpp-authmechs.jsm',
+    'xmpp-session.jsm',
+    'xmpp-xml.jsm',
+    'xmpp.jsm',
+]
+
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -1499,31 +1499,33 @@ endif
 
 EXTRA_MANIFESTS = $(filter %.manifest,$(EXTRA_COMPONENTS) $(EXTRA_PP_COMPONENTS))
 ifneq (,$(EXTRA_MANIFESTS))
 libs::
 	$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_TARGET)/chrome.manifest $(patsubst %,"manifest components/%",$(notdir $(EXTRA_MANIFESTS)))
 endif
 
 ################################################################################
-# Copy each element of EXTRA_JS_MODULES to JS_MODULES_PATH, or
-# $(FINAL_TARGET)/modules if that isn't defined.
-JS_MODULES_PATH ?= $(FINAL_TARGET)/modules
+# Copy each element of EXTRA_JS_MODULES to
+# $(FINAL_TARGET)/$(JS_MODULES_PATH). JS_MODULES_PATH defaults to "modules"
+# if it is undefined.
+JS_MODULES_PATH ?= modules
+FINAL_JS_MODULES_PATH := $(FINAL_TARGET)/$(JS_MODULES_PATH)
 
 ifdef EXTRA_JS_MODULES
 ifndef NO_DIST_INSTALL
 EXTRA_JS_MODULES_FILES := $(EXTRA_JS_MODULES)
-EXTRA_JS_MODULES_DEST := $(JS_MODULES_PATH)
+EXTRA_JS_MODULES_DEST := $(FINAL_JS_MODULES_PATH)
 INSTALL_TARGETS += EXTRA_JS_MODULES
 endif
 endif
 
 ifdef EXTRA_PP_JS_MODULES
 ifndef NO_DIST_INSTALL
-EXTRA_PP_JS_MODULES_PATH := $(JS_MODULES_PATH)
+EXTRA_PP_JS_MODULES_PATH := $(FINAL_JS_MODULES_PATH)
 PP_TARGETS += EXTRA_PP_JS_MODULES
 endif
 
 endif
 
 ################################################################################
 # SDK
 
--- a/editor/ui/Makefile.in
+++ b/editor/ui/Makefile.in
@@ -8,13 +8,9 @@ srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 ifndef MOZ_STANDALONE_COMPOSER
 PREF_JS_EXPORTS = $(srcdir)/composer.js
 endif
 
-EXTRA_JS_MODULES += \
-  editorUtilities.jsm \
-  $(NULL)
-
 include $(topsrcdir)/config/rules.mk
--- a/editor/ui/moz.build
+++ b/editor/ui/moz.build
@@ -7,8 +7,12 @@ DIRS += ['locales']
 
 if not CONFIG['MOZ_STANDALONE_COMPOSER']:
     if CONFIG['MOZ_SUITE']:
         EXTRA_COMPONENTS += [
             'nsComposerCmdLineHandler.js',
             'nsComposerCmdLineHandler.manifest',
         ]
 
+EXTRA_JS_MODULES += [
+    'editorUtilities.jsm',
+]
+
deleted file mode 100644
--- a/mail/base/modules/Makefile.in
+++ /dev/null
@@ -1,32 +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
-
-EXTRA_JS_MODULES = \
-  MailConsts.js \
-  MailUtils.js \
-  attachmentChecker.js \
-  dbViewWrapper.js \
-  mailViewManager.js \
-  quickFilterManager.js \
-  searchSpec.js \
-  MsgHdrSyntheticView.js \
-  sessionStoreManager.js \
-  summaryFrameManager.js \
-  mailMigrator.js \
-  mailInstrumentation.js \
-  glodaWebSearch.js \
-  oauth.jsm \
-  http.jsm \
-  distribution.js \
-  $(NULL)
-
-include $(topsrcdir)/config/rules.mk
--- a/mail/base/modules/moz.build
+++ b/mail/base/modules/moz.build
@@ -1,4 +1,24 @@
 # 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/.
+
+EXTRA_JS_MODULES += [
+    'MailConsts.js',
+    'MailUtils.js',
+    'MsgHdrSyntheticView.js',
+    'attachmentChecker.js',
+    'dbViewWrapper.js',
+    'distribution.js',
+    'glodaWebSearch.js',
+    'http.jsm',
+    'mailInstrumentation.js',
+    'mailMigrator.js',
+    'mailViewManager.js',
+    'oauth.jsm',
+    'quickFilterManager.js',
+    'searchSpec.js',
+    'sessionStoreManager.js',
+    'summaryFrameManager.js',
+]
+
deleted file mode 100644
--- a/mail/components/Makefile.in
+++ /dev/null
@@ -1,19 +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
-
-EXTRA_JS_MODULES = \
-  appIdleManager.js \
-  $(NULL)
-
-
-include $(topsrcdir)/config/rules.mk
-
deleted file mode 100644
--- a/mail/components/about-support/Makefile.in
+++ /dev/null
@@ -1,25 +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
-
-EXTRA_JS_MODULES = aboutSupport.js
-
-# Include the platform-specific module
-ifeq ($(MOZ_WIDGET_TOOLKIT), windows)
-EXTRA_JS_MODULES += aboutSupportWin32.js
-else
-ifeq ($(MOZ_WIDGET_TOOLKIT), cocoa)
-EXTRA_JS_MODULES += aboutSupportMac.js
-else
-EXTRA_JS_MODULES += aboutSupportUnix.js
-endif
-endif
-
-include $(topsrcdir)/config/rules.mk
--- a/mail/components/about-support/moz.build
+++ b/mail/components/about-support/moz.build
@@ -1,4 +1,16 @@
 # 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/.
+
+EXTRA_JS_MODULES += [
+    'aboutSupport.js',
+]
+
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
+    EXTRA_JS_MODULES += ['aboutSupportWin32.js']
+elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
+    EXTRA_JS_MODULES += ['aboutSupportMac.js']
+else:
+    EXTRA_JS_MODULES += ['aboutSupportUnix.js']
+
deleted file mode 100644
--- a/mail/components/activity/Makefile.in
+++ /dev/null
@@ -1,15 +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
-
-libs:: $(wildcard $(srcdir)/modules/*.js)
-	$(INSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/modules/activity
-
-include $(topsrcdir)/config/rules.mk
--- a/mail/components/activity/moz.build
+++ b/mail/components/activity/moz.build
@@ -13,8 +13,20 @@ MODULE = 'activity'
 
 EXTRA_COMPONENTS += [
     'activityComponents.manifest',
     'nsActivity.js',
     'nsActivityManager.js',
     'nsActivityManagerUI.js',
 ]
 
+EXTRA_JS_MODULES += [
+    'modules/activityModules.js',
+    'modules/alertHook.js',
+    'modules/autosync.js',
+    'modules/glodaIndexer.js',
+    'modules/moveCopy.js',
+    'modules/pop3Download.js',
+    'modules/sendLater.js',
+]
+
+JS_MODULES_PATH = 'modules/activity'
+
deleted file mode 100644
--- a/mail/components/cloudfile/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
-
-EXTRA_JS_MODULES = \
-  cloudFileAccounts.js \
-  $(NULL)
-
-include $(topsrcdir)/config/rules.mk
--- a/mail/components/cloudfile/moz.build
+++ b/mail/components/cloudfile/moz.build
@@ -11,8 +11,12 @@ MODULE = 'cloudfile'
 
 EXTRA_COMPONENTS += [
     'cloudFileComponents.manifest',
     'nsBox.js',
     'nsUbuntuOne.js',
     'nsYouSendIt.js',
 ]
 
+EXTRA_JS_MODULES += [
+    'cloudFileAccounts.js',
+]
+
deleted file mode 100644
--- a/mail/components/debugger/Makefile.in
+++ /dev/null
@@ -1,12 +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
--- a/mail/components/im/Makefile.in
+++ b/mail/components/im/Makefile.in
@@ -4,17 +4,11 @@
 
 DEPTH     = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-EXTRA_JS_MODULES = \
-		modules/chatHandler.jsm \
-		modules/index_im.js \
-		modules/search_im.js \
-		$(NULL)
-
 PREF_JS_EXPORTS = $(srcdir)/all-im.js
 
 include $(topsrcdir)/config/rules.mk
--- a/mail/components/im/moz.build
+++ b/mail/components/im/moz.build
@@ -4,8 +4,14 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 EXTRA_COMPONENTS += [
     'im.manifest',
     'imIncomingServer.js',
     'imProtocolInfo.js',
 ]
 
+EXTRA_JS_MODULES += [
+    'modules/chatHandler.jsm',
+    'modules/index_im.js',
+    'modules/search_im.js',
+]
+
--- a/mail/components/moz.build
+++ b/mail/components/moz.build
@@ -41,8 +41,12 @@ MODULE = 'mailcomps'
 EXTRA_COMPONENTS += [
     'aboutRedirector.js',
     'mailComponents.manifest',
     'mailContentHandler.js',
     'mailGlue.js',
     'nsMailDefaultHandler.js',
 ]
 
+EXTRA_JS_MODULES += [
+    'appIdleManager.js',
+]
+
deleted file mode 100644
--- a/mail/components/wintaskbar/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
-
-EXTRA_JS_MODULES = \
-	windowsJumpLists.js \
-	$(NULL)
-
-include $(topsrcdir)/config/rules.mk
--- a/mail/components/wintaskbar/moz.build
+++ b/mail/components/wintaskbar/moz.build
@@ -1,7 +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/.
 
 MODULE = 'wintaskbar'
 
+EXTRA_JS_MODULES += [
+    'windowsJumpLists.js',
+]
+
--- a/mailnews/base/src/Makefile.in
+++ b/mailnews/base/src/Makefile.in
@@ -15,21 +15,16 @@ ifndef MOZ_INCOMPLETE_EXTERNAL_LINKAGE
 MOZILLA_INTERNAL_API = 1
 LIBXUL_LIBRARY = 1
 endif
 
 ifdef MOZ_LDAP_XPCOM
 DEFINES         += -DMOZ_LDAP_XPCOM
 endif
 
-EXTRA_JS_MODULES = \
-		virtualFolderWrapper.js \
-		$(NULL)
-
-# we don't want the shared lib, but we want to force the creation of a static lib.
 FORCE_STATIC_LIB = 1
 
 include $(topsrcdir)/config/rules.mk
 
 ifdef MOZ_MOVEMAIL
 DEFINES	+= -DHAVE_MOVEMAIL
 endif
 
--- a/mailnews/base/src/moz.build
+++ b/mailnews/base/src/moz.build
@@ -70,8 +70,12 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'co
 
 EXTRA_COMPONENTS += [
     'msgAsyncPrompter.js',
     'msgBase.manifest',
     'newMailNotificationService.js',
     'nsMailNewsCommandLineHandler.js',
 ]
 
+EXTRA_JS_MODULES += [
+    'virtualFolderWrapper.js',
+]
+
--- a/mailnews/base/util/Makefile.in
+++ b/mailnews/base/util/Makefile.in
@@ -11,33 +11,16 @@ VPATH		= @srcdir@
 include $(DEPTH)/config/autoconf.mk
 
 LIBRARY_NAME	= msgbsutl_s
 ifndef MOZ_INCOMPLETE_EXTERNAL_LINKAGE
 MOZILLA_INTERNAL_API = 1
 LIBXUL_LIBRARY = 1
 endif
 
-EXTRA_JS_MODULES = \
-		folderUtils.jsm \
-		errUtils.js \
-		iteratorUtils.jsm \
-		jsTreeSelection.js \
-		traceHelper.js \
-		StringBundle.js \
-		templateUtils.js \
-		IOUtils.js \
-		mailnewsMigrator.js \
-		mailServices.js \
-		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
--- a/mailnews/base/util/moz.build
+++ b/mailnews/base/util/moz.build
@@ -45,8 +45,24 @@ CPP_SOURCES += [
     'nsMsgMailNewsUrl.cpp',
     'nsMsgProtocol.cpp',
     'nsMsgReadStateTxn.cpp',
     'nsMsgTxn.cpp',
     'nsMsgUtils.cpp',
     'nsStopwatch.cpp',
 ]
 
+EXTRA_JS_MODULES += [
+    'IOUtils.js',
+    'JXON.js',
+    'StringBundle.js',
+    'errUtils.js',
+    'folderUtils.jsm',
+    'hostnameUtils.jsm',
+    'iteratorUtils.jsm',
+    'jsTreeSelection.js',
+    'mailServices.js',
+    'mailnewsMigrator.js',
+    'msgDBCacheManager.js',
+    'templateUtils.js',
+    'traceHelper.js',
+]
+
deleted file mode 100644
--- a/mailnews/db/gloda/modules/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
-
-libs:: $(wildcard $(srcdir)/*.js)
-	$(INSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/modules/gloda
-
-include $(topsrcdir)/config/rules.mk
--- a/mailnews/db/gloda/modules/moz.build
+++ b/mailnews/db/gloda/modules/moz.build
@@ -1,7 +1,37 @@
 # 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 = 'mailnewsglobaldb'
 
+EXTRA_JS_MODULES += [
+    'collection.js',
+    'connotent.js',
+    'databind.js',
+    'datamodel.js',
+    'datastore.js',
+    'dbview.js',
+    'everybody.js',
+    'explattr.js',
+    'facet.js',
+    'fundattr.js',
+    'gloda.js',
+    'index_ab.js',
+    'index_msg.js',
+    'indexer.js',
+    'log4moz.js',
+    'mimeTypeCategories.js',
+    'mimemsg.js',
+    'msg_search.js',
+    'noun_freetag.js',
+    'noun_mimetype.js',
+    'noun_tag.js',
+    'public.js',
+    'query.js',
+    'suffixtree.js',
+    'utils.js',
+]
+
+JS_MODULES_PATH = 'modules/gloda'
+
--- a/mailnews/mime/Makefile.in
+++ b/mailnews/mime/Makefile.in
@@ -8,16 +8,10 @@ topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 libs:: jsmime/mimeParser.jsm
 	$(call install_cmd,$(IFLAGS1) $^ $(FINAL_TARGET)/modules)
 
-JS_MODULES_PATH = $(FINAL_TARGET)/modules/mime
-
-EXTRA_JS_MODULES = \
-  jsmime/mimeParserCore.js \
-  $(NULL)
-
 include $(topsrcdir)/config/rules.mk
 
--- a/mailnews/mime/moz.build
+++ b/mailnews/mime/moz.build
@@ -9,8 +9,14 @@ PARALLEL_DIRS += [
     'emitters',
     'cthandlers',
 ]
 
 TEST_DIRS += ['test']
 
 MODULE = 'mime'
 
+EXTRA_JS_MODULES += [
+    'jsmime/mimeParserCore.js',
+]
+
+JS_MODULES_PATH = 'modules/mime'
+
deleted file mode 100644
--- a/suite/common/src/Makefile.in
+++ /dev/null
@@ -1,18 +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
-
-EXTRA_JS_MODULES = \
-	PlacesUIUtils.jsm \
-	$(NULL)
-
-include $(topsrcdir)/config/rules.mk
-
--- a/suite/common/src/moz.build
+++ b/suite/common/src/moz.build
@@ -13,8 +13,12 @@ EXTRA_COMPONENTS += [
     'nsSuiteDownloadManagerUI.js',
     'nsSuiteGlue.js',
 ]
 
 EXTRA_PP_COMPONENTS += [
     'nsSessionStore.js',
 ]
 
+EXTRA_JS_MODULES += [
+    'PlacesUIUtils.jsm',
+]
+
deleted file mode 100644
--- a/suite/mailnews/modules/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@
-VPATH     = @srcdir@
-topsrcdir = @top_srcdir@
-srcdir    = @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-EXTRA_JS_MODULES = \
-  MailUtils.js \
-  $(NULL)
-
-include $(topsrcdir)/config/rules.mk
--- a/suite/mailnews/modules/moz.build
+++ b/suite/mailnews/modules/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/.
+
+EXTRA_JS_MODULES += [
+    'MailUtils.js',
+]
+
deleted file mode 100644
--- a/suite/modules/Makefile.in
+++ /dev/null
@@ -1,25 +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@
-VPATH     = @srcdir@
-topsrcdir = @top_srcdir@
-srcdir    = @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-EXTRA_JS_MODULES = \
-  DownloadTaskbarIntegration.jsm \
-  Sanitizer.jsm \
-  WindowsPreviewPerTab.jsm \
-  $(NULL)
-
-ifeq ($(OS_ARCH),WINNT)
-EXTRA_JS_MODULES += \
-  WindowsJumpLists.jsm \
-  $(NULL)
-endif
-
-
-include $(topsrcdir)/config/rules.mk
--- a/suite/modules/moz.build
+++ b/suite/modules/moz.build
@@ -1,7 +1,16 @@
 # 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']
 
+EXTRA_JS_MODULES += [
+    'DownloadTaskbarIntegration.jsm',
+    'Sanitizer.jsm',
+    'WindowsPreviewPerTab.jsm',
+]
+
+if CONFIG['OS_ARCH'] == 'WINNT':
+    EXTRA_JS_MODULES += ['WindowsJumpLists.jsm']
+