Bug 648407 - Allow to fold NSPR, NSS and SQLite libraries all together. r=ted

This commit is contained in:
Mike Hommey 2013-03-17 07:53:39 +01:00
parent 0b83db1463
commit e5f86190e5
12 changed files with 231 additions and 16 deletions

View File

@ -49,10 +49,12 @@
#ifndef MOZ_STATIC_JS
@BINPATH@/@DLL_PREFIX@mozjs@DLL_SUFFIX@
#endif
#ifndef MOZ_FOLD_LIBS
@BINPATH@/@DLL_PREFIX@plc4@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@plds4@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@xpcom@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@
#endif
@BINPATH@/@DLL_PREFIX@xpcom@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@mozalloc@DLL_SUFFIX@
#ifdef MOZ_DMD
@BINPATH@/@DLL_PREFIX@dmd@DLL_SUFFIX@
@ -640,11 +642,13 @@
@BINPATH@/components/pipnss.xpt
@BINPATH@/components/pippki.xpt
@BINPATH@/@DLL_PREFIX@nss3@DLL_SUFFIX@
#ifndef MOZ_FOLD_LIBS
@BINPATH@/@DLL_PREFIX@nssutil3@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@smime3@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@ssl3@DLL_SUFFIX@
#endif
@BINPATH@/@DLL_PREFIX@softokn3@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@freebl3@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@ssl3@DLL_SUFFIX@
#ifndef CROSS_COMPILE
@BINPATH@/@DLL_PREFIX@freebl3.chk
@BINPATH@/@DLL_PREFIX@softokn3.chk

View File

@ -63,10 +63,12 @@
@BINPATH@/@DLL_PREFIX@mozjs@DLL_SUFFIX@
#endif
#ifndef MOZ_NATIVE_NSPR
#ifndef MOZ_FOLD_LIBS
@BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@plc4@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@plds4@DLL_SUFFIX@
#endif
#endif
@BINPATH@/@DLL_PREFIX@xpcom@DLL_SUFFIX@
#ifdef XP_MACOSX
@BINPATH@/XUL
@ -120,8 +122,10 @@
@BINPATH@/platform.ini
#ifndef XP_OS2
#ifndef MOZ_NATIVE_SQLITE
#ifndef MOZ_FOLD_LIBS
@BINPATH@/@DLL_PREFIX@mozsqlite3@DLL_SUFFIX@
#endif
#endif
#else
@BINPATH@/mozsqlt3@DLL_SUFFIX@
#endif
@ -656,11 +660,13 @@
#ifndef NSS_DISABLE_DBM
@BINPATH@/@DLL_PREFIX@nssdbm3@DLL_SUFFIX@
#endif
#ifndef MOZ_FOLD_LIBS
@BINPATH@/@DLL_PREFIX@nssutil3@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@smime3@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@softokn3@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@ssl3@DLL_SUFFIX@
#endif
@BINPATH@/@DLL_PREFIX@softokn3@DLL_SUFFIX@
#endif
@BINPATH@/chrome/pippki@JAREXT@
@BINPATH@/chrome/pippki.manifest
@BINPATH@/components/pipboot.xpt

View File

@ -22,8 +22,21 @@ endif
# Copy NSPR to the SDK
ABS_DIST = $(call core_abspath,$(DIST))
ifdef MOZ_FOLD_LIBS
# Trick the nspr build system into not building shared libraries.
# bug #851869.
EXTRA_MAKE_FLAGS := SHARED_LIBRARY= IMPORT_LIBRARY= SHARED_LIB_PDB=
# Work around libVersionPoint conflict between all three libraries.
# See bug #838566.
EXTRA_MAKE_FLAGS += XP_DEFINE=-DlibVersionPoint='libVersionPoint$$(LIBRARY_NAME)'
endif
libs export clean distclean::
$(MAKE) -C $(DEPTH)/nsprpub $@ $(EXTRA_MAKE_FLAGS)
libs::
$(MAKE) -C $(DEPTH)/nsprpub install prefix=$(ABS_DIST)/sdk exec_prefix=$(ABS_DIST)/sdk bindir=$(ABS_DIST)/sdk/dummy includedir=$(ABS_DIST)/include/nspr libdir=$(ABS_DIST)/sdk/lib datadir=$(ABS_DIST)/sdk/dummy DESTDIR=
$(MAKE) -C $(DEPTH)/nsprpub install prefix=$(ABS_DIST)/sdk exec_prefix=$(ABS_DIST)/sdk bindir=$(ABS_DIST)/sdk/dummy includedir=$(ABS_DIST)/include/nspr libdir=$(ABS_DIST)/sdk/lib datadir=$(ABS_DIST)/sdk/dummy DESTDIR= $(EXTRA_MAKE_FLAGS)
$(INSTALL) $(DEPTH)/nsprpub/config/nspr-config $(DIST)/sdk/bin
$(RM) -rf $(DIST)/sdk/dummy
ifneq (,$(filter OS2 WINNT,$(OS_ARCH))) # {

View File

@ -3965,12 +3965,17 @@ if test -n "$MOZ_NATIVE_NSS"; then
NSS_LIBS="$NSS_LIBS -lcrmf"
else
NSS_CFLAGS='-I$(LIBXUL_DIST)/include/nss'
if test -z "$IMPORT_LIB_SUFFIX"; then
DLL_LINK_SUFFIX='$(DLL_SUFFIX)'
else
DLL_LINK_SUFFIX='$(IMPORT_LIB_SUFFIX)'
fi
NSS_DEP_LIBS="\
\$(LIBXUL_DIST)/lib/\$(LIB_PREFIX)crmf.\$(LIB_SUFFIX) \
\$(LIBXUL_DIST)/lib/\$(DLL_PREFIX)smime$NSS_VERSION\$(DLL_SUFFIX) \
\$(LIBXUL_DIST)/lib/\$(DLL_PREFIX)ssl$NSS_VERSION\$(DLL_SUFFIX) \
\$(LIBXUL_DIST)/lib/\$(DLL_PREFIX)nss$NSS_VERSION\$(DLL_SUFFIX) \
\$(LIBXUL_DIST)/lib/\$(DLL_PREFIX)nssutil$NSS_VERSION\$(DLL_SUFFIX)"
\$(LIBXUL_DIST)/lib/\$(DLL_PREFIX)smime$NSS_VERSION${DLL_LINK_SUFFIX} \
\$(LIBXUL_DIST)/lib/\$(DLL_PREFIX)ssl$NSS_VERSION${DLL_LINK_SUFFIX} \
\$(LIBXUL_DIST)/lib/\$(DLL_PREFIX)nss$NSS_VERSION${DLL_LINK_SUFFIX} \
\$(LIBXUL_DIST)/lib/\$(DLL_PREFIX)nssutil$NSS_VERSION${DLL_LINK_SUFFIX}"
if test -z "$GNU_CC" -a "$OS_ARCH" = "WINNT" -o "$OS_ARCH" = "OS2"; then
NSS_LIBS="\
@ -8861,6 +8866,7 @@ AC_SUBST(LIBJPEG_TURBO_X64_ASM)
AC_SUBST(LIBJPEG_TURBO_ARM_ASM)
AC_SUBST(MOZ_PACKAGE_JSSHELL)
AC_SUBST(MOZ_FOLD_LIBS)
AC_MSG_CHECKING([for posix_fallocate])
AC_TRY_LINK([#define _XOPEN_SOURCE 600

View File

@ -13,7 +13,11 @@ include $(DEPTH)/config/autoconf.mk
MODULE = sqlite3
LIBRARY_NAME = mozsqlite3
SHORT_LIBNAME = mozsqlt3
ifdef MOZ_FOLD_LIBS
FORCE_STATIC_LIB = 1
else
FORCE_SHARED_LIB = 1
endif
VISIBILITY_FLAGS =
LIB_IS_C_ONLY = 1

View File

@ -35,10 +35,12 @@
#ifndef MOZ_STATIC_JS
@BINPATH@/@DLL_PREFIX@mozjs@DLL_SUFFIX@
#endif
#ifndef MOZ_FOLD_LIBS
@BINPATH@/@DLL_PREFIX@plc4@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@plds4@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@xpcom@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@
#endif
@BINPATH@/@DLL_PREFIX@xpcom@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@mozalloc@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@mozglue@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@omxplugin@DLL_SUFFIX@
@ -70,7 +72,9 @@
#endif
@BINPATH@/application.ini
@BINPATH@/platform.ini
#ifndef MOZ_FOLD_LIBS
@BINPATH@/@DLL_PREFIX@mozsqlite3@DLL_SUFFIX@
#endif
@BINPATH@/blocklist.xml
#ifdef XP_UNIX
@BINPATH@/run-mozilla.sh
@ -475,11 +479,13 @@
@BINPATH@/components/pipnss.xpt
@BINPATH@/components/pippki.xpt
@BINPATH@/@DLL_PREFIX@nss3@DLL_SUFFIX@
#ifndef MOZ_FOLD_LIBS
@BINPATH@/@DLL_PREFIX@nssutil3@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@smime3@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@ssl3@DLL_SUFFIX@
#endif
@BINPATH@/@DLL_PREFIX@softokn3@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@freebl3@DLL_SUFFIX@
@BINPATH@/@DLL_PREFIX@ssl3@DLL_SUFFIX@
#ifndef CROSS_COMPILE
@BINPATH@/@DLL_PREFIX@freebl3.chk
@BINPATH@/@DLL_PREFIX@softokn3.chk

View File

@ -28,9 +28,11 @@ ifndef MOZ_PROFILE_GENERATE
libs::
$(INSTALL) ../tool/signmar$(BIN_SUFFIX) $(TESTROOT)/unit
$(INSTALL) $(DEPTH)/dist/bin/$(DLL_PREFIX)nss3$(DLL_SUFFIX) $(TESTROOT)/unit
ifndef MOZ_FOLD_LIBS
$(INSTALL) $(DEPTH)/dist/bin/$(DLL_PREFIX)nssutil3$(DLL_SUFFIX) $(TESTROOT)/unit
$(INSTALL) $(DEPTH)/dist/bin/$(DLL_PREFIX)plc4$(DLL_SUFFIX) $(TESTROOT)/unit
$(INSTALL) $(DEPTH)/dist/bin/$(DLL_PREFIX)nspr4$(DLL_SUFFIX) $(TESTROOT)/unit
$(INSTALL) $(DEPTH)/dist/bin/$(DLL_PREFIX)plds4$(DLL_SUFFIX) $(TESTROOT)/unit
endif
endif
endif # Not Android

View File

@ -12,17 +12,30 @@ include $(DEPTH)/config/autoconf.mk
CC_WRAPPER =
CXX_WRAPPER =
ifdef MOZ_FOLD_LIBS
MODULE = nss
# TODO: The library name can be changed when bug 845217 is fixed.
LIBRARY_NAME = nss3
FORCE_SHARED_LIB = 1
endif
default::
include $(topsrcdir)/config/config.mk
NSS_DLLS = \
NSS_LIBS = \
nss3 \
nssutil3 \
smime3 \
ssl3 \
$(NULL)
ifdef MOZ_FOLD_LIBS
NSS_DLLS = $(LIBRARY_NAME)
else
NSS_DLLS = $(NSS_LIBS)
endif
NSS_EXTRA_DLLS = \
nssckbi \
softokn3 \
@ -127,7 +140,11 @@ ifeq ($(OS_ARCH),WINNT)
DEFAULT_GMAKE_FLAGS += INSTALL="$(NSINSTALL) -t"
endif
ifndef MOZ_NATIVE_SQLITE
ifdef MOZ_FOLD_LIBS
DEFAULT_GMAKE_FLAGS += SQLITE_LIB_NAME=nss3
else
DEFAULT_GMAKE_FLAGS += SQLITE_LIB_NAME=mozsqlite3
endif # MOZ_FOLD_LIBS
DEFAULT_GMAKE_FLAGS += SQLITE_INCLUDE_DIR=$(ABS_DIST)/include
endif
ifdef NSS_DISABLE_DBM
@ -242,6 +259,8 @@ DEFAULT_GMAKE_FLAGS += XCFLAGS="$(CFLAGS)"
DEFAULT_GMAKE_FLAGS += DARWIN_DYLIB_VERSIONS="-compatibility_version 1 -current_version 1 $(LDFLAGS)"
endif
DEFAULT_GMAKE_FLAGS += NSS_NO_PKCS11_BYPASS=1
# Put NSS headers directly under $(DIST)/include
DEFAULT_GMAKE_FLAGS += PUBLIC_EXPORT_DIR='$(ABS_DIST)/include/$$(MODULE)'
DEFAULT_GMAKE_FLAGS += SOURCE_XPHEADERS_DIR='$$(SOURCE_XP_DIR)/include/$$(MODULE)'
@ -283,8 +302,10 @@ NSS_DIRS =
ifndef NSS_DISABLE_DBM
NSS_DIRS += dbm
endif
ifndef MOZ_FOLD_LIBS
NSS_DIRS += nss/lib
endif
NSS_DIRS += \
nss/lib \
nss/cmd/lib \
nss/cmd/shlibsign \
$(NULL)
@ -301,7 +322,26 @@ ifneq (,$(filter %--build-id,$(LDFLAGS)))
DEFAULT_GMAKE_ENV = LDFLAGS=-Wl,--build-id
endif
NSS_DIST_DLL_FILES := $(addprefix $(DIST)/lib/$(DLL_PREFIX),$(addsuffix $(DLL_SUFFIX),$(NSS_DLLS) $(NSS_EXTRA_DLLS)))
ifdef MOZ_FOLD_LIBS
# TODO: The following can be replaced by something simpler when bug 844880
# is fixed.
# All static libraries required for nss, smime, ssl and nssutil.
NSS_STATIC_LIBS := $(shell $(MAKE) --no-print-directory -f $(srcdir)/nss.mk DEPTH="$(DEPTH)" topsrcdir="$(topsrcdir)" srcdir="$(srcdir)" echo-variable-libs)
# Corresponding build directories
NSS_STATIC_DIRS := $(foreach lib,$(NSS_STATIC_LIBS),$(patsubst %/,%,$(dir $(lib))))
NSS_DIRS += $(NSS_STATIC_DIRS)
# TODO: The following can be replaced by something simpler when bug 844884
# is fixed.
# Remaining nss/lib directories
NSS_DIRS += nss/lib/freebl nss/lib/softoken nss/lib/jar nss/lib/crmf nss/lib/ckfw nss/lib/libpkix
ifeq (WINNT,$(OS_TARGET))
NSS_DIRS += nss/lib/zlib
endif
endif # MOZ_FOLD_LIBS
# Filter-out $(LIBRARY_NAME) because it's already handled in config/rules.mk.
NSS_DIST_DLL_FILES := $(addprefix $(DIST)/lib/$(DLL_PREFIX),$(addsuffix $(DLL_SUFFIX),$(filter-out $(LIBRARY_NAME),$(NSS_DLLS)) $(NSS_EXTRA_DLLS)))
NSS_DIST_DLL_DEST := $(DIST)/bin
INSTALL_TARGETS += NSS_DIST_DLL
@ -317,10 +357,100 @@ NSS_SDK_LIB_FILES := \
NSS_SDK_LIB_DEST := $(DIST)/sdk/lib
INSTALL_TARGETS += NSS_SDK_LIB
ifdef MOZ_FOLD_LIBS
ifeq (WINNT,$(OS_TARGET))
SUFFIX = _s.$(LIB_SUFFIX)
else
SUFFIX = .$(LIB_SUFFIX)
endif
# Fold NSPR libs
EXTRA_DSO_LDOPTS += $(DEPTH)/nsprpub/pr/src/$(LIB_PREFIX)nspr4$(SUFFIX)
EXTRA_DSO_LDOPTS += $(DEPTH)/nsprpub/lib/ds/$(LIB_PREFIX)plds4$(SUFFIX)
EXTRA_DSO_LDOPTS += $(DEPTH)/nsprpub/lib/libc/src/$(LIB_PREFIX)plc4$(SUFFIX)
# Fold SQLite
EXTRA_DSO_LDOPTS += $(DEPTH)/db/sqlite3/src/$(LIB_PREFIX)mozsqlite3.$(LIB_SUFFIX)
# Add all static libraries for nss, smime, ssl and nssutil
SHARED_LIBRARY_LIBS = $(addprefix ../,$(NSS_STATIC_LIBS))
ifeq (WINNT,$(OS_TARGET))
# Create a .def file based on the various .def files for nss, smime, ssl and
# nssutil.
NSS_STATIC_LIBS_DEFS := $(wildcard $(addprefix $(srcdir)/../,$(NSS_STATIC_LIBS:.$(LIB_SUFFIX)=.def)))
DEFFILE = nss3.def
nss3.def: $(NSS_STATIC_LIBS_DEFS) $(DEPTH)/db/sqlite3/src/sqlite-processed.def
echo LIBRARY nss3$(DLL_SUFFIX) > $@.tmp
echo EXPORTS >> $@.tmp
grep -v -h -e ^LIBRARY -e ^EXPORTS -e ^\; $^ >> $@.tmp
mv $@.tmp $@
endif
# Force the linker to include everything from the static libraries.
EXPAND_LIBS_EXEC += --extract
else
$(NSS_DIST_DLL_FILES) $(NSS_SDK_LIB_FILES): libs-nss/lib
endif # MOZ_FOLD_LIBS
include $(topsrcdir)/config/rules.mk
ifdef MOZ_FOLD_LIBS
$(SHARED_LIBRARY): $(SHARED_LIBRARY_LIBS)
EXTRA_DSO_LDOPTS += $(REALTIME_LIBS)
ifdef IMPORT_LIB_SUFFIX
IMPORT_PREFIX = $(LIB_PREFIX)
IMPORT_SUFFIX = .$(IMPORT_LIB_SUFFIX)
else
IMPORT_PREFIX = $(DLL_PREFIX)
IMPORT_SUFFIX = $(DLL_SUFFIX)
endif
NSPR_IMPORT_LIBS = $(addprefix $(DIST)/lib/$(IMPORT_PREFIX),$(addsuffix $(IMPORT_SUFFIX),nspr4 plc4 plds4))
SQLITE_IMPORT_LIB = $(DIST)/lib/$(IMPORT_PREFIX)mozsqlite3$(IMPORT_SUFFIX)
# TODO: The following can be replaced by something simpler when bug 844884
# is fixed.
# Associate target files with the rules that build them.
$(DIST)/lib/$(LIB_PREFIX)crmf.$(LIB_SUFFIX): libs-nss/lib/crmf
$(DIST)/lib/$(DLL_PREFIX)freebl3$(DLL_SUFFIX): libs-nss/lib/freebl
$(DIST)/lib/$(DLL_PREFIX)nssckbi$(DLL_SUFFIX): libs-nss/lib/ckfw
$(DIST)/lib/$(DLL_PREFIX)softokn3$(DLL_SUFFIX): libs-nss/lib/softoken
$(DIST)/lib/$(DLL_PREFIX)nssdbm3$(DLL_SUFFIX): libs-nss/lib/softoken
$(foreach lib,$(NSS_STATIC_LIBS),$(eval ../$(lib): libs-$(patsubst %/,%,$(dir $(lib)))))
# Create fake import libraries for the folded libraries, so that linking
# against them works both for the NSS build system (see dependencies below)
# and for the rest of the mozilla build system.
$(NSPR_IMPORT_LIBS) \
$(SQLITE_IMPORT_LIB) \
$(DIST)/lib/$(IMPORT_PREFIX)nssutil3$(IMPORT_SUFFIX) \
$(DIST)/lib/$(IMPORT_PREFIX)ssl3$(IMPORT_SUFFIX) \
$(DIST)/lib/$(IMPORT_PREFIX)smime3$(IMPORT_SUFFIX): $(DIST)/lib/$(IMPORT_PREFIX)nss3$(IMPORT_SUFFIX)
ifeq (WINNT,$(OS_TARGET))
cp $< $@
else
ln -sf $< $@
endif
# Interdependencies between nss sub-directories, and dependencies on NSPR/SQLite
libs-nss/lib/ckfw: libs-nss/lib/nss/../base $(NSPR_IMPORT_LIBS)
libs-nss/lib/softoken: $(NSPR_IMPORT_LIBS) $(SQLITE_IMPORT_LIB)
libs-nss/lib/softoken: libs-nss/lib/freebl
ifndef NSS_DISABLE_DBM
libs-nss/lib/softoken: libs-dbm
endif
libs-nss/lib/softoken: $(DIST)/lib/$(IMPORT_PREFIX)nssutil3$(IMPORT_SUFFIX)
libs-nss/lib/freebl: $(DIST)/lib/$(IMPORT_PREFIX)nssutil3$(IMPORT_SUFFIX) $(NSPR_IMPORT_LIBS)
# For each directory where we build static libraries, force the NSS build system
# to only build static libraries.
$(addprefix libs-,$(NSS_STATIC_DIRS)): DEFAULT_GMAKE_FLAGS += SHARED_LIBRARY= IMPORT_LIBRARY=
endif # MOZ_FOLD_LIBS
DEFAULT_GMAKE_FLAGS += $(EXTRA_GMAKE_FLAGS)
$(addprefix libs-,$(NSS_DIRS)): libs-%:
@ -349,7 +479,17 @@ clean clobber clobber_all realclean distclean depend:: $(addprefix clean-,$(NSS_
NSS_CMD_TARGETS := $(addprefix libs-,$(filter-out nss/cmd/lib,$(filter nss/cmd/%,$(NSS_DIRS))))
libs:: $(NSS_CMD_TARGETS)
ifdef MOZ_FOLD_LIBS
$(NSS_CMD_TARGETS): $(addprefix $(DIST)/lib/$(IMPORT_PREFIX),$(addsuffix $(IMPORT_SUFFIX),$(NSS_LIBS)))
libs-nss/cmd/modutil: libs-nss/lib/jar
ifeq (WINNT,$(OS_TARGET))
libs-nss/cmd/modutil: libs-nss/lib/zlib
endif
$(NSS_CMD_TARGETS): libs-nss/cmd/lib
else
$(NSS_CMD_TARGETS): libs-nss/lib libs-nss/cmd/lib
endif # MOZ_FOLD_LIBS
ifndef NSS_DISABLE_DBM
libs-nss/lib: libs-dbm
endif

View File

@ -30,6 +30,6 @@ hacked-certdata.txt : $(srcdir)/../nss/lib/ckfw/builtins/certdata.txt
combined-certdata.txt : hacked-certdata.txt $(srcdir)/b2g-certdata.txt
cat $^ > $@
libs-nss/lib: combined-certdata.txt
libs-nss/lib libs-nss/lib/ckfw: combined-certdata.txt
DEFAULT_GMAKE_FLAGS += NSS_CERTDATA_TXT='$(CURDIR)/combined-certdata.txt'

27
security/build/nss.mk Normal file
View File

@ -0,0 +1,27 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/config.mk
dirs :=
define add_dirs
SHARED_LIBRARY_DIRS :=
include $(topsrcdir)/security/$(1)/config.mk
dirs += $$(addprefix $(1)/,$$(SHARED_LIBRARY_DIRS)) $(1)
endef
$(foreach dir,util nss ssl smime,$(eval $(call add_dirs,nss/lib/$(dir))))
libs :=
define add_lib
LIBRARY_NAME :=
include $(topsrcdir)/security/$(1)/manifest.mn
libs += $$(addprefix $(1)/,$(LIB_PREFIX)$$(LIBRARY_NAME).$(LIB_SUFFIX))
endef
$(foreach dir,$(dirs),$(eval $(call add_lib,$(dir))))
echo-variable-%:
@echo $($*)

View File

@ -70,7 +70,6 @@ JSSHELL_BINS = \
$(DIST)/bin/$(DLL_PREFIX)mozglue$(DLL_SUFFIX) \
$(NULL)
ifndef MOZ_NATIVE_NSPR
JSSHELL_BINS += $(DIST)/bin/$(DLL_PREFIX)nspr4$(DLL_SUFFIX)
ifeq ($(OS_ARCH),WINNT)
ifeq ($(_MSC_VER),1400)
JSSHELL_BINS += $(DIST)/bin/Microsoft.VC80.CRT.manifest
@ -87,10 +86,15 @@ ifeq ($(_MSC_VER),1700)
JSSHELL_BINS += $(DIST)/bin/msvcr110.dll
endif
else
ifdef MOZ_FOLD_LIBS
JSSHELL_BINS += $(DIST)/bin/$(DLL_PREFIX)nss3$(DLL_SUFFIX)
else
JSSHELL_BINS += \
$(DIST)/bin/$(DLL_PREFIX)nspr4$(DLL_SUFFIX) \
$(DIST)/bin/$(DLL_PREFIX)plds4$(DLL_SUFFIX) \
$(DIST)/bin/$(DLL_PREFIX)plc4$(DLL_SUFFIX) \
$(NULL)
endif # MOZ_FOLD_LIBS
endif
endif # MOZ_NATIVE_NSPR
MAKE_JSSHELL = $(ZIP) -9j $(PKG_JSSHELL) $(JSSHELL_BINS)
@ -515,6 +519,10 @@ endif
DEFINES += -DDLL_PREFIX=$(DLL_PREFIX) -DDLL_SUFFIX=$(DLL_SUFFIX) -DBIN_SUFFIX=$(BIN_SUFFIX)
ifdef MOZ_FOLD_LIBS
DEFINES += -DMOZ_FOLD_LIBS=1
endif
GARBAGE += $(DIST)/$(PACKAGE) $(PACKAGE)
# The following target stages files into two directories: one directory for

View File

@ -7,7 +7,6 @@ if CONFIG['LIBXUL_SDK']:
error('toolkit.mozbuild is not compatible with --enable-libxul-sdk=')
if not CONFIG['MOZ_NATIVE_NSPR']:
add_tier_dir('nspr', 'nsprpub', static=True)
add_tier_dir('nspr', 'config/nspr')
if not CONFIG['MOZ_NATIVE_SQLITE']: