bug 886526 - remove IS_COMPONENT and MODULE_NAME makefile vars for things in libxul r=bsmedberg r=glandium
authorTrevor Saunders <trev.saunders@gmail.com>
Thu, 08 Aug 2013 20:12:37 -0400
changeset 150086 cb5af54006d6455a796586a2766d7c9b9aea6450
parent 150018 03fbbe116b7e1ffcecd5a680f51d45ef4b1f7952
child 150087 50b000502edadd181abc20575a099c05d2074636
push idunknown
push userunknown
push dateunknown
reviewersbsmedberg, glandium
bugs886526
milestone26.0a1
bug 886526 - remove IS_COMPONENT and MODULE_NAME makefile vars for things in libxul r=bsmedberg r=glandium
config/config.mk
docshell/build/Makefile.in
dom/media/bridge/Makefile.in
dom/plugins/base/Makefile.in
dom/src/jsurl/Makefile.in
editor/composer/src/Makefile.in
editor/txmgr/src/Makefile.in
editor/txtsvc/src/Makefile.in
embedding/browser/build/Makefile.in
embedding/components/build/Makefile.in
extensions/auth/Makefile.in
extensions/cookie/Makefile.in
extensions/gio/Makefile.in
extensions/permissions/Makefile.in
extensions/pref/autoconfig/src/Makefile.in
extensions/spellcheck/src/Makefile.in
extensions/universalchardet/src/xpcom/Makefile.in
gfx/src/Makefile.in
gfx/tests/gtest/Makefile.in
image/build/Makefile.in
image/decoders/Makefile.in
image/decoders/icon/Makefile.in
image/encoders/bmp/Makefile.in
image/encoders/ico/Makefile.in
image/encoders/jpeg/Makefile.in
image/encoders/png/Makefile.in
image/src/Makefile.in
intl/build/Makefile.in
intl/chardet/src/Makefile.in
intl/uconv/src/Makefile.in
intl/uconv/util/Makefile.in
js/ductwork/debugger/Makefile.in
js/jsd/Makefile.in
js/src/config/config.mk
layout/build/Makefile.in
layout/tools/layout-debug/src/Makefile.in
mobile/android/components/build/Makefile.in
modules/libjar/Makefile.in
modules/libjar/zipwriter/src/Makefile.in
modules/libpref/src/Makefile.in
netwerk/build/Makefile.in
parser/htmlparser/src/Makefile.in
rdf/build/Makefile.in
security/manager/boot/src/Makefile.in
security/manager/pki/src/Makefile.in
security/manager/ssl/src/Makefile.in
services/crypto/component/Makefile.in
startupcache/Makefile.in
storage/build/Makefile.in
storage/src/Makefile.in
testing/gtest/Makefile.in
toolkit/components/autocomplete/Makefile.in
toolkit/components/build/Makefile.in
toolkit/components/commandlines/Makefile.in
toolkit/components/ctypes/Makefile.in
toolkit/components/diskspacewatcher/Makefile.in
toolkit/components/filepicker/Makefile.in
toolkit/components/mediasniffer/Makefile.in
toolkit/components/perf/Makefile.in
toolkit/components/places/Makefile.in
toolkit/components/reflect/Makefile.in
toolkit/components/remote/Makefile.in
toolkit/components/satchel/Makefile.in
toolkit/components/statusfilter/Makefile.in
toolkit/components/telemetry/Makefile.in
toolkit/devtools/server/Makefile.in
toolkit/identity/Makefile.in
toolkit/library/Makefile.in
toolkit/system/androidproxy/Makefile.in
toolkit/system/osxproxy/Makefile.in
toolkit/system/unixproxy/Makefile.in
toolkit/system/windowsproxy/Makefile.in
tools/profiler/Makefile.in
view/src/Makefile.in
widget/android/Makefile.in
widget/cocoa/Makefile.in
widget/gonk/Makefile.in
widget/gtk2/Makefile.in
widget/os2/Makefile.in
widget/qt/Makefile.in
widget/windows/Makefile.in
widget/windows/winrt/Makefile.in
xpcom/glue/tests/gtest/Makefile.in
xpfe/appshell/src/Makefile.in
xpfe/components/autocomplete/src/Makefile.in
xpfe/components/build/Makefile.in
xpfe/components/windowds/Makefile.in
--- a/config/config.mk
+++ b/config/config.mk
@@ -230,19 +230,20 @@ endif
 #
 _ENABLE_PIC=1
 
 # Determine if module being compiled is destined
 # to be merged into libxul
 
 ifdef LIBXUL_LIBRARY
 ifdef IS_COMPONENT
-ifndef MODULE_NAME
-$(error Component makefile does not specify MODULE_NAME.)
+$(error IS_COMPONENT is set, but is not compatible with LIBXUL_LIBRARY)
 endif
+ifdef MODULE_NAME
+$(error MODULE_NAME is $(MODULE_NAME) but MODULE_NAME and LIBXUL_LIBRARY are not compatible)
 endif
 ifdef FORCE_STATIC_LIB
 $(error Makefile sets FORCE_STATIC_LIB which was already implied by LIBXUL_LIBRARY)
 endif
 FORCE_STATIC_LIB=1
 ifneq ($(SHORT_LIBNAME),)
 $(error SHORT_LIBNAME is $(SHORT_LIBNAME) but SHORT_LIBNAME is not compatable with LIBXUL_LIBRARY)
 endif
--- a/docshell/build/Makefile.in
+++ b/docshell/build/Makefile.in
@@ -3,18 +3,16 @@
 # 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@
 
-IS_COMPONENT = 1
-MODULE_NAME	= docshell_provider
 
 include $(DEPTH)/config/autoconf.mk
 
 EXPORT_LIBRARY = 1
 LIBXUL_LIBRARY	= 1
 
 
 SHARED_LIBRARY_LIBS= \
--- a/dom/media/bridge/Makefile.in
+++ b/dom/media/bridge/Makefile.in
@@ -4,19 +4,17 @@
 
 DEPTH   = ../../..
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH   = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-MODULE_NAME   = peerconnection
 
-IS_COMPONENT   = 1
 EXPORT_LIBRARY = 1
 LIBXUL_LIBRARY = 1
 
 LOCAL_INCLUDES += \
   -I$(topsrcdir)/media/mtransport \
   -I$(topsrcdir)/media/webrtc/signaling/include \
   -I$(topsrcdir)/media/webrtc/signaling/src/sipcc/include \
   -I$(topsrcdir)/media/webrtc/signaling/src/peerconnection \
--- a/dom/plugins/base/Makefile.in
+++ b/dom/plugins/base/Makefile.in
@@ -8,18 +8,16 @@ topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 LIBRARY_NAME	= gkplugin
 MSVC_ENABLE_PGO := 1
 EXPORT_LIBRARY = 1
-IS_COMPONENT    = 1
-MODULE_NAME	= nsPluginModule
 LIBXUL_LIBRARY = 1
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),android)
 LOCAL_INCLUDES += -I$(topsrcdir)/dom/plugins/base/android
 else
 # android_npapi.h extends the NPNVariable and NPPVariable enums
 # using #defines, which results in Wswitch warnings in gcc-4.6.
 # Therefore, enable FAIL_ON_WARNINGS only on non-Android platforms.
--- a/dom/src/jsurl/Makefile.in
+++ b/dom/src/jsurl/Makefile.in
@@ -6,17 +6,16 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 FAIL_ON_WARNINGS := 1
 
 include $(DEPTH)/config/autoconf.mk
 
-MODULE_NAME	= javascript__protocol
 LIBXUL_LIBRARY	= 1
 
 LOCAL_INCLUDES += \
 		-I$(srcdir) \
 		-I$(topsrcdir)/dom/base \
 		-I$(topsrcdir)/netwerk/base/src \
 
 ifdef BUILD_DEBUG_GC
--- a/editor/composer/src/Makefile.in
+++ b/editor/composer/src/Makefile.in
@@ -6,18 +6,16 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 EXPORT_LIBRARY = 1
-IS_COMPONENT	= 1
-MODULE_NAME	= nsComposerModule
 LIBXUL_LIBRARY	= 1
 FAIL_ON_WARNINGS = 1
 
 
 include $(topsrcdir)/config/rules.mk
 
 INCLUDES        += \
 	$(NULL)
--- a/editor/txmgr/src/Makefile.in
+++ b/editor/txmgr/src/Makefile.in
@@ -7,15 +7,13 @@ DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 FAIL_ON_WARNINGS = 1
 
 include $(DEPTH)/config/autoconf.mk
 
 EXPORT_LIBRARY = 1
-IS_COMPONENT	= 1
-MODULE_NAME	= nsTransactionManagerModule
 LIBXUL_LIBRARY	= 1
 
 
 include $(topsrcdir)/config/rules.mk
 
--- a/editor/txtsvc/src/Makefile.in
+++ b/editor/txtsvc/src/Makefile.in
@@ -6,14 +6,13 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 FAIL_ON_WARNINGS = 1
 
 include $(DEPTH)/config/autoconf.mk
 
-MODULE_NAME	= nsTextServicesModule
 LIBXUL_LIBRARY	= 1
 
 
 include $(topsrcdir)/config/rules.mk
 
--- a/embedding/browser/build/Makefile.in
+++ b/embedding/browser/build/Makefile.in
@@ -5,18 +5,16 @@
 
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-IS_COMPONENT	= 1
-MODULE_NAME	= Browser_Embedding_Module
 EXPORT_LIBRARY	= 1
 LIBXUL_LIBRARY	= 1
 FAIL_ON_WARNINGS = 1
 
 
 SHARED_LIBRARY_LIBS= \
 		../webBrowser/$(LIB_PREFIX)nsWebBrowser_s.$(LIB_SUFFIX) \
 		$(NULL)
--- a/embedding/components/build/Makefile.in
+++ b/embedding/components/build/Makefile.in
@@ -5,18 +5,16 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 EXPORT_LIBRARY = 1
-IS_COMPONENT	= 1
-MODULE_NAME	= embedcomponents
 LIBXUL_LIBRARY	= 1
 FAIL_ON_WARNINGS = 1
 
 SHARED_LIBRARY_LIBS = \
 	../windowwatcher/src/$(LIB_PREFIX)windowwatcher_s.$(LIB_SUFFIX) \
 	../appstartup/src/$(LIB_PREFIX)appstartupnotifier_s.$(LIB_SUFFIX) \
 	../find/src/$(LIB_PREFIX)find_s.$(LIB_SUFFIX) \
 	../webbrowserpersist/src/$(LIB_PREFIX)webbrowserpersist_s.$(LIB_SUFFIX) \
--- a/extensions/auth/Makefile.in
+++ b/extensions/auth/Makefile.in
@@ -5,19 +5,17 @@
 
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-IS_COMPONENT	= 1
 EXPORT_LIBRARY	= 1
-MODULE_NAME	= nsAuthModule
 LIBXUL_LIBRARY = 1
 
 
 ifeq ($(OS_ARCH),WINNT)
 LOCAL_INCLUDES	+= -DUSE_SSPI
 endif
 
 include $(topsrcdir)/config/rules.mk
--- a/extensions/cookie/Makefile.in
+++ b/extensions/cookie/Makefile.in
@@ -8,16 +8,14 @@ topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 LIBRARY_NAME	= cookie
 MSVC_ENABLE_PGO := 1
 EXPORT_LIBRARY = 1
-IS_COMPONENT	= 1
-MODULE_NAME	= nsCookieModule
 LIBXUL_LIBRARY = 1
 
 
 include $(topsrcdir)/config/config.mk
 include $(topsrcdir)/config/rules.mk
 include $(topsrcdir)/ipc/chromium/chromium-config.mk
--- a/extensions/gio/Makefile.in
+++ b/extensions/gio/Makefile.in
@@ -5,17 +5,15 @@
 
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-IS_COMPONENT	= 1
 EXPORT_LIBRARY	= 1
-MODULE_NAME	= nsGIOModule
 LIBXUL_LIBRARY	= 1
 FAIL_ON_WARNINGS = 1
 
 LOCAL_INCLUDES	= $(MOZ_GIO_CFLAGS)
 
 include $(topsrcdir)/config/rules.mk
--- a/extensions/permissions/Makefile.in
+++ b/extensions/permissions/Makefile.in
@@ -5,14 +5,12 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 EXPORT_LIBRARY	= 1
-IS_COMPONENT	= 1
-MODULE_NAME	= nsPermissionsModule
 LIBXUL_LIBRARY = 1
 
 
 include $(topsrcdir)/config/rules.mk
--- a/extensions/pref/autoconfig/src/Makefile.in
+++ b/extensions/pref/autoconfig/src/Makefile.in
@@ -6,18 +6,16 @@ DEPTH            = @DEPTH@
 topsrcdir        = @top_srcdir@
 srcdir           = @srcdir@
 VPATH            = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 LIBRARY_NAME     = autoconfig
 EXPORT_LIBRARY   = 1
-IS_COMPONENT     = 1
-MODULE_NAME      = nsAutoConfigModule
 LIBXUL_LIBRARY   = 1
 
 
 include $(topsrcdir)/config/config.mk
 
 AUTOCFG_JS_EXPORTS = \
 		$(srcdir)/prefcalls.js \
 		$(NULL)
--- a/extensions/spellcheck/src/Makefile.in
+++ b/extensions/spellcheck/src/Makefile.in
@@ -4,19 +4,17 @@
 
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-MODULE_NAME     = mozSpellCheckerModule
 EXPORT_LIBRARY  = 1
-IS_COMPONENT	= 1
 LIBXUL_LIBRARY  = 1
 
 
 SHARED_LIBRARY_LIBS += ../hunspell/src/$(LIB_PREFIX)hunspell_s.$(LIB_SUFFIX)
 
 include $(topsrcdir)/config/rules.mk
 
 LOCAL_INCLUDES += \
--- a/extensions/universalchardet/src/xpcom/Makefile.in
+++ b/extensions/universalchardet/src/xpcom/Makefile.in
@@ -6,18 +6,16 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 EXPORT_LIBRARY	= 1
-IS_COMPONENT	= 1
-MODULE_NAME	= nsUniversalCharDetModule
 LIBXUL_LIBRARY = 1
 
 LOCAL_INCLUDES = -I$(srcdir)/../base
 
 SHARED_LIBRARY_LIBS = \
 		../base/$(LIB_PREFIX)universalchardet_s.$(LIB_SUFFIX) \
 		$(NULL)
 
--- a/gfx/src/Makefile.in
+++ b/gfx/src/Makefile.in
@@ -5,21 +5,19 @@
 
 DEPTH       = @DEPTH@
 topsrcdir   = @top_srcdir@
 srcdir      = @srcdir@
 VPATH       = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-MODULE_NAME    = nsGfxModule
 MSVC_ENABLE_PGO := 1
 EXPORT_LIBRARY = 1
 LIBXUL_LIBRARY = 1
-IS_COMPONENT   = 1
 FAIL_ON_WARNINGS = 1
 
 include $(topsrcdir)/config/rules.mk
 
 CXXFLAGS += $(MOZ_CAIRO_CFLAGS) $(MOZ_PIXMAN_CFLAGS) $(TK_CFLAGS)
 
 ifdef MOZ_WIDGET_GTK
 CXXFLAGS += $(MOZ_PANGO_CFLAGS)
--- a/gfx/tests/gtest/Makefile.in
+++ b/gfx/tests/gtest/Makefile.in
@@ -9,19 +9,17 @@ srcdir         = @srcdir@
 VPATH          = @srcdir@ $(srcdir)/$(DEPTH)/gfx/2d/unittest
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 CXXFLAGS += $(MOZ_CAIRO_CFLAGS) $(MOZ_PIXMAN_CFLAGS) $(TK_CFLAGS) 
 
 # Create a GTest library
-MODULE_NAME    = gfxtest
 LIBXUL_LIBRARY = 1
-IS_COMPONENT   = 1
 EXPORT_LIBRARY = 1
 
 LOCAL_INCLUDES = \
   -I$(topsrcdir)/gfx/layers \
   -I$(topsrcdir)/gfx/2d \
   -I$(topsrcdir)/gfx/2d/unittest \
   $(NULL)
 
--- a/image/build/Makefile.in
+++ b/image/build/Makefile.in
@@ -6,18 +6,16 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 EXPORT_LIBRARY = 1
-IS_COMPONENT	= 1
-MODULE_NAME	= nsImageLib2Module
 LIBXUL_LIBRARY = 1
 FAIL_ON_WARNINGS = 1
 
 LOCAL_INCLUDES	= \
 		-I. \
 		-I$(srcdir)/../src \
 		-I$(srcdir)/../encoders/ico \
 		-I$(srcdir)/../encoders/png \
--- a/image/decoders/Makefile.in
+++ b/image/decoders/Makefile.in
@@ -5,17 +5,16 @@
 
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-MODULE_NAME = nsDecodersModule
 LIBXUL_LIBRARY  = 1
 FAIL_ON_WARNINGS = 1
 
 CSRCS   = iccjpeg.c \
           $(NULL)
 
 # Decoders need RasterImage.h
 LOCAL_INCLUDES += -I$(topsrcdir)/image/src/
--- a/image/decoders/icon/Makefile.in
+++ b/image/decoders/icon/Makefile.in
@@ -5,18 +5,16 @@
 
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-IS_COMPONENT	= 1
-MODULE_NAME	= nsIconDecoderModule
 LIBXUL_LIBRARY = 1
 EXPORT_LIBRARY = 1
 FAIL_ON_WARNINGS = 1
 
 ifdef MOZ_WIDGET_GTK
 PLATFORM = gtk
 endif
 
--- a/image/encoders/bmp/Makefile.in
+++ b/image/encoders/bmp/Makefile.in
@@ -4,17 +4,16 @@
 
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-MODULE_NAME	= imgEncoderBMPModule
 LIBXUL_LIBRARY = 1
 FAIL_ON_WARNINGS = 1
 
 LOCAL_INCLUDES += -I$(topsrcdir)/image/src/
 
 include $(topsrcdir)/config/rules.mk
 
 
--- a/image/encoders/ico/Makefile.in
+++ b/image/encoders/ico/Makefile.in
@@ -4,17 +4,16 @@
 
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-MODULE_NAME	= imgEncoderICOModule
 LIBXUL_LIBRARY = 1
 FAIL_ON_WARNINGS = 1
 
 # Decoders need RasterImage.h
 LOCAL_INCLUDES += -I$(topsrcdir)/image/src/
 LOCAL_INCLUDES += -I$(topsrcdir)/image/encoders/bmp/
 LOCAL_INCLUDES += -I$(topsrcdir)/image/encoders/png/
 
--- a/image/encoders/jpeg/Makefile.in
+++ b/image/encoders/jpeg/Makefile.in
@@ -4,15 +4,14 @@
 
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-MODULE_NAME	= imgEncoderJPEGModule
 LIBXUL_LIBRARY = 1
 FAIL_ON_WARNINGS = 1
 
 include $(topsrcdir)/config/rules.mk
 
 
--- a/image/encoders/png/Makefile.in
+++ b/image/encoders/png/Makefile.in
@@ -4,17 +4,16 @@
 
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-MODULE_NAME	= imgEncoderPNGModule
 LIBXUL_LIBRARY = 1
 FAIL_ON_WARNINGS = 1
 
 DEFINES		+= -DMOZ_PNG_WRITE \
 	-DMOZ_PNG_READ \
 	$(NULL)
 
 LOCAL_INCLUDES += -I$(topsrcdir)/image/src/
--- a/image/src/Makefile.in
+++ b/image/src/Makefile.in
@@ -6,17 +6,16 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 LIBRARY_NAME	= imglib2_s
-MODULE_NAME	= nsImageLib2Module
 LIBXUL_LIBRARY  = 1
 FAIL_ON_WARNINGS = 1
 
 # We need to instantiate the decoders
 LOCAL_INCLUDES += -I$(topsrcdir)/image/decoders
 
 # For URI-related functionality
 LOCAL_INCLUDES += -I$(topsrcdir)/netwerk/base/src
--- a/intl/build/Makefile.in
+++ b/intl/build/Makefile.in
@@ -5,18 +5,16 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 EXPORT_LIBRARY = 1
-IS_COMPONENT	= 1
-MODULE_NAME	= nsI18nModule
 LIBXUL_LIBRARY = 1
 
 # see also intl/locale/src/Makefile.in
 ifneq (,$(filter os2 windows, $(MOZ_WIDGET_TOOLKIT)))
 LOCALE_DIR		= $(MOZ_WIDGET_TOOLKIT)
 else
 ifeq ($(OS_ARCH), Darwin)
 LOCALE_DIR		= mac
--- a/intl/chardet/src/Makefile.in
+++ b/intl/chardet/src/Makefile.in
@@ -6,14 +6,12 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 EXPORT_LIBRARY = 1
-IS_COMPONENT = 1
-MODULE_NAME = nsChardetModule
 LIBXUL_LIBRARY  = 1
 
 
 include $(topsrcdir)/config/rules.mk
--- a/intl/uconv/src/Makefile.in
+++ b/intl/uconv/src/Makefile.in
@@ -7,18 +7,16 @@ DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MSVC_ENABLE_PGO := 1
 EXPORT_LIBRARY  = 1
-IS_COMPONENT	= 1
-MODULE_NAME	= nsUConvModule
 LIBXUL_LIBRARY = 1
 
 LOCAL_INCLUDES	= -I$(srcdir)/../util \
 		  -I$(srcdir)/../ucvlatin \
 		  -I$(srcdir)/../ucvibm \
 		  -I$(srcdir)/../ucvja \
 		  -I$(srcdir)/../ucvtw2 \
 		  -I$(srcdir)/../ucvtw \
--- a/intl/uconv/util/Makefile.in
+++ b/intl/uconv/util/Makefile.in
@@ -9,18 +9,16 @@ srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MSVC_ENABLE_PGO := 1
 EXPORT_LIBRARY = 1
 LIBXUL_LIBRARY = 1
 
-MODULE_NAME	= nsUCUtil
-
 CSRCS		= \
 		ugen.c \
 		uscan.c \
 		umap.c \
 		$(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
--- a/js/ductwork/debugger/Makefile.in
+++ b/js/ductwork/debugger/Makefile.in
@@ -5,20 +5,17 @@
 DEPTH = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir = @srcdir@
 VPATH = @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-MODULE_NAME = jsdebugger
-
 LIBXUL_LIBRARY = 1
 EXPORT_LIBRARY = 1
-IS_COMPONENT = 1
 
 EXTRA_DSO_LDOPTS += \
   $(MOZ_COMPONENT_LIBS) \
   $(MOZ_JS_LIBS) \
   $(NULL)
 
 include $(topsrcdir)/config/rules.mk
--- a/js/jsd/Makefile.in
+++ b/js/jsd/Makefile.in
@@ -9,20 +9,18 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 VPATH		= @srcdir@
 srcdir		= @srcdir@
 relativesrcdir  = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-IS_COMPONENT = 1
 LIBXUL_LIBRARY = 1
 
-MODULE_NAME = JavaScript_Debugger
 EXPORT_LIBRARY = 1
 
 # REQUIRES	= java js
 
 ifdef JS_THREADSAFE
 DEFINES         += -DJS_THREADSAFE
 endif
 
--- a/js/src/config/config.mk
+++ b/js/src/config/config.mk
@@ -230,19 +230,20 @@ endif
 #
 _ENABLE_PIC=1
 
 # Determine if module being compiled is destined
 # to be merged into libxul
 
 ifdef LIBXUL_LIBRARY
 ifdef IS_COMPONENT
-ifndef MODULE_NAME
-$(error Component makefile does not specify MODULE_NAME.)
+$(error IS_COMPONENT is set, but is not compatible with LIBXUL_LIBRARY)
 endif
+ifdef MODULE_NAME
+$(error MODULE_NAME is $(MODULE_NAME) but MODULE_NAME and LIBXUL_LIBRARY are not compatible)
 endif
 ifdef FORCE_STATIC_LIB
 $(error Makefile sets FORCE_STATIC_LIB which was already implied by LIBXUL_LIBRARY)
 endif
 FORCE_STATIC_LIB=1
 ifneq ($(SHORT_LIBNAME),)
 $(error SHORT_LIBNAME is $(SHORT_LIBNAME) but SHORT_LIBNAME is not compatable with LIBXUL_LIBRARY)
 endif
--- a/layout/build/Makefile.in
+++ b/layout/build/Makefile.in
@@ -13,18 +13,16 @@ include $(DEPTH)/config/autoconf.mk
 # Solaris sh blows
 ifeq ($(OS_ARCH),SunOS)
 SHELL := ksh
 endif
 
 LIBRARY_NAME	= gklayout
 MSVC_ENABLE_PGO := 1
 EXPORT_LIBRARY = 1
-IS_COMPONENT	= 1
-MODULE_NAME	= nsLayoutModule
 LIBXUL_LIBRARY	= 1
 FAIL_ON_WARNINGS = 1
 
 
 SHARED_LIBRARY_LIBS = \
 	../base/$(LIB_PREFIX)gkbase_s.$(LIB_SUFFIX) \
 	../forms/$(LIB_PREFIX)gkforms_s.$(LIB_SUFFIX) \
 	../generic/$(LIB_PREFIX)gkgeneric_s.$(LIB_SUFFIX) \
--- a/layout/tools/layout-debug/src/Makefile.in
+++ b/layout/tools/layout-debug/src/Makefile.in
@@ -6,18 +6,16 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 EXPORT_LIBRARY	= 1
-IS_COMPONENT	= 1
-MODULE_NAME	= nsLayoutDebugModule
 LIBXUL_LIBRARY	= 1
 FAIL_ON_WARNINGS = 1
 
 
 include $(topsrcdir)/config/rules.mk
 
 libs::
 
--- a/mobile/android/components/build/Makefile.in
+++ b/mobile/android/components/build/Makefile.in
@@ -4,20 +4,18 @@
 
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-MODULE_NAME     = nsBrowserCompsModule
 LIBXUL_LIBRARY  = 1
 
-IS_COMPONENT	= 1
 EXPORT_LIBRARY  = 1
 
 ifdef MOZ_ANDROID_HISTORY
 LOCAL_INCLUDES += \
 	-I$(topsrcdir)/docshell/base \
 	-I$(topsrcdir)/content/base/src \
 	$(NULL)
 endif
--- a/modules/libjar/Makefile.in
+++ b/modules/libjar/Makefile.in
@@ -8,17 +8,15 @@ topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 LIBRARY_NAME	= jar$(VERSION_NUMBER)
 MSVC_ENABLE_PGO := 1
 EXPORT_LIBRARY = 1
-IS_COMPONENT	= 1
-MODULE_NAME	= nsJarModule
 LIBXUL_LIBRARY = 1
 FAIL_ON_WARNINGS = 1
 
 
 include $(topsrcdir)/config/config.mk
 include $(topsrcdir)/config/rules.mk
 include $(topsrcdir)/ipc/chromium/chromium-config.mk
--- a/modules/libjar/zipwriter/src/Makefile.in
+++ b/modules/libjar/zipwriter/src/Makefile.in
@@ -5,14 +5,12 @@
 DEPTH                 = @DEPTH@
 topsrcdir             = @top_srcdir@
 srcdir                = @srcdir@
 VPATH                 = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MSVC_ENABLE_PGO := 1
-MODULE_NAME           = ZipWriterModule
 EXPORT_LIBRARY        = 1
 LIBXUL_LIBRARY        = 1
-IS_COMPONENT          = 1
 
 include $(topsrcdir)/config/rules.mk
--- a/modules/libpref/src/Makefile.in
+++ b/modules/libpref/src/Makefile.in
@@ -8,18 +8,16 @@ topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 LIBRARY_NAME	= pref
 MSVC_ENABLE_PGO := 1
 EXPORT_LIBRARY = 1
-IS_COMPONENT	= 1
-MODULE_NAME	= nsPrefModule
 LIBXUL_LIBRARY = 1
 
 DEFINES += -DOS_ARCH=$(OS_ARCH) \
            -DMOZ_WIDGET_TOOLKIT=$(MOZ_WIDGET_TOOLKIT) \
            $(NULL)
 
 include $(topsrcdir)/config/config.mk
 include $(topsrcdir)/config/rules.mk
--- a/netwerk/build/Makefile.in
+++ b/netwerk/build/Makefile.in
@@ -8,18 +8,16 @@ topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 LIBRARY_NAME   = necko
 MSVC_ENABLE_PGO := 1
 EXPORT_LIBRARY = 1
-IS_COMPONENT   = 1
-MODULE_NAME    = necko
 LIBXUL_LIBRARY = 1
 FAIL_ON_WARNINGS := 1
 
 SHARED_LIBRARY_LIBS = \
   ../base/src/$(LIB_PREFIX)neckobase_s.$(LIB_SUFFIX) \
   ../dns/$(LIB_PREFIX)neckodns_s.$(LIB_SUFFIX) \
   ../socket/$(LIB_PREFIX)neckosocket_s.$(LIB_SUFFIX) \
   ../streamconv/src/$(LIB_PREFIX)nkconv_s.$(LIB_SUFFIX) \
--- a/parser/htmlparser/src/Makefile.in
+++ b/parser/htmlparser/src/Makefile.in
@@ -5,18 +5,16 @@
 DEPTH     = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 EXPORT_LIBRARY = 1
-IS_COMPONENT   = 1
-MODULE_NAME	   = nsParserModule
 LIBXUL_LIBRARY = 1
 
 
 SHARED_LIBRARY_LIBS = \
 		$(DEPTH)/parser/xml/src/$(LIB_PREFIX)saxp.$(LIB_SUFFIX) \
 		$(NULL)
 
 include $(topsrcdir)/config/rules.mk
--- a/rdf/build/Makefile.in
+++ b/rdf/build/Makefile.in
@@ -6,18 +6,16 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 EXPORT_LIBRARY  = 1
-IS_COMPONENT	= 1
-MODULE_NAME	= nsRDFModule
 LIBXUL_LIBRARY = 1
 
 # XXX Note dependencies on implementation headers for factory functions
 
 SHARED_LIBRARY_LIBS = \
 		../base/src/$(LIB_PREFIX)rdfbase_s.$(LIB_SUFFIX) \
 		../datasource/src/$(LIB_PREFIX)rdfdatasource_s.$(LIB_SUFFIX) \
 		$(NULL)
--- a/security/manager/boot/src/Makefile.in
+++ b/security/manager/boot/src/Makefile.in
@@ -5,18 +5,16 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MSVC_ENABLE_PGO := 1
-IS_COMPONENT	= 1
-MODULE_NAME	= BOOT
 EXPORT_LIBRARY	= 1
 LIBXUL_LIBRARY	= 1
 FAIL_ON_WARNINGS = 1
 
 DEFINES += -D__STDC_CONSTANT_MACROS
 
 include $(topsrcdir)/config/rules.mk
 
--- a/security/manager/pki/src/Makefile.in
+++ b/security/manager/pki/src/Makefile.in
@@ -6,18 +6,16 @@
 
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-IS_COMPONENT	= 1
-MODULE_NAME	= PKI
 EXPORT_LIBRARY	= 1
 LIBXUL_LIBRARY	= 1
 FAIL_ON_WARNINGS = 1
 
 INCLUDES	+= \
 		-I$(DIST)/public/nss \
 		$(NULL)
 
--- a/security/manager/ssl/src/Makefile.in
+++ b/security/manager/ssl/src/Makefile.in
@@ -6,18 +6,16 @@
 
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-IS_COMPONENT	= 1
-MODULE_NAME	= NSS
 EXPORT_LIBRARY	= 1
 LIBXUL_LIBRARY	= 1
 CSRCS += md4.c
 
 DEFINES += \
   -DNSS_ENABLE_ECC \
   -DDLL_PREFIX=\"$(DLL_PREFIX)\" \
   -DDLL_SUFFIX=\"$(DLL_SUFFIX)\" \
--- a/services/crypto/component/Makefile.in
+++ b/services/crypto/component/Makefile.in
@@ -7,14 +7,12 @@ topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 FAIL_ON_WARNINGS := 1
 
 EXPORT_LIBRARY := 1
-IS_COMPONENT := 1
-MODULE_NAME := nsServicesCryptoModule
 LIBXUL_LIBRARY := 1
 MOZILLA_INTERNAL_API := 1
 
 include $(topsrcdir)/config/rules.mk
--- a/startupcache/Makefile.in
+++ b/startupcache/Makefile.in
@@ -5,14 +5,12 @@
 
 DEPTH = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir = @srcdir@
 VPATH = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-MODULE_NAME = StartupCacheModule
 EXPORT_LIBRARY = 1
 LIBXUL_LIBRARY = 1
-IS_COMPONENT = 1
 
 include $(topsrcdir)/config/rules.mk
--- a/storage/build/Makefile.in
+++ b/storage/build/Makefile.in
@@ -6,18 +6,16 @@
 DEPTH=@DEPTH@
 topsrcdir=@top_srcdir@
 srcdir=@srcdir@
 VPATH=@srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 EXPORT_LIBRARY = 1
-IS_COMPONENT = 1
-MODULE_NAME = mozStorageModule
 LIBXUL_LIBRARY = 1
 
 
 LOCAL_INCLUDES = \
 	$(SQLITE_CFLAGS) \
 	-I$(srcdir)/../src
 
 SHARED_LIBRARY_LIBS = \
--- a/storage/src/Makefile.in
+++ b/storage/src/Makefile.in
@@ -5,17 +5,16 @@
 
 DEPTH   = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH   = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-MODULE_NAME      = mozStorageModule
 LIBXUL_LIBRARY = 1
 
 # Don't use the jemalloc allocator on Android, because we can't guarantee
 # that Gecko will configure sqlite before it is first used (bug 730495).
 #
 # Note: On Windows our sqlite build assumes we use jemalloc.  If you disable
 # MOZ_STORAGE_MEMORY on Windows, you will also need to change the "ifdef
 # MOZ_MEMORY" options in db/sqlite3/src/Makefile.in.
--- a/testing/gtest/Makefile.in
+++ b/testing/gtest/Makefile.in
@@ -12,20 +12,18 @@ VPATH = \
   $(srcdir) \
   $(srcdir)/gtest/src \
   $(srcdir)/mozilla \
   $(srcdir)/gmock/src \
   $(NULL)
 
 include $(DEPTH)/config/autoconf.mk
 
-MODULE_NAME = gtest
 EXPORT_LIBRARY = 1
 LIBXUL_LIBRARY = 1
-IS_COMPONENT = 1
 
 LOCAL_INCLUDES += \
   -I$(srcdir)/gtest \
   -I$(srcdir)/gtest/include \
   -I$(srcdir)/gmock \
   -I$(srcdir)/gmock/include \
   $(NULL)
 
--- a/toolkit/components/autocomplete/Makefile.in
+++ b/toolkit/components/autocomplete/Makefile.in
@@ -4,15 +4,13 @@
 
 DEPTH = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir = @srcdir@
 VPATH = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-MODULE_NAME = tkAutoCompleteModule
-IS_COMPONENT = 1
 EXPORT_LIBRARY = 1
 LIBXUL_LIBRARY = 1
 FAIL_ON_WARNINGS = 1
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/components/build/Makefile.in
+++ b/toolkit/components/build/Makefile.in
@@ -7,18 +7,16 @@ DEPTH=@DEPTH@
 topsrcdir=@top_srcdir@
 srcdir=@srcdir@
 VPATH=@srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 LIBRARY_NAME = toolkitcomps
 EXPORT_LIBRARY = 1
-IS_COMPONENT = 1
-MODULE_NAME = nsToolkitCompsModule
 LIBXUL_LIBRARY = 1
 
 include $(topsrcdir)/config/config.mk
 
 LOCAL_INCLUDES = \
   -I$(srcdir)/../alerts \
   -I$(srcdir)/../downloads \
   -I$(srcdir)/../feeds \
--- a/toolkit/components/commandlines/Makefile.in
+++ b/toolkit/components/commandlines/Makefile.in
@@ -5,13 +5,11 @@
 DEPTH     = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 EXPORT_LIBRARY = 1
-IS_COMPONENT = 1
-MODULE_NAME = CommandLineModule
 LIBXUL_LIBRARY = 1
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/components/ctypes/Makefile.in
+++ b/toolkit/components/ctypes/Makefile.in
@@ -4,19 +4,16 @@
 
 DEPTH = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir = @srcdir@
 VPATH = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-MODULE_NAME = jsctypes
-
 LIBXUL_LIBRARY = 1
 EXPORT_LIBRARY = 1
-IS_COMPONENT = 1
 
 LOCAL_INCLUDES := \
   -I$(topsrcdir)/js/xpconnect/loader \
   $(NULL)
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/components/diskspacewatcher/Makefile.in
+++ b/toolkit/components/diskspacewatcher/Makefile.in
@@ -6,14 +6,12 @@ DEPTH     = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 LIBRARY_NAME   = diskspacewatcher
 EXPORT_LIBRARY = 1
-IS_COMPONENT   = 1
-MODULE_NAME    = DiskSpaceWatcherModule
 LIBXUL_LIBRARY = 1
 
 include $(topsrcdir)/config/rules.mk
 include $(topsrcdir)/ipc/chromium/chromium-config.mk
--- a/toolkit/components/filepicker/Makefile.in
+++ b/toolkit/components/filepicker/Makefile.in
@@ -9,15 +9,13 @@ topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 ifdef MOZ_XUL
 ifeq (,$(filter android qt os2 cocoa windows,$(MOZ_WIDGET_TOOLKIT)))
 EXPORT_LIBRARY = 1
-IS_COMPONENT = 1
-MODULE_NAME = nsFileViewModule
 LIBXUL_LIBRARY = 1
 endif
 endif
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/components/mediasniffer/Makefile.in
+++ b/toolkit/components/mediasniffer/Makefile.in
@@ -7,12 +7,10 @@ topsrcdir = @top_srcdir@
 srcdir = @srcdir@
 VPATH = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 LIBRARY_NAME = mediasniffer
 LIBXUL_LIBRARY  = 1
 EXPORT_LIBRARY = 1
-MODULE_NAME = nsMediaSnifferModule
-IS_COMPONENT = 1
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/components/perf/Makefile.in
+++ b/toolkit/components/perf/Makefile.in
@@ -4,21 +4,18 @@
 
 DEPTH = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir = @srcdir@
 VPATH = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-MODULE_NAME = jsperf
-
 LIBXUL_LIBRARY = 1
 EXPORT_LIBRARY = 1
-IS_COMPONENT = 1
 FAIL_ON_WARNINGS = 1
 
 LOCAL_INCLUDES := \
   -I$(topsrcdir)/js/xpconnect/loader \
   $(NULL)
 
 ifdef ENABLE_TESTS
 MOCHITEST_CHROME_FILES = \
--- a/toolkit/components/places/Makefile.in
+++ b/toolkit/components/places/Makefile.in
@@ -9,17 +9,15 @@ VPATH = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 ifdef MOZ_PLACES
 LIBRARY_NAME  = places
 MSVC_ENABLE_PGO := 1
 LIBXUL_LIBRARY = 1
 EXPORT_LIBRARY = 1
-MODULE_NAME = nsPlacesModule
-IS_COMPONENT = 1
 
 LOCAL_INCLUDES += -I$(srcdir)/../build
 
 endif
 
 include $(topsrcdir)/config/rules.mk
 include $(topsrcdir)/ipc/chromium/chromium-config.mk
--- a/toolkit/components/reflect/Makefile.in
+++ b/toolkit/components/reflect/Makefile.in
@@ -4,20 +4,17 @@
 
 DEPTH = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir = @srcdir@
 VPATH = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-MODULE_NAME = jsreflect
-
 LIBXUL_LIBRARY = 1
 EXPORT_LIBRARY = 1
-IS_COMPONENT = 1
 
 EXTRA_DSO_LDOPTS += \
     $(MOZ_COMPONENT_LIBS) \
     $(MOZ_JS_LIBS) \
     $(NULL)
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/components/remote/Makefile.in
+++ b/toolkit/components/remote/Makefile.in
@@ -6,17 +6,15 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 EXPORT_LIBRARY = 1
-IS_COMPONENT   = 1
-MODULE_NAME    = RemoteServiceModule
 
 LIBXUL_LIBRARY = 1
 
 include $(topsrcdir)/config/rules.mk
 
 CXXFLAGS += $(TK_CFLAGS)
 
--- a/toolkit/components/satchel/Makefile.in
+++ b/toolkit/components/satchel/Makefile.in
@@ -4,18 +4,16 @@
 
 DEPTH = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir = @srcdir@
 VPATH = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-MODULE_NAME = satchel
-IS_COMPONENT = 1
 LIBXUL_LIBRARY = 1
 EXPORT_LIBRARY = 1
 
 LOCAL_INCLUDES = \
   -I$(srcdir)/../build \
   $(NULL)
 
 
--- a/toolkit/components/statusfilter/Makefile.in
+++ b/toolkit/components/statusfilter/Makefile.in
@@ -6,12 +6,11 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 LIBXUL_LIBRARY = 1
-MODULE_NAME	= nsBrowserModule
 
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/components/telemetry/Makefile.in
+++ b/toolkit/components/telemetry/Makefile.in
@@ -7,21 +7,18 @@ DEPTH = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir = @srcdir@
 VPATH = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 USE_RCS_MK := 1
 include $(topsrcdir)/config/makefiles/rcs.mk
 
-MODULE_NAME = telemetry
-
 LIBXUL_LIBRARY = 1
 EXPORT_LIBRARY = 1
-IS_COMPONENT = 1
 FAIL_ON_WARNINGS = 1
 
 LIBRARY_NAME = telemetry
 MSVC_ENABLE_PGO := 1
 
 
 LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/build
 LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/threads
--- a/toolkit/devtools/server/Makefile.in
+++ b/toolkit/devtools/server/Makefile.in
@@ -4,21 +4,18 @@
 
 DEPTH = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir = @srcdir@
 VPATH = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-MODULE_NAME = jsinspector
-
 LIBXUL_LIBRARY = 1
 EXPORT_LIBRARY = 1
-IS_COMPONENT = 1
 
 EXTRA_DSO_LDOPTS += \
     $(MOZ_COMPONENT_LIBS) \
     $(MOZ_JS_LIBS) \
     $(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
--- a/toolkit/identity/Makefile.in
+++ b/toolkit/identity/Makefile.in
@@ -6,14 +6,12 @@ DEPTH     = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 FAIL_ON_WARNINGS := 1
 
-MODULE_NAME = identity
 LIBXUL_LIBRARY = 1
-IS_COMPONENT = 1
 EXPORT_LIBRARY = 1
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/library/Makefile.in
+++ b/toolkit/library/Makefile.in
@@ -52,18 +52,21 @@ SHARED_LIBRARY_LIBS += \
   $(NULL)
 endif
 
 ifdef MOZ_XUL
 SHARED_LIBRARY_LIBS += $(DEPTH)/accessible/src/xul/$(LIB_PREFIX)accessibility_xul_s.$(LIB_SUFFIX)
 endif
 endif
 
+# XXX bug 903227 COMPONENT_LIBS is useless since bug 886526, but removing it
+# reorders the static libraries which makes msvc use more memory to link
+# xul.dll.
 SHARED_LIBRARY_LIBS += \
-  $(foreach component,$(COMPONENT_LIBS),$(DEPTH)/staticlib/components/$(LIB_PREFIX)$(component).$(LIB_SUFFIX)) \
+  $(foreach component,$(COMPONENT_LIBS),$(DEPTH)/staticlib/$(LIB_PREFIX)$(component).$(LIB_SUFFIX)) \
   $(foreach lib,$(STATIC_LIBS),$(DEPTH)/staticlib/$(LIB_PREFIX)$(lib).$(LIB_SUFFIX)) \
   $(NULL)
 
 ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_)
 RCINCLUDE = xulrunner.rc
 
 LOCAL_INCLUDES += -I$(topsrcdir)/widget/windows
 LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base
--- a/toolkit/system/androidproxy/Makefile.in
+++ b/toolkit/system/androidproxy/Makefile.in
@@ -5,14 +5,12 @@
 DEPTH     = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 EXPORT_LIBRARY  = 1
-IS_COMPONENT    = 1
-MODULE_NAME     = nsAndroidProxyModule
 LIBXUL_LIBRARY  = 1
 
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/system/osxproxy/Makefile.in
+++ b/toolkit/system/osxproxy/Makefile.in
@@ -5,14 +5,12 @@
 DEPTH     = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 EXPORT_LIBRARY  = 1
-IS_COMPONENT    = 1
-MODULE_NAME     = nsOSXProxyModule
 LIBXUL_LIBRARY  = 1
 
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/system/unixproxy/Makefile.in
+++ b/toolkit/system/unixproxy/Makefile.in
@@ -5,17 +5,15 @@
 DEPTH     = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 EXPORT_LIBRARY  = 1
-IS_COMPONENT    = 1
-MODULE_NAME     = nsUnixProxyModule
 LIBXUL_LIBRARY  = 1
 
 ifdef MOZ_ENABLE_LIBPROXY
 CXXFLAGS += $(MOZ_LIBPROXY_CFLAGS)
 endif # MOZ_ENABLE_LIBPROXY
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/system/windowsproxy/Makefile.in
+++ b/toolkit/system/windowsproxy/Makefile.in
@@ -5,14 +5,12 @@
 DEPTH     = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 EXPORT_LIBRARY  = 1
-IS_COMPONENT    = 1
-MODULE_NAME     = nsWindowsProxyModule
 LIBXUL_LIBRARY  = 1
 
 
 include $(topsrcdir)/config/rules.mk
--- a/tools/profiler/Makefile.in
+++ b/tools/profiler/Makefile.in
@@ -18,20 +18,18 @@ LOCAL_INCLUDES += \
   -I$(topsrcdir)/ipc/chromium/src \
   -I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src \
   $(NULL)
 
 ifneq (,$(filter armeabi,$(ANDROID_CPU_ARCH)))
 DEFINES += -DARCH_ARMV6
 endif
 
-MODULE_NAME     = nsProfilerModule
 EXPORT_LIBRARY  = 1
 LIBXUL_LIBRARY  = 1
-IS_COMPONENT    = 1
 ifndef _MSC_VER
 FAIL_ON_WARNINGS = 1
 endif # !_MSC_VER
 
 # Uncomment for better debugging in opt builds
 #MOZ_OPTIMIZE_FLAGS += -O0 -g
 
 ifeq ($(OS_TARGET),Darwin)
--- a/view/src/Makefile.in
+++ b/view/src/Makefile.in
@@ -6,17 +6,16 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MSVC_ENABLE_PGO := 1
-MODULE_NAME	= nsViewModule
 LIBXUL_LIBRARY	= 1
 FAIL_ON_WARNINGS := 1
 
 DEFINES += -D_IMPL_NS_LAYOUT
 
 include $(topsrcdir)/config/rules.mk
 
 LOCAL_INCLUDES  = \
--- a/widget/android/Makefile.in
+++ b/widget/android/Makefile.in
@@ -6,18 +6,16 @@ DEPTH           = @DEPTH@
 topsrcdir       = @top_srcdir@
 srcdir          = @srcdir@
 VPATH           = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 LIBRARY_NAME    = widget_android
 EXPORT_LIBRARY  = 1
-IS_COMPONENT    = 1
-MODULE_NAME     = nsWidgetAndroidModule
 LIBXUL_LIBRARY  = 1
 FAIL_ON_WARNINGS := 1
 
 ifdef MOZ_WEBSMS_BACKEND
 DEFINES += -DMOZ_WEBSMS_BACKEND
 endif
 
 NOT_THERE_YET_CPPSRCS = \
--- a/widget/cocoa/Makefile.in
+++ b/widget/cocoa/Makefile.in
@@ -6,18 +6,16 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 EXPORT_LIBRARY	= 1
-IS_COMPONENT	= 1
-MODULE_NAME	= nsWidgetMacModule
 LIBXUL_LIBRARY = 1
 
 
 
 CMMSRCS = \
   nsBidiKeyboard.mm \
   nsClipboard.mm \
   nsMenuX.mm \
--- a/widget/gonk/Makefile.in
+++ b/widget/gonk/Makefile.in
@@ -19,18 +19,16 @@ VPATH           = \
   $(srcdir) \
   $(srcdir)/libui \
   $(NULL)
 
 include $(DEPTH)/config/autoconf.mk
 
 LIBRARY_NAME    = widget_gonk
 EXPORT_LIBRARY  = 1
-IS_COMPONENT    = 1
-MODULE_NAME     = nsWidgetGonkModule
 LIBXUL_LIBRARY  = 1
 
 SHARED_LIBRARY_LIBS = ../xpwidgets/libxpwidgets_s.a
 
 include $(topsrcdir)/config/rules.mk
 include $(topsrcdir)/ipc/chromium/chromium-config.mk
 
 DEFINES += -DHAVE_OFF64_T -DSK_BUILD_FOR_ANDROID_NDK
--- a/widget/gtk2/Makefile.in
+++ b/widget/gtk2/Makefile.in
@@ -6,25 +6,22 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 ifdef MOZ_ENABLE_GTK2
-MODULE_NAME	= nsWidgetGtk2Module
 LIBRARY_NAME	= widget_gtk2
 else
-MODULE_NAME	= nsWidgetGtk3Module
 LIBRARY_NAME	= widget_gtk3
 endif
 
 EXPORT_LIBRARY	= 1
-IS_COMPONENT	= 1
 LIBXUL_LIBRARY = 1
 FAIL_ON_WARNINGS = 1
 
 NATIVE_THEME_SUPPORT = 1
 
 
 
 CSRCS		= \
--- a/widget/os2/Makefile.in
+++ b/widget/os2/Makefile.in
@@ -6,19 +6,17 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 EXPORT_LIBRARY	= 1
-IS_COMPONENT	= 1
 RESFILE		= widget.res
-MODULE_NAME	= nsWidgetOS2Module
 LIBXUL_LIBRARY = 1
 
 
 SHARED_LIBRARY_LIBS = \
 	../xpwidgets/$(LIB_PREFIX)xpwidgets_s.$(LIB_SUFFIX) \
 	$(NULL)
 
 include $(topsrcdir)/config/rules.mk
--- a/widget/qt/Makefile.in
+++ b/widget/qt/Makefile.in
@@ -7,18 +7,16 @@ DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 LIBRARY_NAME	= widget_qt
 EXPORT_LIBRARY = 1
-IS_COMPONENT    = 1
-MODULE_NAME	= nsWidgetQtModule
 LIBXUL_LIBRARY	= 1
 
 SHARED_LIBRARY_LIBS = ../xpwidgets/libxpwidgets_s.a
 
 # If not primary toolkit, install in secondary path
 ifneq (qt,$(MOZ_WIDGET_TOOLKIT))
 INACTIVE_COMPONENT = 1
 endif
--- a/widget/windows/Makefile.in
+++ b/widget/windows/Makefile.in
@@ -8,19 +8,17 @@ topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 LIBRARY_NAME	= widget_windows
 MSVC_ENABLE_PGO := 1
 EXPORT_LIBRARY	= 1
-IS_COMPONENT	= 1
 RESFILE		= widget.res
-MODULE_NAME	= nsWidgetWinModule
 LIBXUL_LIBRARY = 1
 
 DEFINES		+= -DMOZ_UNICODE 
 
 ifdef MOZ_ENABLE_D3D9_LAYER
 DEFINES		+= -DMOZ_ENABLE_D3D9_LAYER
 endif
 
--- a/widget/windows/winrt/Makefile.in
+++ b/widget/windows/winrt/Makefile.in
@@ -6,18 +6,16 @@ DEPTH		= ../../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 LIBRARY_NAME		= widget_winrt
 EXPORT_LIBRARY	= 1
-IS_COMPONENT		= 1
-MODULE_NAME			= WidgetWinRTModule
 LIBXUL_LIBRARY	= 1
 
 DEFINES		+= -DMOZ_UNICODE
 
 ifdef MOZ_ENABLE_D3D9_LAYER
 DEFINES		+= -DMOZ_ENABLE_D3D9_LAYER
 endif
 
--- a/xpcom/glue/tests/gtest/Makefile.in
+++ b/xpcom/glue/tests/gtest/Makefile.in
@@ -5,18 +5,14 @@
 
 DEPTH = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir = @srcdir@
 VPATH = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-MODULE_NAME = xpcom_glue_gtest
 EXPORT_LIBRARY = 1
 LIBXUL_LIBRARY = 1
-IS_COMPONENT = 1
 
-LOCAL_INCLUDES = \
-  -I$(srcdir)/../.. \
-  $(NULL)
+LOCAL_INCLUDES = -I$(srcdir)/../..
 
 include $(topsrcdir)/config/rules.mk
--- a/xpfe/appshell/src/Makefile.in
+++ b/xpfe/appshell/src/Makefile.in
@@ -5,18 +5,16 @@
 
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-IS_COMPONENT=1
-MODULE_NAME	= appshell
 MSVC_ENABLE_PGO := 1
 EXPORT_LIBRARY  = 1
 LIBXUL_LIBRARY	= 1
 
 LOCAL_INCLUDES += -I$(topsrcdir)/dom/base
 
 include $(topsrcdir)/config/rules.mk
 
--- a/xpfe/components/autocomplete/src/Makefile.in
+++ b/xpfe/components/autocomplete/src/Makefile.in
@@ -5,14 +5,12 @@
 
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-MODULE_NAME	= xpAutoComplete
 EXPORT_LIBRARY	= 1
 LIBXUL_LIBRARY  = 1
-IS_COMPONENT	= 1
 
 include $(topsrcdir)/config/rules.mk
--- a/xpfe/components/build/Makefile.in
+++ b/xpfe/components/build/Makefile.in
@@ -7,18 +7,16 @@ DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 LIBRARY_NAME	= appcomps
 EXPORT_LIBRARY = 1
-IS_COMPONENT	= 1
-MODULE_NAME	= application
 LIBXUL_LIBRARY	= 1
 
 
 include $(topsrcdir)/config/config.mk
 
 # General includes
 SHARED_LIBRARY_LIBS += ../directory/$(LIB_PREFIX)directory_s.$(LIB_SUFFIX)
 LOCAL_INCLUDES += -I$(srcdir)/../directory
--- a/xpfe/components/windowds/Makefile.in
+++ b/xpfe/components/windowds/Makefile.in
@@ -5,15 +5,13 @@
 
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-MODULE_NAME      = nsWindowDataSourceModule
 LIBXUL_LIBRARY   = 1
-IS_COMPONENT     = 1
 EXPORT_LIBRARY   = 1
 
 
 include $(topsrcdir)/config/rules.mk