Static Module Patch. r=valeski,warren@netscape.com, sr/a=cls@netscape.com

This commit is contained in:
dougt%netscape.com 2000-11-21 23:40:34 +00:00
parent 7e65000fe8
commit 29cef744e4
5 changed files with 37 additions and 6 deletions

View File

@ -156,6 +156,10 @@ endif
DIRS += l10n
ifdef MOZ_STATIC_COMPONENTS
DIRS += modules/staticmod
endif
endif # BUILD_MODULES == all
STATIC_MAKEFILES := $(NSPRPUB_DIR)

View File

@ -863,6 +863,15 @@ if [ "$MOZ_MNG" ]; then
"
fi
# modules/staticmod
if [ "$MOZ_STATIC_COMPONENTS" ]; then
MAKEFILES_static_components="$MAKEFILES_static_components
modules/staticmod
"
fi
for extension in $MOZ_EXTENSIONS; do
case "$extension" in
cookie ) MAKEFILES_extensions="$MAKEFILES_extensions

View File

@ -366,8 +366,12 @@ MOZ_COMPONENT_XPCOM_LIBS += -lboehm
XPCOM_LIBS += -lboehm
endif
ifneq (all,$(BUILD_MODULES))
DEFINES += -DXPCOM_STANDALONE -DXPCONNECT_STANDALONE
ifeq (xpcom, $(findstring xpcom, $(BUILD_MODULES)))
DEFINES += -DXPCOM_STANDALONE
endif
ifeq (xpconnect, $(findstring xpconnect, $(BUILD_MODULES)))
DEFINES += -DXPCOM_STANDALONE -DXPCONNECT_STANDALONE
endif
ifeq ($(OS_ARCH),OS2)

View File

@ -109,13 +109,20 @@ NS_NewGenericModule(const char* moduleName,
NS_IMPL_NSGETMODULE_WITH_DTOR(_name, _components, nsnull)
#define NS_IMPL_NSGETMODULE_WITH_DTOR(_name, _components, _dtor) \
\
PRUint32 NSGetModule_components_count = \
sizeof(_components) / sizeof(_components[0]); \
\
nsModuleComponentInfo* NSGetModule_components = (_components); \
\
extern "C" NS_EXPORT nsresult NSGetModule(nsIComponentManager *servMgr, \
nsIFile* location, \
nsIModule** result) \
{ \
return NS_NewGenericModule((_name), \
sizeof(_components) / sizeof(_components[0]), \
(_components), _dtor, result); \
NSGetModule_components_count, \
NSGetModule_components, \
_dtor, result); \
}
////////////////////////////////////////////////////////////////////////////////

View File

@ -109,13 +109,20 @@ NS_NewGenericModule(const char* moduleName,
NS_IMPL_NSGETMODULE_WITH_DTOR(_name, _components, nsnull)
#define NS_IMPL_NSGETMODULE_WITH_DTOR(_name, _components, _dtor) \
\
PRUint32 NSGetModule_components_count = \
sizeof(_components) / sizeof(_components[0]); \
\
nsModuleComponentInfo* NSGetModule_components = (_components); \
\
extern "C" NS_EXPORT nsresult NSGetModule(nsIComponentManager *servMgr, \
nsIFile* location, \
nsIModule** result) \
{ \
return NS_NewGenericModule((_name), \
sizeof(_components) / sizeof(_components[0]), \
(_components), _dtor, result); \
NSGetModule_components_count, \
NSGetModule_components, \
_dtor, result); \
}
////////////////////////////////////////////////////////////////////////////////