From 43d1d7bd79476a048e32cb4d32a2ee68694398e2 Mon Sep 17 00:00:00 2001 From: "wtc%netscape.com" Date: Sun, 14 Oct 2001 02:33:18 +0000 Subject: [PATCH] Cleaned up the security/dbm makefiles and added security/dbm/config/config.mk, which defines the "autoconf" macros that mozilla's configure script defines. Modified files: manifest.mn include/Makefile src/Makefile src/config.mk tests/Makefile Added file: config/config.mk git-svn-id: svn://10.0.0.236/trunk@105382 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/security/dbm/config/config.mk | 58 ++++++++++++++++++++++++++ mozilla/security/dbm/include/Makefile | 10 ----- mozilla/security/dbm/manifest.mn | 3 +- mozilla/security/dbm/src/Makefile | 15 ++----- mozilla/security/dbm/src/config.mk | 3 +- mozilla/security/dbm/tests/Makefile | 60 +-------------------------- 6 files changed, 65 insertions(+), 84 deletions(-) create mode 100644 mozilla/security/dbm/config/config.mk diff --git a/mozilla/security/dbm/config/config.mk b/mozilla/security/dbm/config/config.mk new file mode 100644 index 00000000000..15ac9588bec --- /dev/null +++ b/mozilla/security/dbm/config/config.mk @@ -0,0 +1,58 @@ +#! gmake +# +# 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 the Netscape security libraries. +# +# The Initial Developer of the Original Code is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1994-2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# + +# +# These macros are defined by mozilla's configure script. +# We define them manually here. +# + +DEFINES += -DSTDC_HEADERS -DHAVE_STRERROR + +ifneq (,$(filter-out OSF1,$(OS_ARCH))) +DEFINES += -DHAVE_SNPRINTF +endif + +ifeq (,$(filter-out IRIX Linux,$(OS_ARCH))) +DEFINES += -DHAVE_SYS_CDEFS_H +endif + +ifeq (,$(filter-out DGUX NCR ReliantUNIX SCO_SV SCOOS UNIXWARE,$(OS_ARCH))) +DEFINES += -DHAVE_SYS_BYTEORDER_H +endif + +# +# None of the platforms that we are interested in need to +# define HAVE_COMPAT_H and HAVE_MEMORY_H. +# SunOS 4.1.3 needs to define HAVE_COMPAT_H. +# diff --git a/mozilla/security/dbm/include/Makefile b/mozilla/security/dbm/include/Makefile index 4d34d883291..ba4dd8ddf37 100644 --- a/mozilla/security/dbm/include/Makefile +++ b/mozilla/security/dbm/include/Makefile @@ -72,15 +72,5 @@ include $(CORE_DEPTH)/coreconf/rules.mk # (7) Execute "local" rules. (OPTIONAL). # ####################################################################### -DBM_SRCS = $(EXPORTS) $(PRIVATE_EXPORTS) watcomfx.h -export:: $(DBM_SRCS) -libs:: $(DBM_SRCS) - -program:: $(DBM_SRCS) - -private_export:: $(DBM_SRCS) - -echo:: - echo "$(DBM_SRCS)" diff --git a/mozilla/security/dbm/manifest.mn b/mozilla/security/dbm/manifest.mn index 4cfffae4370..11f4f4237c1 100644 --- a/mozilla/security/dbm/manifest.mn +++ b/mozilla/security/dbm/manifest.mn @@ -36,8 +36,7 @@ CORE_DEPTH = .. MODULE = dbm -#IMPORTS = nspr20/v3.5 -IMPORTS = nspr20/v4.0 +IMPORTS = nspr20/v4.1.2 RELEASE = dbm diff --git a/mozilla/security/dbm/src/Makefile b/mozilla/security/dbm/src/Makefile index b41b4167143..8fce983941f 100644 --- a/mozilla/security/dbm/src/Makefile +++ b/mozilla/security/dbm/src/Makefile @@ -48,7 +48,7 @@ include $(CORE_DEPTH)/coreconf/config.mk # (3) Include "component" configuration information. (OPTIONAL) # ####################################################################### - +include $(CORE_DEPTH)/dbm/config/config.mk ####################################################################### # (4) Include "local" platform-dependent assignments (OPTIONAL). # @@ -66,20 +66,11 @@ include $(CORE_DEPTH)/coreconf/rules.mk # (6) Execute "component" rules. (OPTIONAL) # ####################################################################### + + ####################################################################### # (7) Execute "local" rules. (OPTIONAL). # ####################################################################### -DBM_SRCS = $(CSRCS) -export:: $(DBM_SRCS) - -libs:: $(DBM_SRCS) - -program:: $(DBM_SRCS) - -private_export:: $(DBM_SRCS) - -echo:: - echo "$(DBM_SRCS)" diff --git a/mozilla/security/dbm/src/config.mk b/mozilla/security/dbm/src/config.mk index f6863d966d4..32baf173743 100644 --- a/mozilla/security/dbm/src/config.mk +++ b/mozilla/security/dbm/src/config.mk @@ -32,9 +32,8 @@ # GPL. # -DEFINES += -DMEMMOVE -D__DBINTERFACE_PRIVATE $(SECURITY_FLAG) -DNSPR20=1 +DEFINES += -DMEMMOVE -D__DBINTERFACE_PRIVATE $(SECURITY_FLAG) -INCLUDES += -I../include INCLUDES += -I$(CORE_DEPTH)/../dbm/include # diff --git a/mozilla/security/dbm/tests/Makefile b/mozilla/security/dbm/tests/Makefile index c095d87c72f..5e0f96eb520 100644 --- a/mozilla/security/dbm/tests/Makefile +++ b/mozilla/security/dbm/tests/Makefile @@ -44,58 +44,14 @@ PROGRAM = lots include $(DEPTH)/coreconf/config.mk +include $(DEPTH)/dbm/config/config.mk + ifeq ($(OS_ARCH),WINNT) -DEFINES += -DSTDARG -DSTDC_HEADERS LIBDBM = ../src/$(PLATFORM)/dbm$(STATIC_LIB_SUFFIX) else LIBDBM = ../src/$(PLATFORM)/libdbm$(STATIC_LIB_SUFFIX) endif -ifeq ($(OS_ARCH),AIX) -CFLAGS += -DSTDARG -endif - -ifeq ($(OS_ARCH),BSD_386) -CFLAGS += -g -I../../../include -DXP_UNIX -g -DBSDI -DHAVE_STRERROR -D__386BSD__ -DDEBUG -DMEMMOVE -D__DBINTERFACE_PRIVATE -endif - -ifeq ($(OS_ARCH),FreeBSD) -CFLAGS += -DSTDARG -endif - -ifeq ($(OS_ARCH),HP-UX) -CFLAGS += -DSTDARG -endif - -ifeq ($(OS_ARCH),IRIX) -CFLAGS += -g -I../../../include -DDEBUG -DSTDARG -endif - -ifeq ($(OS_ARCH),OSF1) -CFLAGS += -DSTDARG -endif - -ifeq ($(OS_ARCH),Linux) -CFLAGS += -DSTDARG -endif - -ifeq ($(OS_ARCH),NCR) -CFLAGS += -DSTDARG -endif - -ifeq ($(OS_ARCH),SCO_SV) -CFLAGS += -DSTDARG -endif - -ifeq ($(OS_ARCH),SunOS) -CFLAGS += -g -I../../../include -D_sun_ -endif - -ifeq ($(OS_ARCH),UNIXWARE) -CFLAGS += -DSTDARG -endif - -INCLUDES += -I../include INCLUDES += -I$(CORE_DEPTH)/../dbm/include LDFLAGS = $(LDOPTS) $(LIBDBM) @@ -111,15 +67,3 @@ crash: crash.o $(MYLIBS) crash.pure: crash.o $(MYLIBS) purify $(CC) -o crash.pure $(CFLAGS) $^ - - -DBM_SRCS = $(CSRCS) - -export:: $(DBM_SRCS) - -libs:: $(DBM_SRCS) - -program:: $(DBM_SRCS) - -private_export:: $(DBM_SRCS) -