Part of Bug 534408 Core bug 514665 dropped/replaced USE_SHORT_LIBNAME uses: port that to c-c (apps) - (Iv2) Improve OS/2 methods of linking with libraries that have long names on other platforms. r=Callek
authorWalter Meinl <wuno@lsvw.de>
Mon, 10 May 2010 10:13:32 +0100
changeset 5624 4c915bca9ba85a5f37e1564c02fc0b4389f73481
parent 5623 5df43ba3b4c68dfe41e5e85b5338045c83c50919
child 5625 e9d005c309d84a7bd0cc316b5e3e40524ecd6fc8
push idunknown
push userunknown
push dateunknown
reviewersCallek
bugs534408, 514665
Part of Bug 534408 Core bug 514665 dropped/replaced USE_SHORT_LIBNAME uses: port that to c-c (apps) - (Iv2) Improve OS/2 methods of linking with libraries that have long names on other platforms. r=Callek
config/rules.mk
mailnews/addrbook/build/Makefile.in
mailnews/base/build/Makefile.in
mailnews/base/test/Makefile.in
mailnews/compose/build/Makefile.in
mailnews/db/msgdb/build/Makefile.in
mailnews/extensions/bayesian-spam-filter/build/Makefile.in
mailnews/extensions/fts3/build/Makefile.in
mailnews/extensions/mailviews/build/Makefile.in
mailnews/extensions/mdn/build/Makefile.in
mailnews/extensions/smime/build/Makefile.in
mailnews/imap/build/Makefile.in
mailnews/imap/test/Makefile.in
mailnews/import/build/Makefile.in
mailnews/local/build/Makefile.in
mailnews/mapi/mapihook/src/Makefile.in
mailnews/mime/build/Makefile.in
mailnews/mime/cthandlers/calendar/Makefile.in
mailnews/mime/cthandlers/vcard/Makefile.in
mailnews/mime/emitters/build/Makefile.in
mailnews/news/build/Makefile.in
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -230,22 +230,16 @@ endif # ENABLE_TESTS
 # Library rules
 #
 # If BUILD_STATIC_LIBS or FORCE_STATIC_LIB is set, build a static library.
 # Otherwise, build a shared library.
 #
 
 ifndef LIBRARY
 ifdef STATIC_LIBRARY_NAME
-ifeq (OS2,$(OS_ARCH))
-ifdef SHORT_LIBNAME
-STATIC_LIBRARY_NAME	:= $(SHORT_LIBNAME)
-SHARED_LIBRARY_NAME	:= $(SHORT_LIBNAME)
-endif
-endif
 LIBRARY			:= $(LIB_PREFIX)$(STATIC_LIBRARY_NAME).$(LIB_SUFFIX)
 endif # STATIC_LIBRARY_NAME
 endif # LIBRARY
 
 ifndef HOST_LIBRARY
 ifdef HOST_LIBRARY_NAME
 HOST_LIBRARY		:= $(LIB_PREFIX)$(HOST_LIBRARY_NAME).$(LIB_SUFFIX)
 endif
@@ -254,30 +248,36 @@ endif
 ifdef LIBRARY
 ifneq (_1,$(FORCE_SHARED_LIB)_$(BUILD_STATIC_LIBS))
 ifdef MKSHLIB
 
 ifdef LIB_IS_C_ONLY
 MKSHLIB			= $(MKCSHLIB)
 endif
 
+ifneq (,$(filter OS2 WINNT WINCE,$(OS_ARCH)))
+IMPORT_LIBRARY		:= $(LIB_PREFIX)$(SHARED_LIBRARY_NAME).$(IMPORT_LIB_SUFFIX)
+endif
+
+ifeq (OS2,$(OS_ARCH))
+ifdef SHORT_LIBNAME
+SHARED_LIBRARY_NAME	:= $(SHORT_LIBNAME)
+endif
+endif
+
 ifdef MAKE_FRAMEWORK
 SHARED_LIBRARY		:= $(SHARED_LIBRARY_NAME)
 else
 SHARED_LIBRARY		:= $(DLL_PREFIX)$(SHARED_LIBRARY_NAME)$(DLL_SUFFIX)
 endif
 
 ifeq ($(OS_ARCH),OS2)
 DEF_FILE		:= $(SHARED_LIBRARY:.dll=.def)
 endif
 
-ifneq (,$(filter OS2 WINNT WINCE,$(OS_ARCH)))
-IMPORT_LIBRARY		:= $(LIB_PREFIX)$(SHARED_LIBRARY_NAME).$(IMPORT_LIB_SUFFIX)
-endif
-
 ifdef MOZ_ENABLE_LIBXUL
 EMBED_MANIFEST_AT=2
 endif
 
 endif # MKSHLIB
 endif # FORCE_SHARED_LIB && !BUILD_STATIC_LIBS
 endif # LIBRARY
 
--- a/mailnews/addrbook/build/Makefile.in
+++ b/mailnews/addrbook/build/Makefile.in
@@ -80,21 +80,17 @@ REQUIRES	+= mozldap \
                    $(NULL)
 DEFINES		+= -DMOZ_LDAP_XPCOM
 endif
 
 SHARED_LIBRARY_LIBS = \
 	../src/$(LIB_PREFIX)addrbook_s.$(LIB_SUFFIX) \
 	$(NULL)
 
-ifeq (OS2,$(OS_ARCH))
-EXTRA_DSO_LIBS += msgbsutl
-else
 EXTRA_DSO_LIBS += msgbaseutil
-endif
 
 ifdef MOZILLA_INTERNAL_API
 EXTRA_DSO_LDOPTS = \
 	$(LIBS_DIR) \
 	$(MOZDEPTH)/rdf/util/src/internal/$(LIB_PREFIX)rdfutil_s.$(LIB_SUFFIX) \
 	$(EXTRA_DSO_LIBS) \
 	$(MOZ_UNICHARUTIL_LIBS) \
 	$(MOZ_COMPONENT_LIBS) \
--- a/mailnews/base/build/Makefile.in
+++ b/mailnews/base/build/Makefile.in
@@ -89,21 +89,17 @@ endif
 
 CPPSRCS		= nsMsgFactory.cpp
 
 SHARED_LIBRARY_LIBS = \
 		../src/$(LIB_PREFIX)msgbase_s.$(LIB_SUFFIX) \
 		../search/src/$(LIB_PREFIX)msgsearch_s.$(LIB_SUFFIX) \
 		$(NULL)
 
-ifeq (OS2,$(OS_ARCH))
-EXTRA_DSO_LIBS = msgbsutl
-else
 EXTRA_DSO_LIBS = msgbaseutil
-endif
 
 ifdef MOZILLA_INTERNAL_API
 EXTRA_DSO_LDOPTS = \
 		$(MOZDEPTH)/rdf/util/src/internal/$(LIB_PREFIX)rdfutil_s.$(LIB_SUFFIX) \
 		$(LIBS_DIR) \
 		$(EXTRA_DSO_LIBS) \
 		$(MOZ_UNICHARUTIL_LIBS) \
 		$(MOZ_COMPONENT_LIBS) \
--- a/mailnews/base/test/Makefile.in
+++ b/mailnews/base/test/Makefile.in
@@ -80,19 +80,15 @@ endif
 LIBS +=   \
     $(NULL)
 
 ifdef MOZ_STATIC_MAIL_BUILD
 LIBS +=   \
     ../../base/util/$(LIB_PREFIX)msgbsutl_s.$(LIB_SUFFIX) \
     $(NULL)
 else
-ifeq (OS2,$(OS_ARCH))
-LIBS +=   $(call EXPAND_LIBNAME_PATH,msgbsutl,../../base/util)
-else
 LIBS +=   $(call EXPAND_LIBNAME_PATH,msgbaseutil,../../base/util)
 endif
-endif
 
 LIBS +=   \
   $(XPCOM_LIBS) \
   $(NSPR_LIBS) \
   $(NULL)
--- a/mailnews/compose/build/Makefile.in
+++ b/mailnews/compose/build/Makefile.in
@@ -70,21 +70,17 @@ REQUIRES	= xpcom \
 		  pref \
 		  widget \
 		  msgdb \
 		  appcomps \
 		  toolkitcomps \
 		  nkcache \
 		  $(NULL)
 
-ifeq (OS2,$(OS_ARCH))
-EXTRA_DSO_LIBS = msgbsutl
-else
 EXTRA_DSO_LIBS = msgbaseutil
-endif
 
 CPPSRCS		= nsMsgCompFactory.cpp
 
 SHARED_LIBRARY_LIBS = \
 		../src/$(LIB_PREFIX)msgcompose_s.$(LIB_SUFFIX) \
 		$(NULL)
 
 ifdef MOZILLA_INTERNAL_API
--- a/mailnews/db/msgdb/build/Makefile.in
+++ b/mailnews/db/msgdb/build/Makefile.in
@@ -57,21 +57,17 @@ REQUIRES	= xpcom \
 		  locale \
 		  mork \
 		  mime \
 		  msgbase \
 		  msgbaseutil \
 		  necko \
 		  $(NULL)
 
-ifeq (OS2,$(OS_ARCH))
-EXTRA_DSO_LIBS = msgbsutl
-else
 EXTRA_DSO_LIBS = msgbaseutil
-endif
 
 CPPSRCS		= nsMsgDBFactory.cpp
 
 SHARED_LIBRARY_LIBS = ../src/$(LIB_PREFIX)msgdb_s.$(LIB_SUFFIX)
 
 ifdef MOZILLA_INTERNAL_API
 EXTRA_DSO_LDOPTS = \
 		$(LIBS_DIR) \
--- a/mailnews/extensions/bayesian-spam-filter/build/Makefile.in
+++ b/mailnews/extensions/bayesian-spam-filter/build/Makefile.in
@@ -53,21 +53,17 @@ MOZILLA_INTERNAL_API = 1
 endif
 
 REQUIRES	= xpcom \
 		  msgbase \
 		  lwbrk \
 		  string \
 		  $(NULL)
 
-ifeq (OS2,$(OS_ARCH))
-EXTRA_DSO_LIBS = msgbsutl
-else
 EXTRA_DSO_LIBS = msgbaseutil
-endif
 
 CPPSRCS		= nsBayesianFilterFactory.cpp
 
 LOCAL_INCLUDES += -I$(srcdir)/../src
 
 SHARED_LIBRARY_LIBS = \
 		../src/$(LIB_PREFIX)bayesflt_s.$(LIB_SUFFIX) \
 		$(NULL)
--- a/mailnews/extensions/fts3/build/Makefile.in
+++ b/mailnews/extensions/fts3/build/Makefile.in
@@ -54,21 +54,17 @@ MOZILLA_INTERNAL_API = 1
 endif
 
 REQUIRES	= xpcom \
 		  string \
 		  sqlite3 \
 		  storage \
 		  $(NULL)
 
-ifeq (OS2,$(OS_ARCH))
-EXTRA_DSO_LIBS = msgbsutl
-else
 EXTRA_DSO_LIBS = msgbaseutil
-endif
 
 CPPSRCS		= nsFts3TokenizerFactory.cpp
 
 LOCAL_INCLUDES += -I$(srcdir)/../src
 
 SHARED_LIBRARY_LIBS = \
 		../src/$(LIB_PREFIX)fts3tok_s.$(LIB_SUFFIX) \
 		$(NULL)
--- a/mailnews/extensions/mailviews/build/Makefile.in
+++ b/mailnews/extensions/mailviews/build/Makefile.in
@@ -57,21 +57,17 @@ REQUIRES	= xpcom \
 		  msgbase \
 		  necko \
 		  msgbaseutil \
           	  msgdb \
           	  mime \
 		  intl \
 		  $(NULL)
 
-ifeq (OS2,$(OS_ARCH))
-EXTRA_DSO_LIBS = msgbsutl
-else
 EXTRA_DSO_LIBS = msgbaseutil
-endif
 
 CPPSRCS		= nsMsgMailViewsFactory.cpp
 
 LOCAL_INCLUDES += -I$(srcdir)/../src
 
 SHARED_LIBRARY_LIBS = \
 		../src/$(LIB_PREFIX)mailview_s.$(LIB_SUFFIX) \
 		$(NULL)
--- a/mailnews/extensions/mdn/build/Makefile.in
+++ b/mailnews/extensions/mdn/build/Makefile.in
@@ -56,21 +56,17 @@ REQUIRES	= xpcom \
 		  string \
 		  mime \
 		  msgbase \
 		  msgbaseutil \
 		  msgdb \
 		  necko \
 		  $(NULL)
 
-ifeq (OS2,$(OS_ARCH))
-EXTRA_DSO_LIBS = msgbsutl
-else
 EXTRA_DSO_LIBS = msgbaseutil
-endif
 
 CPPSRCS		= nsMsgMdnFactory.cpp
 
 LOCAL_INCLUDES += -I$(srcdir)/../src
 
 SHARED_LIBRARY_LIBS = \
 		../src/$(LIB_PREFIX)msgmdn_s.$(LIB_SUFFIX) \
 		$(NULL)
--- a/mailnews/extensions/smime/build/Makefile.in
+++ b/mailnews/extensions/smime/build/Makefile.in
@@ -58,21 +58,17 @@ REQUIRES	= xpcom \
 		  msgcompose \
 		  pipnss \
 		  necko \
 		  intl \
 		  $(NULL)
 
 ifndef MOZ_STATIC_MAIL_BUILD
 
-ifeq (OS2,$(OS_ARCH))
-EXTRA_DSO_LIBS = msgbsutl
-else
 EXTRA_DSO_LIBS = msgbaseutil
-endif
 
 endif
 
 CPPSRCS		= nsMsgSMIMEFactory.cpp
 
 LOCAL_INCLUDES += -I$(srcdir)/../src
 
 SHARED_LIBRARY_LIBS = \
--- a/mailnews/imap/build/Makefile.in
+++ b/mailnews/imap/build/Makefile.in
@@ -65,21 +65,17 @@ REQUIRES	= xpcom \
 		  mime \
 		  pref \
 		  intl \
 		  msglocal \
 		  nkcache \
       uriloader \
 		  $(NULL)
 
-ifeq (OS2,$(OS_ARCH))
-EXTRA_DSO_LIBS	= msgbsutl
-else
 EXTRA_DSO_LIBS	= msgbaseutil
-endif
 
 CPPSRCS		= nsImapFactory.cpp
 
 SHARED_LIBRARY_LIBS = \
 		../src/$(LIB_PREFIX)msgimap_s.$(LIB_SUFFIX) \
 		$(NULL)
 
 ifdef MOZILLA_INTERNAL_API
--- a/mailnews/imap/test/Makefile.in
+++ b/mailnews/imap/test/Makefile.in
@@ -86,20 +86,16 @@ LIBS += 	\
 		../src/$(LIB_PREFIX)msgimap_s.$(LIB_SUFFIX) \
 		$(NULL)
 
 ifdef MOZ_STATIC_MAIL_BUILD
 LIBS +=		\
 		../../base/util/$(LIB_PREFIX)msgbsutl_s.$(LIB_SUFFIX) \
 		$(NULL)
 else
-ifeq (OS2,$(OS_ARCH))
-LIBS +=		$(call EXPAND_LIBNAME_PATH,msgbsutl,../../base/util)
-else
 LIBS +=		$(call EXPAND_LIBNAME_PATH,msgbaseutil,../../base/util)
 endif
-endif
 
 LIBS +=		\
 		$(XPCOM_LIBS) \
 		$(NSPR_LIBS) \
 		$(ZLIB_LIBS) \
 		$(NULL)
--- a/mailnews/import/build/Makefile.in
+++ b/mailnews/import/build/Makefile.in
@@ -118,21 +118,17 @@ LOCAL_INCLUDES += -I$(srcdir)/../oexpres
 	-I$(srcdir)/../winlivemail  \
 	$(NULL)
 endif
 endif
 
 ifdef MOZ_STATIC_MAIL_BUILD
 EXTRA_DSO_LDOPTS += ../../base/util/$(LIB_PREFIX)msgbsutl_s.$(LIB_SUFFIX)
 else
-ifeq (OS2,$(OS_ARCH))
-EXTRA_DSO_LIBS = msgbsutl
-else
 EXTRA_DSO_LIBS = msgbaseutil
-endif # ifeq
 endif # MOZ_STATIC_MAIL_BUILD
 
 ifdef MOZILLA_INTERNAL_API
 EXTRA_DSO_LDOPTS += \
 	$(LIBS_DIR) \
 	$(EXTRA_DSO_LIBS) \
 	$(MOZ_UNICHARUTIL_LIBS) \
 	$(MOZDEPTH)/modules/libreg/src/$(LIB_PREFIX)mozreg_s.$(LIB_SUFFIX) \
--- a/mailnews/local/build/Makefile.in
+++ b/mailnews/local/build/Makefile.in
@@ -63,21 +63,17 @@ REQUIRES	= xpcom \
 		  rdf \
 		  rdfutil \
 		  mime \
 		  intl \
 		  pref \
 		  nkcache \
 		  $(NULL)
 
-ifeq (OS2,$(OS_ARCH))
-EXTRA_DSO_LIBS = msgbsutl
-else
 EXTRA_DSO_LIBS = msgbaseutil
-endif
 
 CPPSRCS		= nsMsgLocalFactory.cpp
 
 SHARED_LIBRARY_LIBS = \
 		../src/$(LIB_PREFIX)msglocal_s.$(LIB_SUFFIX) \
 		$(NULL)
 
 ifdef MOZILLA_INTERNAL_API
--- a/mailnews/mapi/mapihook/src/Makefile.in
+++ b/mailnews/mapi/mapihook/src/Makefile.in
@@ -84,23 +84,17 @@ CPPSRCS		= \
 		msgMapiMain.cpp \
 		msgMapiSupport.cpp \
 		Registry.cpp \
 		$(NULL)
 
 LOBJS		= ../build/msgMapi_i.$(OBJ_SUFFIX)
 
 ifndef MOZ_STATIC_MAIL_BUILD
-
-ifeq (OS2,$(OS_ARCH))
-EXTRA_DSO_LIBS	= msgbsutl
-else
 EXTRA_DSO_LIBS	= msgbaseutil
-endif
-
 else
 SHARED_LIBRARY_LIBS = ../../../base/util/$(LIB_PREFIX)msgbsutl_s.$(LIB_SUFFIX)
 endif
 
 ifdef MOZILLA_INTERNAL_API
 EXTRA_DSO_LDOPTS= \
 		$(EXTRA_DSO_LIBS) \
 		$(MOZ_UNICHARUTIL_LIBS) \
--- a/mailnews/mime/build/Makefile.in
+++ b/mailnews/mime/build/Makefile.in
@@ -56,21 +56,17 @@ LOCAL_INCLUDES += -I$(srcdir)/../src
 REQUIRES	= xpcom \
 		  string \
 		  necko \
 		  msgbase \
 		  pref \
 		  uconv \
 		  $(NULL)
 
-ifeq (OS2,$(OS_ARCH))
-EXTRA_DSO_LIBS = msgbsutl
-else
 EXTRA_DSO_LIBS = msgbaseutil
-endif
 
 CPPSRCS			= nsMimeModule.cpp
 
 SHARED_LIBRARY_LIBS = \
                 ../src/$(LIB_PREFIX)mime_s.$(LIB_SUFFIX) \
                 $(NULL)
 
 ifdef MOZILLA_INTERNAL_API
--- a/mailnews/mime/cthandlers/calendar/Makefile.in
+++ b/mailnews/mime/cthandlers/calendar/Makefile.in
@@ -82,21 +82,17 @@ LOCAL_INCLUDES = -I$(srcdir)/../glue
 CPPSRCS		= \
 		mimecal.cpp \
 		$(NULL)
 
 ifndef MOZ_STATIC_MAIL_BUILD
 
 CPPSRCS += nsCalendarFactory.cpp
 
-ifeq (OS2,$(OS_ARCH))
-EXTRA_DSO_LIBS = msgbsutl
-else
 EXTRA_DSO_LIBS = msgbaseutil
-endif
 
 EXTRA_DSO_LIBS += mimecthglue_s
 
 ifdef MOZILLA_INTERNAL_API
 EXTRA_DSO_LDOPTS = \
 		$(LIBS_DIR) \
 		$(EXTRA_DSO_LIBS) \
 		$(MOZ_COMPONENT_LIBS) \
--- a/mailnews/mime/cthandlers/vcard/Makefile.in
+++ b/mailnews/mime/cthandlers/vcard/Makefile.in
@@ -81,21 +81,17 @@ LOCAL_INCLUDES = -I$(srcdir)/../glue
 CPPSRCS		= \
 		mimevcrd.cpp \
 		$(NULL)
 
 ifndef MOZ_STATIC_MAIL_BUILD
 
 CPPSRCS += nsVCardFactory.cpp
 
-ifeq (OS2,$(OS_ARCH))
-EXTRA_DSO_LIBS = msgbsutl
-else
 EXTRA_DSO_LIBS = msgbaseutil
-endif
 
 ifdef MOZILLA_INTERNAL_API
 EXTRA_DSO_LDOPTS = \
 		$(LIBS_DIR) \
 		$(EXTRA_DSO_LIBS) \
 		../glue/$(LIB_PREFIX)mimecthglue_s.$(LIB_SUFFIX) \
 		$(MOZ_COMPONENT_LIBS) \
 		$(NULL)
--- a/mailnews/mime/emitters/build/Makefile.in
+++ b/mailnews/mime/emitters/build/Makefile.in
@@ -58,21 +58,17 @@ REQUIRES	= xpcom \
 		  string \
 		  mime \
 		  necko \
 		  intl \
 		  locale \
 		  msgbase \
 		  $(NULL)
 
-ifeq (OS2,$(OS_ARCH))
-EXTRA_DSO_LIBS = msgbsutl
-else
 EXTRA_DSO_LIBS = msgbaseutil
-endif
 
 CPPSRCS		= nsEmitterFactory.cpp
 
 SHARED_LIBRARY_LIBS = \
 		../src/$(LIB_PREFIX)emitterutil_s.$(LIB_SUFFIX) \
 		$(NULL)
 
 ifdef MOZILLA_INTERNAL_API
--- a/mailnews/news/build/Makefile.in
+++ b/mailnews/news/build/Makefile.in
@@ -72,21 +72,17 @@ REQUIRES	= xpcom \
 		  $(NULL)
 
 CPPSRCS		= nsMsgNewsFactory.cpp
 
 LOCAL_INCLUDES += -I$(srcdir)/../src
 
 SHARED_LIBRARY_LIBS = ../src/$(LIB_PREFIX)msgnews_s.$(LIB_SUFFIX)
 
-ifeq (OS2,$(OS_ARCH))
-EXTRA_DSO_LIBS += msgbsutl
-else
 EXTRA_DSO_LIBS += msgbaseutil
-endif
 
 ifdef MOZILLA_INTERNAL_API
 EXTRA_DSO_LDOPTS = \
 		$(LIBS_DIR) \
 		$(MOZDEPTH)/rdf/util/src/internal/$(LIB_PREFIX)rdfutil_s.$(LIB_SUFFIX) \
 		$(EXTRA_DSO_LIBS) \
 		$(MOZ_COMPONENT_LIBS) \
 		$(MOZ_UNICHARUTIL_LIBS) \