Skip to content

Commit

Permalink
Bug 464088: Option to build NSS without dbm (handy for WinCE), r=rrelyea
Browse files Browse the repository at this point in the history
  • Loading branch information
nelson%bolyard.com committed Dec 2, 2008
1 parent 9156a9f commit 25bbdfc
Show file tree
Hide file tree
Showing 16 changed files with 36 additions and 67 deletions.
53 changes: 0 additions & 53 deletions dbm/Makefile.in
@@ -1,53 +0,0 @@
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****

DEPTH = ..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@

include $(DEPTH)/config/autoconf.mk

MODULE = dbm
DIRS = include src

ifdef ENABLE_TESTS
DIRS += tests
endif

include $(topsrcdir)/config/rules.mk

4 changes: 4 additions & 0 deletions security/coreconf/config.mk
Expand Up @@ -190,6 +190,10 @@ ifdef BUILD_LIBPKIX_TESTS
DEFINES += -DBUILD_LIBPKIX_TESTS
endif

ifdef NSS_DISABLE_DBM
DEFINES += -DNSS_DISABLE_DBM
endif

# Avoid building object leak test code for optimized library
ifndef BUILD_OPT
ifdef PKIX_OBJECT_LEAK_TEST
Expand Down
4 changes: 4 additions & 0 deletions security/dbm/Makefile
Expand Up @@ -42,6 +42,10 @@

include manifest.mn

ifdef NSS_DISABLE_DBM
DIRS = dummy
endif

#######################################################################
# (2) Include "global" configuration information. (OPTIONAL) #
#######################################################################
Expand Down
4 changes: 4 additions & 0 deletions security/nss/Makefile
Expand Up @@ -147,7 +147,11 @@ clobber_nspr: $(NSPR_CONFIG_STATUS)
cd $(CORE_DEPTH)/../nsprpub/$(OBJDIR_NAME) ; $(MAKE) clobber

build_dbm:
ifndef NSS_DISABLE_DBM
cd $(CORE_DEPTH)/dbm ; $(MAKE) export libs
else
echo "skipping the build of DBM"
endif

clobber_dbm:
cd $(CORE_DEPTH)/dbm ; $(MAKE) clobber
Expand Down
10 changes: 8 additions & 2 deletions security/nss/cmd/platlibs.mk
Expand Up @@ -74,6 +74,12 @@ endif

SQLITE=-lsqlite3

ifdef NSS_DISABLE_DBM
DBMLIB = $(NULL)
else
DBMLIB = $(DIST)/lib/$(LIB_PREFIX)dbm.$(LIB_SUFFIX)
endif

ifdef USE_STATIC_LIBS

# can't do this in manifest.mn because OS_ARCH isn't defined there.
Expand Down Expand Up @@ -121,7 +127,7 @@ EXTRA_LIBS += \
$(DIST)/lib/$(LIB_PREFIX)nssdev.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)nssb.$(LIB_SUFFIX) \
$(PKIXLIB) \
$(DIST)/lib/$(LIB_PREFIX)dbm.$(LIB_SUFFIX) \
$(DBMLIB) \
$(DIST)/lib/$(LIB_PREFIX)sqlite3.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)nssutil3.$(LIB_SUFFIX) \
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.$(LIB_SUFFIX) \
Expand Down Expand Up @@ -180,7 +186,7 @@ EXTRA_LIBS += \
$(DIST)/lib/$(LIB_PREFIX)nssdev.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)nssb.$(LIB_SUFFIX) \
$(CRYPTOLIB) \
$(DIST)/lib/$(LIB_PREFIX)dbm.$(LIB_SUFFIX) \
$(DBMLIB) \
$(PKIXLIB) \
$(DIST)/lib/$(LIB_PREFIX)nss.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)pk11wrap.$(LIB_SUFFIX) \
Expand Down
1 change: 0 additions & 1 deletion security/nss/lib/certdb/certdb.c
Expand Up @@ -52,7 +52,6 @@
#include "genname.h"
#include "keyhi.h"
#include "secitem.h"
#include "mcom_db.h"
#include "certdb.h"
#include "prprf.h"
#include "sechash.h"
Expand Down
1 change: 0 additions & 1 deletion security/nss/lib/certdb/genname.c
Expand Up @@ -38,7 +38,6 @@
#include "seccomon.h"
#include "secitem.h"
#include "secoidt.h"
#include "mcom_db.h"
#include "secasn1.h"
#include "secder.h"
#include "certt.h"
Expand Down
1 change: 0 additions & 1 deletion security/nss/lib/certdb/stanpcertdb.c
Expand Up @@ -37,7 +37,6 @@
#include "prtime.h"

#include "cert.h"
#include "mcom_db.h"
#include "certdb.h"
#include "secitem.h"
#include "secder.h"
Expand Down
1 change: 0 additions & 1 deletion security/nss/lib/certdb/xauthkid.c
Expand Up @@ -40,7 +40,6 @@
*/

#include "prtypes.h"
#include "mcom_db.h"
#include "seccomon.h"
#include "secdert.h"
#include "secoidt.h"
Expand Down
1 change: 0 additions & 1 deletion security/nss/lib/certdb/xbsconst.c
Expand Up @@ -39,7 +39,6 @@
*/

#include "prtypes.h"
#include "mcom_db.h"
#include "seccomon.h"
#include "secdert.h"
#include "secoidt.h"
Expand Down
1 change: 0 additions & 1 deletion security/nss/lib/certdb/xconst.c
Expand Up @@ -39,7 +39,6 @@
*/

#include "prtypes.h"
#include "mcom_db.h"
#include "seccomon.h"
#include "secdert.h"
#include "secoidt.h"
Expand Down
1 change: 0 additions & 1 deletion security/nss/lib/pk11wrap/secmodi.h
Expand Up @@ -41,7 +41,6 @@
#define _SECMODI_H_ 1
#include "pkcs11.h"
#include "nssilock.h"
#include "mcom_db.h"
#include "secoidt.h"
#include "secdert.h"
#include "certt.h"
Expand Down
4 changes: 3 additions & 1 deletion security/nss/lib/softoken/Makefile
Expand Up @@ -70,7 +70,9 @@ include $(CORE_DEPTH)/coreconf/rules.mk
# (6) Execute "component" rules. (OPTIONAL) #
#######################################################################


ifdef NSS_DISABLE_DBM
DIRS= dummy
endif

#######################################################################
# (7) Execute "local" rules. (OPTIONAL). #
Expand Down
9 changes: 5 additions & 4 deletions security/nss/lib/softoken/legacydb/config.mk
Expand Up @@ -43,10 +43,11 @@ ifdef MOZILLA_SECURITY_BUILD
CRYPTODIR=../crypto
endif

EXTRA_LIBS += \
$(CRYPTOLIB) \
$(DIST)/lib/$(LIB_PREFIX)dbm.$(LIB_SUFFIX) \
$(NULL)
EXTRA_LIBS += $(CRYPTOLIB)

ifndef NSS_DISABLE_DBM
EXTRA_LIBS += $(DIST)/lib/$(LIB_PREFIX)dbm.$(LIB_SUFFIX)
endif

# can't do this in manifest.mn because OS_TARGET isn't defined there.
ifeq (,$(filter-out WIN%,$(OS_TARGET)))
Expand Down
4 changes: 4 additions & 0 deletions security/nss/lib/softoken/pkcs11.c
Expand Up @@ -2392,7 +2392,11 @@ NSC_ModuleDBFunc(unsigned long function,char *parameters, void *args)
char *secmod = NULL;
char *appName = NULL;
char *filename = NULL;
#ifdef NSS_DISABLE_DBM
SDBType dbType = SDB_SQL;
#else
SDBType dbType = SDB_LEGACY;
#endif
PRBool rw;
static char *success="Success";
char **rvstr = NULL;
Expand Down
4 changes: 4 additions & 0 deletions security/nss/lib/softoken/sftkpars.c
Expand Up @@ -546,7 +546,11 @@ const char *
sftk_EvaluateConfigDir(const char *configdir, SDBType *dbType, char **appName)
{
*appName = NULL;
#ifdef NSS_DISABLE_DBM
*dbType = SDB_SQL;
#else
*dbType = SDB_LEGACY;
#endif
if (PORT_Strncmp(configdir, MULTIACCESS, sizeof(MULTIACCESS)-1) == 0) {
char *cdir;
*dbType = SDB_MULTIACCESS;
Expand Down

0 comments on commit 25bbdfc

Please sign in to comment.