diff --git a/content/html/document/src/Makefile.in b/content/html/document/src/Makefile.in
index ff032310582..9c5571b1fb7 100644
--- a/content/html/document/src/Makefile.in
+++ b/content/html/document/src/Makefile.in
@@ -28,7 +28,7 @@ include $(DEPTH)/config/autoconf.mk
MODULE = layout
LIBRARY_NAME = gkconhtmldoc_s
-REQUIRES = xpcom string widget dom necko htmlparser locale view js intl webshell docshell cookie caps util timer uconv pref uriloader rdf chardet nkcache appcomps lwbrk gfx2 imglib2
+REQUIRES = xpcom string widget dom necko htmlparser locale view js intl webshell docshell cookie caps util timer uconv pref uriloader rdf chardet nkcache appcomps lwbrk gfx2 imglib2 xpconnect
CPPSRCS = \
nsHTMLContentSink.cpp \
diff --git a/content/xml/content/src/Makefile.in b/content/xml/content/src/Makefile.in
index b04aa3fc81a..08eee891753 100644
--- a/content/xml/content/src/Makefile.in
+++ b/content/xml/content/src/Makefile.in
@@ -28,7 +28,7 @@ include $(DEPTH)/config/autoconf.mk
MODULE = layout
LIBRARY_NAME = gkconxmlcon_s
-REQUIRES = xpcom string js dom widget locale necko caps webshell docshell htmlparser uriloader gfx2
+REQUIRES = xpcom string js dom widget locale necko caps webshell docshell htmlparser uriloader gfx2 xpconnect
CPPSRCS = \
nsXMLElement.cpp \
diff --git a/content/xul/content/src/Makefile.in b/content/xul/content/src/Makefile.in
index 84f58ea7d0f..a00e0845d39 100644
--- a/content/xul/content/src/Makefile.in
+++ b/content/xul/content/src/Makefile.in
@@ -28,7 +28,7 @@ include $(DEPTH)/config/autoconf.mk
MODULE = layout
LIBRARY_NAME = gkconxulcon_s
-REQUIRES = xpcom string widget htmlparser necko dom js caps rdf xpconnect locale timer lwbrk pref xul xuldoc xultmpl gfx2
+REQUIRES = xpcom string widget htmlparser necko dom js caps rdf xpconnect locale timer lwbrk pref xul xuldoc xultmpl gfx2 webshell
CPPSRCS = \
nsRDFDOMNodeList.cpp \
diff --git a/docshell/build/Makefile.in b/docshell/build/Makefile.in
index 7931429054b..3e25de41097 100644
--- a/docshell/build/Makefile.in
+++ b/docshell/build/Makefile.in
@@ -30,7 +30,7 @@ include $(DEPTH)/config/autoconf.mk
LIBRARY_NAME = docshell
EXPORT_LIBRARY = 1
-REQUIRES = xpcom string dom shistory necko layout uriloader timer webshell widget pref locale view intl htmlparser chardet appcomps gfx2 find
+REQUIRES = xpcom string dom shistory necko layout uriloader timer webshell widget pref locale view intl htmlparser chardet appcomps gfx2 find js
CPPSRCS = \
nsDocShellModule.cpp \
diff --git a/dom/src/base/Makefile.in b/dom/src/base/Makefile.in
index a1eb1fd48a7..524dbd8e035 100644
--- a/dom/src/base/Makefile.in
+++ b/dom/src/base/Makefile.in
@@ -28,7 +28,7 @@ include $(DEPTH)/config/autoconf.mk
MODULE = dom
LIBRARY_NAME = jsdombase_s
-REQUIRES = xpcom string webbrwsr js widget layout caps docshell xpconnect pref oji necko java locale uriloader sidebar xuldoc timer webshell view uconv shistory plugin windowwatcher gfx2
+REQUIRES = xpcom string webbrwsr js widget layout caps docshell xpconnect pref oji necko java locale uriloader sidebar xuldoc timer webshell view uconv shistory plugin windowwatcher gfx2 htmlparser
CPPSRCS = \
nsBarProps.cpp \
diff --git a/dom/src/build/Makefile.in b/dom/src/build/Makefile.in
index b5816b0ac7e..b4f7f9439e4 100644
--- a/dom/src/build/Makefile.in
+++ b/dom/src/build/Makefile.in
@@ -29,7 +29,7 @@ include $(DEPTH)/config/autoconf.mk
MODULE = dom
LIBRARY_NAME = jsdom
EXPORT_LIBRARY = 1
-REQUIRES = xpcom string js xpconnect widget layout pref
+REQUIRES = xpcom string js xpconnect widget layout pref caps timer locale webbrwsr gfx2 xuldoc docshell sidebar plugin necko
IS_COMPONENT = 1
CPPSRCS = \
diff --git a/dom/src/jsurl/Makefile.in b/dom/src/jsurl/Makefile.in
index 68f6cb20754..b10a7158317 100644
--- a/dom/src/jsurl/Makefile.in
+++ b/dom/src/jsurl/Makefile.in
@@ -30,7 +30,7 @@ MODULE = jsurl
LIBRARY_NAME = jsurl
EXPORT_LIBRARY = 1
IS_COMPONENT = 1
-REQUIRES = xpcom string js dom necko caps widget layout docshell uriloader locale appshell rdf gfx2
+REQUIRES = xpcom string js dom necko caps widget layout docshell uriloader locale appshell rdf gfx2 xpconnect
XPIDLSRCS = \
nsIEvaluateStringProxy.idl \
diff --git a/embedding/browser/build/Makefile.in b/embedding/browser/build/Makefile.in
index 06125b3ef88..a0f6d574d4b 100644
--- a/embedding/browser/build/Makefile.in
+++ b/embedding/browser/build/Makefile.in
@@ -31,7 +31,7 @@ include $(DEPTH)/config/autoconf.mk
LIBRARY_NAME = webbrwsr
EXPORT_LIBRARY = 1
-REQUIRES = xpcom string docshell dom widget layout locale necko uriloader shistory timer gfx2 windowwatcher
+REQUIRES = xpcom string docshell dom widget layout locale necko uriloader shistory timer gfx2 windowwatcher js
CPPSRCS = \
nsWebBrowserModule.cpp \
diff --git a/embedding/tests/gtkEmbed/Makefile.in b/embedding/tests/gtkEmbed/Makefile.in
index 5009e428270..5dad5a1ca73 100644
--- a/embedding/tests/gtkEmbed/Makefile.in
+++ b/embedding/tests/gtkEmbed/Makefile.in
@@ -24,7 +24,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
-REQUIRES = xpcom string webbrwsr widget necko docshell layout webshell dom locale uriloader embed_base windowwatcher gfx2
+REQUIRES = xpcom string webbrwsr widget necko docshell layout webshell dom locale uriloader embed_base windowwatcher gfx2 js
CPPSRCS = WebBrowserChrome.cpp \
WindowCreator.cpp \
diff --git a/layout/html/base/src/Makefile.in b/layout/html/base/src/Makefile.in
index 5c4c4134d18..78327908d4c 100644
--- a/layout/html/base/src/Makefile.in
+++ b/layout/html/base/src/Makefile.in
@@ -28,7 +28,7 @@ include $(DEPTH)/config/autoconf.mk
MODULE = layout
LIBRARY_NAME = gkhtmlbase_s
-REQUIRES = xpcom string dom widget locale view necko js caps pref htmlparser webshell plugin timer docshell mimetype webbrwsr oji util uriloader unicharutil lwbrk gfx2 imglib2 accessibility
+REQUIRES = xpcom string dom widget locale view necko js caps pref htmlparser webshell plugin timer docshell mimetype webbrwsr oji util uriloader unicharutil lwbrk gfx2 imglib2 accessibility xpconnect
CPPSRCS = \
nsSelectsAreaFrame.cpp \
diff --git a/layout/html/document/src/Makefile.in b/layout/html/document/src/Makefile.in
index efc705841ef..7c98746fd11 100644
--- a/layout/html/document/src/Makefile.in
+++ b/layout/html/document/src/Makefile.in
@@ -28,7 +28,7 @@ include $(DEPTH)/config/autoconf.mk
MODULE = layout
LIBRARY_NAME = gkhtmldoc_s
-REQUIRES = xpcom string widget dom necko locale view js webshell docshell caps pref uriloader shistory gfx2
+REQUIRES = xpcom string widget dom necko locale view js webshell docshell caps pref uriloader shistory gfx2 xpconnect
CPPSRCS = \
nsFrameFrame.cpp \
diff --git a/layout/html/forms/src/Makefile.in b/layout/html/forms/src/Makefile.in
index fc35a25d924..bd04896a953 100644
--- a/layout/html/forms/src/Makefile.in
+++ b/layout/html/forms/src/Makefile.in
@@ -28,7 +28,7 @@ include $(DEPTH)/config/autoconf.mk
MODULE = layout
LIBRARY_NAME = gkhtmlforms_s
-REQUIRES = xpcom string locale widget view dom js htmlparser necko webshell caps editor intl uconv exthandler mimetype txmgr xuldoc gfx2 imglib2 accessibility
+REQUIRES = xpcom string locale widget view dom js htmlparser necko webshell caps editor intl uconv exthandler mimetype txmgr xuldoc gfx2 imglib2 accessibility xpconnect
CPPSRCS = \
nsButtonFrameRenderer.cpp \
diff --git a/mailnews/absync/src/Makefile.in b/mailnews/absync/src/Makefile.in
index d139e05d31d..57c26300e83 100644
--- a/mailnews/absync/src/Makefile.in
+++ b/mailnews/absync/src/Makefile.in
@@ -29,7 +29,7 @@ include $(DEPTH)/config/autoconf.mk
MODULE = absyncsvc
XPIDL_MODULE = absync
LIBRARY_NAME = absync_s
-REQUIRES = xpcom string necko mime cookie docshell locale uriloader pref layout widget msgbase msgbaseutil dom rdf addrbook intl locale mork mimetype gfx2 windowwatcher
+REQUIRES = xpcom string necko mime cookie docshell locale uriloader pref layout widget msgbase msgbaseutil dom rdf addrbook intl locale mork mimetype gfx2 windowwatcher js
CPPSRCS = \
nsAbSyncPostEngine.cpp \
diff --git a/mailnews/addrbook/build/Makefile.in b/mailnews/addrbook/build/Makefile.in
index a91b8cc37da..8602ef2963f 100644
--- a/mailnews/addrbook/build/Makefile.in
+++ b/mailnews/addrbook/build/Makefile.in
@@ -30,7 +30,7 @@ MODULE = addrbook
LIBRARY_NAME = addrbook
EXPORT_LIBRARY = 1
IS_COMPONENT = 1
-REQUIRES = xpcom string addrbook necko msgcompose mime msgbase rdf rdfutil docshell appshell dom widget uriloader layout locale mork xuldoc gfx2 appcomps
+REQUIRES = xpcom string addrbook necko msgcompose mime msgbase rdf rdfutil docshell appshell dom widget uriloader layout locale mork xuldoc gfx2 appcomps js
CPPSRCS = nsAbFactory.cpp
EXPORTS = nsAbBaseCID.h
diff --git a/mailnews/base/util/Makefile.in b/mailnews/base/util/Makefile.in
index 83c3919af9d..fc2755b6c4f 100644
--- a/mailnews/base/util/Makefile.in
+++ b/mailnews/base/util/Makefile.in
@@ -30,7 +30,7 @@ MODULE = msgbaseutil
LIBRARY_NAME = msgbaseutil
EXPORT_LIBRARY = 1
SHORT_LIBNAME = msgbsutl
-REQUIRES = xpcom string msgbase rdf necko msgdb intl mork mailnews locale pref rdfutil rdfutil mime msgcompose docshell webshell wallet dom widget layout uriloader appshell msgimap msglocal msgnews txmgr uconv unicharutil nkcache mimetype gfx2 windowwatcher
+REQUIRES = xpcom string msgbase rdf necko msgdb intl mork mailnews locale pref rdfutil rdfutil mime msgcompose docshell webshell wallet dom widget layout uriloader appshell msgimap msglocal msgnews txmgr uconv unicharutil nkcache mimetype gfx2 windowwatcher js
CPPSRCS = \
nsMsgGroupRecord.cpp \
diff --git a/mailnews/mime/src/Makefile.in b/mailnews/mime/src/Makefile.in
index 11749edd61b..3a6f3b1aa1d 100644
--- a/mailnews/mime/src/Makefile.in
+++ b/mailnews/mime/src/Makefile.in
@@ -28,7 +28,7 @@ include $(DEPTH)/config/autoconf.mk
MODULE = mime
LIBRARY_NAME = mime_s
-REQUIRES = xpcom string msgbase msgbaseutil pref js necko uconv msgcompose editor dom layout intl msgimap exthandler mailnews locale msgdb chardet caps txmgr mimetype uriloader
+REQUIRES = xpcom string msgbase msgbaseutil pref js necko uconv msgcompose editor dom layout intl msgimap exthandler mailnews locale msgdb chardet caps txmgr mimetype uriloader xpconnect
CPPSRCS = \
nsMimeObjectClassAccess.cpp \
diff --git a/modules/plugin/base/src/Makefile.in b/modules/plugin/base/src/Makefile.in
index 27f88df1762..d8bb29b7898 100644
--- a/modules/plugin/base/src/Makefile.in
+++ b/modules/plugin/base/src/Makefile.in
@@ -31,7 +31,7 @@ XPIDL_MODULE = layout
LIBRARY_NAME = gkplugin
EXPORT_LIBRARY = 1
IS_COMPONENT = 1
-REQUIRES = xpcom string java pref necko gtkxtbin webshell caps intl dom locale layout widget cookie mimetype oji exthandler docshell webbrwsr nkcache gfx2 timer windowwatcher
+REQUIRES = xpcom string java pref necko gtkxtbin webshell caps intl dom locale layout widget cookie mimetype oji exthandler docshell webbrwsr nkcache gfx2 timer windowwatcher js
# for xlib port
REQUIRES += xlibrgb
diff --git a/modules/plugin/nglsrc/Makefile.in b/modules/plugin/nglsrc/Makefile.in
index 27f88df1762..d8bb29b7898 100644
--- a/modules/plugin/nglsrc/Makefile.in
+++ b/modules/plugin/nglsrc/Makefile.in
@@ -31,7 +31,7 @@ XPIDL_MODULE = layout
LIBRARY_NAME = gkplugin
EXPORT_LIBRARY = 1
IS_COMPONENT = 1
-REQUIRES = xpcom string java pref necko gtkxtbin webshell caps intl dom locale layout widget cookie mimetype oji exthandler docshell webbrwsr nkcache gfx2 timer windowwatcher
+REQUIRES = xpcom string java pref necko gtkxtbin webshell caps intl dom locale layout widget cookie mimetype oji exthandler docshell webbrwsr nkcache gfx2 timer windowwatcher js
# for xlib port
REQUIRES += xlibrgb
diff --git a/netwerk/protocol/http/src/Makefile.in b/netwerk/protocol/http/src/Makefile.in
index da63e8ca2de..fd4e3b200d4 100644
--- a/netwerk/protocol/http/src/Makefile.in
+++ b/netwerk/protocol/http/src/Makefile.in
@@ -28,7 +28,7 @@ include $(DEPTH)/config/autoconf.mk
MODULE = necko
LIBRARY_NAME = nkhttp_s
-REQUIRES = xpcom string pref js nkcache exthandler mimetype wallet dom layout widget caps
+REQUIRES = xpcom string pref js nkcache exthandler mimetype wallet dom layout widget caps xpconnect
CPPSRCS = \
nsHTTPHandler.cpp \
diff --git a/rdf/chrome/src/Makefile.in b/rdf/chrome/src/Makefile.in
index 723ad50c81b..bf21fd3c76d 100644
--- a/rdf/chrome/src/Makefile.in
+++ b/rdf/chrome/src/Makefile.in
@@ -28,7 +28,7 @@ include $(DEPTH)/config/autoconf.mk
MODULE = rdfbase
LIBRARY_NAME = chrome_s
-REQUIRES = xpcom string rdf xuldoc layout necko dom intl locale widget js appshell chrome caps pref docshell uriloader gfx2 imglib2
+REQUIRES = xpcom string rdf xuldoc layout necko dom intl locale widget js appshell chrome caps pref docshell uriloader gfx2 imglib2 xpconnect
CPPSRCS = \
nsChromeRegistry.cpp \
diff --git a/webshell/tests/viewer/Makefile.in b/webshell/tests/viewer/Makefile.in
index 57e4415ca13..ede5dacd851 100644
--- a/webshell/tests/viewer/Makefile.in
+++ b/webshell/tests/viewer/Makefile.in
@@ -29,7 +29,7 @@ include $(DEPTH)/config/autoconf.mk
DIRS := public
MODULE = webshell_tests
-REQUIRES = xpcom string webshell widget layout dom webbrwsr docshell util uriloader locale necko htmlparser view timer unicharutil pref intl editor chardet cookie gfx2 txmgr
+REQUIRES = xpcom string webshell widget layout dom webbrwsr docshell util uriloader locale necko htmlparser view timer unicharutil pref intl editor chardet cookie gfx2 txmgr js
PROGRAM := viewer$(BIN_SUFFIX)