mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Static Module Patch. r=valeski,warren@netscape.com, sr/a=cls@netscape.com
This commit is contained in:
parent
7e65000fe8
commit
29cef744e4
@ -156,6 +156,10 @@ endif
|
||||
|
||||
DIRS += l10n
|
||||
|
||||
ifdef MOZ_STATIC_COMPONENTS
|
||||
DIRS += modules/staticmod
|
||||
endif
|
||||
|
||||
endif # BUILD_MODULES == all
|
||||
|
||||
STATIC_MAKEFILES := $(NSPRPUB_DIR)
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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); \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -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); \
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user