Bugzilla Bug 288647: enable building NSS with an NSPR binary distribution.

Introduced NSPR_INCLUDE_DIR and NSPR_LIB_DIR make variables. Portions of
the patch were contributed by Chris Seawood <cls@seawood.org>. r=relyea.
Modified Files:
	coreconf/OS2.mk coreconf/OpenVMS.mk coreconf/location.mk
	nss/cmd/platlibs.mk nss/cmd/shlibsign/Makefile
	nss/cmd/shlibsign/sign.cmd nss/cmd/shlibsign/sign.sh
	nss/lib/ckfw/builtins/Makefile
	nss/lib/fortcrypt/swfort/pkcs11/Makefile nss/lib/nss/config.mk
	nss/lib/smime/config.mk nss/lib/softoken/config.mk
	nss/lib/ssl/config.mk
This commit is contained in:
wtchang%redhat.com 2005-07-21 23:48:30 +00:00
Родитель 87adb6b038
Коммит 252be2d441
13 изменённых файлов: 77 добавлений и 72 удалений

Просмотреть файл

@ -109,12 +109,6 @@ endif #NO_SHARED_LIB
OS_CFLAGS = -Wall -W -Wno-unused -Wpointer-arith -Wcast-align -Zomf -DDEBUG -DTRACING -g
# Where the libraries are
MOZ_COMPONENT_NSPR_LIBS=-L$(DIST)/lib $(NSPR_LIBS)
NSPR_LIBS = -lplds4 -lplc4 -lnspr4
NSPR_INCLUDE_DIR =
ifdef BUILD_OPT
OPTIMIZER = -O2 -s
DEFINES += -UDEBUG -U_DEBUG -DNDEBUG
@ -182,12 +176,6 @@ OS_CFLAGS = /Q /qlibansi /Gd /Gm /Su4 /Mp /Tl-
INCLUDES += -I$(CORE_DEPTH)/../dist/include
DEFINES += -DXP_OS2_VACPP -DTCPV40HDRS
# Where the libraries are
NSPR_LIBS = $(DIST)/lib/nspr4.lib $(DIST)/lib/plc4.lib $(DIST)/lib/plds4.lib
MOZ_COMPONENT_NSPR_LIBS=-L$(DIST)/lib $(NSPR_LIBS)
NSPR_INCLUDE_DIR =
DLLFLAGS = /DLL /O:$@ /INC:_dllentry /MAP:$(@:.dll=.map)
EXEFLAGS = -PMTYPE:VIO -OUT:$@ -MAP:$(@:.exe=.map) -nologo -NOE
LDFLAGS = /FREE /NOE /LINENUMBERS /nologo

Просмотреть файл

@ -51,11 +51,6 @@ CPU_ARCH := $(shell uname -Wh)
OS_CFLAGS = -DVMS
OS_CXXFLAGS = -DVMS
# Maybe this should go into rules.mk or something?
ifdef NSPR_INCLUDE_DIR
INCLUDES += -I$(NSPR_INCLUDE_DIR)
endif
#
# XCFLAGS are the only CFLAGS that are used during a link operation. Defining
# OPTIMIZER in XCFLAGS means that each compilation line gets OPTIMIZER

Просмотреть файл

@ -67,4 +67,12 @@ endif
GARBAGE += $(DEPENDENCIES) core $(wildcard core.[0-9]*)
ifdef NSPR_INCLUDE_DIR
INCLUDES += -I$(NSPR_INCLUDE_DIR)
endif
ifndef NSPR_LIB_DIR
NSPR_LIB_DIR = $(DIST)/lib
endif
MK_LOCATION = included

Просмотреть файл

@ -72,9 +72,9 @@ EXTRA_LIBS += \
$(DIST)/lib/$(LIB_PREFIX)nssdev.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)nssb.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)dbm.$(LIB_SUFFIX) \
$(DIST)/lib/$(NSPR31_LIB_PREFIX)plc4.$(LIB_SUFFIX) \
$(DIST)/lib/$(NSPR31_LIB_PREFIX)plds4.$(LIB_SUFFIX) \
$(DIST)/lib/$(NSPR31_LIB_PREFIX)nspr4.$(LIB_SUFFIX) \
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.$(LIB_SUFFIX) \
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.$(LIB_SUFFIX) \
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.$(LIB_SUFFIX) \
$(NULL)
# $(PROGRAM) has NO explicit dependencies on $(OS_LIBS)
@ -130,13 +130,13 @@ endif
# $(EXTRA_SHARED_LIBS) come before $(OS_LIBS), except on AIX.
ifdef XP_OS2_VACPP
EXTRA_SHARED_LIBS += \
$(DIST)/lib/plc4.lib \
$(DIST)/lib/plds4.lib \
$(DIST)/lib/nspr4.lib \
$(NSPR_LIB_DIR)/plc4.lib \
$(NSPR_LIB_DIR)/plds4.lib \
$(NSPR_LIB_DIR)/nspr4.lib \
$(NULL)
else
EXTRA_SHARED_LIBS += \
-L$(DIST)/lib \
-L$(NSPR_LIB_DIR) \
-lplc4 \
-lplds4 \
-lnspr4 \
@ -158,9 +158,9 @@ EXTRA_LIBS += \
$(DIST)/lib/$(IMPORT_LIB_PREFIX)smime3$(IMPORT_LIB_SUFFIX) \
$(DIST)/lib/$(IMPORT_LIB_PREFIX)ssl3$(IMPORT_LIB_SUFFIX) \
$(DIST)/lib/$(IMPORT_LIB_PREFIX)nss3$(IMPORT_LIB_SUFFIX) \
$(DIST)/lib/$(NSPR31_LIB_PREFIX)plc4.$(LIB_SUFFIX) \
$(DIST)/lib/$(NSPR31_LIB_PREFIX)plds4.$(LIB_SUFFIX) \
$(DIST)/lib/$(NSPR31_LIB_PREFIX)nspr4.$(LIB_SUFFIX) \
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.$(LIB_SUFFIX) \
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.$(LIB_SUFFIX) \
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.$(LIB_SUFFIX) \
$(NULL)
# $(PROGRAM) has NO explicit dependencies on $(OS_LIBS)
@ -222,6 +222,7 @@ EXTRA_SHARED_LIBS += \
-lssl3 \
-lsmime3 \
-lnss3 \
-L$(NSPR_LIB_DIR) \
-lplc4 \
-lplds4 \
-lnspr4 \

Просмотреть файл

@ -105,9 +105,9 @@ include ../platrules.mk
%.chk: %.$(DLL_SUFFIX)
ifeq ($(OS_TARGET), OS2)
@cmd.exe /c sign.cmd $(DIST) $(OBJDIR) $(OS_TARGET) $<
@cmd.exe /c sign.cmd $(DIST) $(OBJDIR) $(OS_TARGET) $(NSPR_LIB_DIR) $<
else
@sh ./sign.sh $(DIST) $(OBJDIR) $(OS_TARGET) $<
@sh ./sign.sh $(DIST) $(OBJDIR) $(OS_TARGET) $(NSPR_LIB_DIR) $<
endif
libs install :: $(CHECKLOC)

Просмотреть файл

@ -1,10 +1,12 @@
/* Equivalent to sign.sh for OS/2 */
PARSE ARG dist objdir os_target therest
PARSE ARG dist objdir os_target nspr_lib_dir therest
dist=forwardtoback(dist);
objdir=forwardtoback(objdir);
nspr_lib_dir=forwardtoback(nspr_lib_dir);
'echo 'dist
'echo 'objdir
'set BEGINLIBPATH='dist'\lib;%BEGINLIBPATH%'
'echo 'nspr_lib_dir
'set BEGINLIBPATH='dist'\lib;'nspr_lib_dir';%BEGINLIBPATH%'
'set LIBPATHSTRICT=T'
objdir'\shlibsign -v -i 'therest
exit

Просмотреть файл

@ -2,7 +2,7 @@
case "${3}" in
WIN*)
if echo "${PATH}" | grep -c \; >/dev/null; then
PATH=${1}/bin\;${1}/lib\;${PATH}
PATH=${1}/bin\;${1}/lib\;${4}\;${PATH}
else
# ARG1 is ${1} with the drive letter escaped.
if echo "${1}" | grep -c : >/dev/null; then
@ -10,11 +10,16 @@ WIN*)
else
ARG1=${1}
fi
PATH=${ARG1}/bin:${ARG1}/lib:${PATH}
if echo "${4}" | grep -c : >/dev/null; then
ARG4=`(cd ${4}; pwd)`
else
ARG4=${4}
fi
PATH=${ARG1}/bin:${ARG1}/lib:${ARG4}:${PATH}
fi
export PATH
echo ${2}/shlibsign -v -i ${4}
${2}/shlibsign -v -i ${4}
echo ${2}/shlibsign -v -i ${5}
${2}/shlibsign -v -i ${5}
;;
OpenVMS)
temp="tmp$$.tmp"
@ -26,8 +31,8 @@ OpenVMS)
echo '$ define/job getipnodebyname xxx' >> $temp2
echo '$ define/job vms_null_dl_name sys$share:decc$shr' >> $temp2
dcl @$temp2
echo ${2}/shlibsign -v -i ${4}
${2}/shlibsign -v -i ${4}
echo ${2}/shlibsign -v -i ${5}
${2}/shlibsign -v -i ${5}
sed -e "s/\([^\.]*\)\.so/\$ deass\/job \1/" $temp > $temp2
echo '$ deass/job getipnodebyname' >> $temp2
echo '$ deass/job vms_null_dl_name' >> $temp2
@ -35,17 +40,17 @@ OpenVMS)
rm $temp $temp2
;;
*)
LIBPATH=`(cd ${1}/lib; pwd)`:$LIBPATH
LIBPATH=`(cd ${1}/lib; pwd)`:`(cd ${4}; pwd)`:$LIBPATH
export LIBPATH
SHLIB_PATH=${1}/lib:$SHLIB_PATH
SHLIB_PATH=${1}/lib:${4}:$SHLIB_PATH
export SHLIB_PATH
LD_LIBRARY_PATH=${1}/lib:$LD_LIBRARY_PATH
LD_LIBRARY_PATH=${1}/lib:${4}:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
DYLD_LIBRARY_PATH=${1}/lib:$DYLD_LIBRARY_PATH
DYLD_LIBRARY_PATH=${1}/lib:${4}:$DYLD_LIBRARY_PATH
export DYLD_LIBRARY_PATH
LIBRARY_PATH=${1}/lib:$LIBRARY_PATH
LIBRARY_PATH=${1}/lib:${4}:$LIBRARY_PATH
export LIBRARY_PATH
echo ${2}/shlibsign -v -i ${4}
${2}/shlibsign -v -i ${4}
echo ${2}/shlibsign -v -i ${5}
${2}/shlibsign -v -i ${5}
;;
esac

Просмотреть файл

@ -34,7 +34,7 @@
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
MAKEFILE_CVS_ID = "@(#) $RCSfile: Makefile,v $ $Revision: 1.14 $ $Date: 2005/01/20 02:25:46 $"
MAKEFILE_CVS_ID = "@(#) $RCSfile: Makefile,v $ $Revision: 1.15 $ $Date: 2005/07/21 23:48:18 $"
include manifest.mn
include $(CORE_DEPTH)/coreconf/config.mk
@ -53,23 +53,23 @@ ifeq (,$(filter-out WIN%,$(OS_TARGET)))
# This is merely an expedient hack and not the right solution.
ifdef NS_USE_GCC
EXTRA_LIBS += \
-L$(DIST)/lib \
-L$(NSPR_LIB_DIR) \
-lplc4 \
-lplds4 \
-lnspr4 \
$(NULL)
else
EXTRA_LIBS += \
$(DIST)/lib/$(NSPR31_LIB_PREFIX)plc4_s.lib \
$(DIST)/lib/$(NSPR31_LIB_PREFIX)plds4_s.lib \
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4_s.lib \
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4_s.lib \
$(NULL)
endif
else
EXTRA_LIBS += \
$(DIST)/lib/$(LIB_PREFIX)plc4.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)plds4.$(LIB_SUFFIX) \
$(NSPR_LIB_DIR)/$(LIB_PREFIX)plc4.$(LIB_SUFFIX) \
$(NSPR_LIB_DIR)/$(LIB_PREFIX)plds4.$(LIB_SUFFIX) \
$(NULL)
endif

Просмотреть файл

@ -63,7 +63,7 @@ EXTRA_LIBS = \
$(DIST)/lib/$(LIB_PREFIX)softokn.$(LIB_SUFFIX) \
$(CRYPTO_LIB) \
$(DIST)/lib/$(LIB_PREFIX)secutil.$(LIB_SUFFIX) \
-L$(DIST)/lib \
-L$(NSPR_LIB_DIR) \
-lplc4 \
-lplds4 \
-lnspr4 \
@ -76,8 +76,8 @@ EXTRA_LIBS = \
$(DIST)/lib/softokn.lib \
$(CRYPTO_LIB) \
$(DIST)/lib/secutil.lib \
$(DIST)/lib/$(NSPR31_LIB_PREFIX)plc4_s.lib \
$(DIST)/lib/$(NSPR31_LIB_PREFIX)plds4_s.lib \
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4_s.lib \
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4_s.lib \
wsock32.lib \
winmm.lib \
$(NULL)
@ -98,8 +98,8 @@ EXTRA_LIBS += \
$(DIST)/lib/$(LIB_PREFIX)softokn.$(LIB_SUFFIX) \
$(CRYPTO_LIB) \
$(DIST)/lib/$(LIB_PREFIX)secutil.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)plc4.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)plds4.$(LIB_SUFFIX) \
$(NSPR_LIB_DIR)/$(LIB_PREFIX)plc4.$(LIB_SUFFIX) \
$(NSPR_LIB_DIR)/$(LIB_PREFIX)plds4.$(LIB_SUFFIX) \
$(NULL)
endif

Просмотреть файл

@ -54,6 +54,7 @@ ifdef NS_USE_GCC
EXTRA_SHARED_LIBS += \
-L$(DIST)/lib \
-lsoftokn3 \
-L$(NSPR_LIB_DIR) \
-lplc4 \
-lplds4 \
-lnspr4\
@ -61,9 +62,9 @@ EXTRA_SHARED_LIBS += \
else # ! NS_USE_GCC
EXTRA_SHARED_LIBS += \
$(DIST)/lib/softokn3.lib \
$(DIST)/lib/$(NSPR31_LIB_PREFIX)plc4.lib \
$(DIST)/lib/$(NSPR31_LIB_PREFIX)plds4.lib \
$(DIST)/lib/$(NSPR31_LIB_PREFIX)nspr4.lib \
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.lib \
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.lib \
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.lib \
$(NULL)
endif # NS_USE_GCC
@ -72,8 +73,9 @@ else
# $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS)
# $(EXTRA_SHARED_LIBS) come before $(OS_LIBS), except on AIX.
EXTRA_SHARED_LIBS += \
-L$(DIST)/lib/ \
-L$(DIST)/lib \
-lsoftokn3 \
-L$(NSPR_LIB_DIR) \
-lplc4 \
-lplds4 \
-lnspr4 \

Просмотреть файл

@ -50,6 +50,7 @@ ifdef NS_USE_GCC
EXTRA_SHARED_LIBS += \
-L$(DIST)/lib \
-lnss3 \
-L$(NSPR_LIB_DIR) \
-lplc4 \
-lplds4 \
-lnspr4 \
@ -57,17 +58,18 @@ EXTRA_SHARED_LIBS += \
else # ! NS_USE_GCC
EXTRA_SHARED_LIBS += \
$(DIST)/lib/nss3.lib \
$(DIST)/lib/$(NSPR31_LIB_PREFIX)plc4.lib \
$(DIST)/lib/$(NSPR31_LIB_PREFIX)plds4.lib \
$(DIST)/lib/$(NSPR31_LIB_PREFIX)nspr4.lib \
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.lib \
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.lib \
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.lib \
$(NULL)
endif # NS_USE_GCC
else
EXTRA_SHARED_LIBS += \
-L$(DIST)/lib/ \
-L$(DIST)/lib \
-lnss3 \
-L$(NSPR_LIB_DIR) \
-lplc4 \
-lplds4 \
-lnspr4 \

Просмотреть файл

@ -61,7 +61,7 @@ RESNAME = $(LIBRARY_NAME).rc
ifdef NS_USE_GCC
EXTRA_SHARED_LIBS += \
-L$(DIST)/lib \
-L$(NSPR_LIB_DIR) \
-lplc4 \
-lplds4 \
-lnspr4 \
@ -69,9 +69,9 @@ EXTRA_SHARED_LIBS += \
else # ! NS_USE_GCC
EXTRA_SHARED_LIBS += \
$(DIST)/lib/$(NSPR31_LIB_PREFIX)plc4.lib \
$(DIST)/lib/$(NSPR31_LIB_PREFIX)plds4.lib \
$(DIST)/lib/$(NSPR31_LIB_PREFIX)nspr4.lib \
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.lib \
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.lib \
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.lib \
$(NULL)
endif # NS_USE_GCC
@ -80,7 +80,7 @@ else
# $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS)
# $(EXTRA_SHARED_LIBS) come before $(OS_LIBS), except on AIX.
EXTRA_SHARED_LIBS += \
-L$(DIST)/lib/ \
-L$(NSPR_LIB_DIR) \
-lplc4 \
-lplds4 \
-lnspr4 \

Просмотреть файл

@ -52,6 +52,7 @@ ifdef NS_USE_GCC
EXTRA_SHARED_LIBS += \
-L$(DIST)/lib \
-lnss3 \
-L$(NSPR_LIB_DIR) \
-lplc4 \
-lplds4 \
-lnspr4 \
@ -59,9 +60,9 @@ EXTRA_SHARED_LIBS += \
else # ! NS_USE_GCC
EXTRA_SHARED_LIBS += \
$(DIST)/lib/nss3.lib \
$(DIST)/lib/$(NSPR31_LIB_PREFIX)plc4.lib \
$(DIST)/lib/$(NSPR31_LIB_PREFIX)plds4.lib \
$(DIST)/lib/$(NSPR31_LIB_PREFIX)nspr4.lib \
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.lib \
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.lib \
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.lib \
$(NULL)
endif # NS_USE_GCC
@ -71,8 +72,9 @@ else
# $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS)
# $(EXTRA_SHARED_LIBS) come before $(OS_LIBS), except on AIX.
EXTRA_SHARED_LIBS += \
-L$(DIST)/lib/ \
-L$(DIST)/lib \
-lnss3 \
-L$(NSPR_LIB_DIR) \
-lplc4 \
-lplds4 \
-lnspr4 \