Skip to content

Commit

Permalink
Fix win32 gmake static builds.
Browse files Browse the repository at this point in the history
Bug #160104 r=bryner
  • Loading branch information
seawood%netscape.com committed Aug 6, 2002
1 parent d3557c8 commit bdbbad7
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 11 deletions.
27 changes: 24 additions & 3 deletions config/config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,30 @@ endif
#
_ALL_META_COMPONENTS=mail crypto

MOZ_META_COMPONENTS_mail = nsMsgBaseModule IMAP_factory nsVCardModule mime_services nsMimeEmitterModule nsMsgNewsModule nsMsgComposeModule local_mail_services nsAbSyncModule nsImportServiceModule nsTextImportModule nsAbModule nsMsgDBModule
MOZ_META_COMPONENTS_mail_comps = mailnews msgimap mime mimeemitter msgnews msgcompose localmail absyncsvc import addrbook impText vcard msgdb
MOZ_META_COMPONENTS_mail_libs = msgbaseutil mimecthglue_s
MOZ_META_COMPONENTS_mail = nsMsgBaseModule IMAP_factory nsVCardModule mime_services nsMimeEmitterModule nsMsgNewsModule nsMsgComposeModule local_mail_services nsAbSyncModule nsImportServiceModule nsTextImportModule nsAbModule nsMsgDBModule nsMsgMdnModule nsComm4xMailImportModule
MOZ_META_COMPONENTS_mail_comps = msgimap mime msgnews import addrbook impText vcard msgdb msgmdn
MOZ_META_COMPONENTS_mail_libs = mimecthglue_s

ifeq ($(OS_ARCH),WINNT)
MOZ_META_COMPONENTS_mail += nsEudoraImportModule nsOEImport nsOutlookImport msgMapiModule
MOZ_META_COMPONENTS_mail_comps += msgbase impEudra importOE impOutlk msgMapi
else
MOZ_META_COMPONENTS_mail_comps += mailnews
endif

ifdef USE_SHORT_LIBNAME
MOZ_META_COMPONENTS_mail_comps += emitter msgcompo msglocal absyncsv
ifeq ($(OS_ARCH),WINNT)
MOZ_META_COMPONENTS_mail_comps += impComm4xMail
else
MOZ_META_COMPONENTS_mail_comps += imp4Mail
endif
MOZ_META_COMPONENTS_mail_libs += msgbsutl
else
MOZ_META_COMPONENTS_mail_cops += mimeemitter msgcompose localmail absyncsvc impComm4xMail
MOZ_META_COMPONENTS_mail_libs += msgbaseutil
endif

ifdef MOZ_PSM
MOZ_META_COMPONENTS_mail += nsMsgSMIMEModule
MOZ_META_COMPONENTS_mail_comps += msgsmime
Expand Down
8 changes: 7 additions & 1 deletion config/static-rules.mk
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@

ifdef _NO_AUTO_VARS
_TARGET = $(srcdir)/$(@F)
else
_TARGET = $@
endif

nsStaticComponents.cpp: $(MOZILLA_DIR)/xpfe/bootstrap/nsStaticComponents.cpp.in Makefile Makefile.in $(FINAL_LINK_COMP_NAMES)
rm -f $@
cat $< | \
sed -e "s|%DECL_NSGETMODULES%|$(foreach m,$(STATIC_COMPONENT_LIST),DECL_NSGETMODULE($(m)))|" | \
sed -e "s|%MODULE_LIST%|$(foreach m, $(STATIC_COMPONENT_LIST),MODULE($(m)),)|" \
> $@
> $(_TARGET)

ifeq ($(OS_ARCH),IRIX)
LDFLAGS += -Wl,-LD_LAYOUT:lgot_buffer=80
Expand Down
1 change: 1 addition & 0 deletions embedding/browser/activex/src/control/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ CPPSRCS = \
EXTRA_DSO_LDOPTS = \
$(DIST)/lib/$(LIB_PREFIX)gkgfx.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)embed_base_s.$(LIB_SUFFIX) \
$(MOZ_UNICHARUTIL_LIBS) \
$(XPCOM_LIBS) \
$(NSPR_LIBS) \
$(NULL)
Expand Down
1 change: 1 addition & 0 deletions layout/base/tests/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ EXTRA_DSO_LIBS = gkbase_s gkgfx
LIBS += \
$(LIBS_DIR) \
$(EXTRA_DSO_LIBS) \
$(MOZ_UNICHARUTIL_LIBS) \
$(MOZ_COMPONENT_LIBS) \
$(MOZ_JS_LIBS) \
$(TK_LIBS) \
Expand Down
1 change: 1 addition & 0 deletions layout/html/tests/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ LIBS = \
$(MOZ_JS_LIBS) \
$(EXTRA_DSO_LIBS) \
$(TK_LIBS) \
$(MOZ_UNICHARUTIL_LIBS) \
$(MOZ_COMPONENT_LIBS) \
$(NULL)

Expand Down
5 changes: 4 additions & 1 deletion mailnews/mapi/mapiDll/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ MODULE = mozMapi32
EXPORT_LIBRARY = $(MODULE)
LIBRARY_NAME = $(MODULE)
DEFFILE = $(srcdir)/Mapi32.def
META_COMPONENT = mail

REQUIRES = MapiProxy \
msgMapi \
Expand All @@ -42,6 +41,10 @@ CPPSRCS = MapiDll.cpp

OS_LIBS += ole32.lib

# Force use of PIC
FORCE_USE_PIC = 1
FORCE_SHARED_LIB = 1

include $(topsrcdir)/config/rules.mk

DEFINES += -DUNICODE -D_UNICODE
5 changes: 4 additions & 1 deletion mailnews/mapi/mapihook/build/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ include $(DEPTH)/config/autoconf.mk

MODULE = MapiProxy
LIBRARY_NAME = $(MODULE)
META_COMPONENT = mail
DEFFILE = $(srcdir)/MapiProxy.def

EXPORTS = msgMapi.h
Expand All @@ -49,6 +48,10 @@ GARBAGE += $(MIDL_GENERATED_FILES) done_gen $(CSRCS) $(SRCDIR_CSRCS)

LOCAL_INCLUDES = -I.

# Force use of PIC
FORCE_USE_PIC = 1
FORCE_SHARED_LIB = 1

include $(topsrcdir)/config/rules.mk

DEFINES += -DREGISTER_PROXY_DLL -DUNICODE -D_UNICODE
Expand Down
22 changes: 17 additions & 5 deletions modules/staticmod/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ endif

ifdef MOZ_STATIC_COMPONENTS
SHARED_LIBRARY_LIBS = \
$(foreach m, $(MOZ_STATIC_COMPONENTS), $(DIST)/lib/components/lib$(m).$(LIB_SUFFIX))
$(foreach m, $(MOZ_STATIC_COMPONENTS), $(DIST)/lib/components/$(LIB_PREFIX)$(m).$(LIB_SUFFIX))
endif

ifdef _COMPONENT_BASE
SHARED_LIBRARY_LIBS = $(foreach m,$($(_META_COMPONENT_LIBS)), $(DIST)/lib/components/lib$(m).$(LIB_SUFFIX))
SHARED_LIBRARY_LIBS += $(foreach m,$($(_META_DEP_LIBS)), $(DIST)/lib/lib$(m).$(LIB_SUFFIX))
SHARED_LIBRARY_LIBS = $(foreach m,$($(_META_COMPONENT_LIBS)), $(DIST)/lib/components/$(LIB_PREFIX)$(m).$(LIB_SUFFIX))
SHARED_LIBRARY_LIBS += $(foreach m,$($(_META_DEP_LIBS)), $(DIST)/lib/$(LIB_PREFIX)$(m).$(LIB_SUFFIX))
endif

ifndef NO_RECURSE
Expand Down Expand Up @@ -87,6 +87,7 @@ ifdef MOZ_META_COMPONENTS
DEFINES += -DMETA_MODULE=\"$(LIBRARY_NAME)\" -DXPCOM_TRANSLATE_NSGM_ENTRY_POINT
ifeq ($(LIBRARY_NAME),meta_mail)
EXTRA_DSO_LDOPTS += \
$(DIST)/lib/$(LIB_PREFIX)gkgfx.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)rdfutil_s.$(LIB_SUFFIX) \
$(NULL)
endif
Expand All @@ -102,23 +103,34 @@ EXTRA_DSO_LDOPTS += \
$(NULL)
endif

ifeq ($(OS_ARCH),WINNT)
OS_LIBS += ole32.lib shell32.lib
endif

GARBAGE += $(CPPSRCS)

list:
echo $(MOZ_STATIC_COMPONENTS)

ifdef _NO_AUTO_VARS
_TARGET = $(srcdir)/$(@F)
GARBAGE += $(addprefix $(srcdir)/,$(CPPSRCS))
else
_TARGET = $@
endif

ifdef MOZ_STATIC_COMPONENTS
nsStaticModule.cpp: nsMetaModule.cpp.in Makefile Makefile.in $(DEPTH)/config/autoconf.mk
rm -f $@
cat $< | \
sed -e "s|%DECLARE_SUBMODULE_INFOS%|$(foreach m, $(MOZ_STATIC_COMPONENTS), extern nsModuleInfo NSMODULEINFO($(m));)|" | \
sed -e "s|%SUBMODULE_INFOS%|$(foreach m, $(MOZ_STATIC_COMPONENTS), \\& NSMODULEINFO($(m)),)|" \
> $@
> $(_TARGET)
endif

nsMetaModule_%.cpp: nsMetaModule.cpp.in Makefile Makefile.in $(topsrcdir)/config/config.mk
rm -f $@
cat $< | \
sed -e "s|%DECLARE_SUBMODULE_INFOS%|$(foreach m, $($(_META_COMPONENT_NAMES)), extern nsModuleInfo NSMODULEINFO($(m));)|" | \
sed -e "s|%SUBMODULE_INFOS%|$(foreach m, $($(_META_COMPONENT_NAMES)), \\& NSMODULEINFO($(m)),)|" \
> $@
> $(_TARGET)

0 comments on commit bdbbad7

Please sign in to comment.