summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornelsonb%netscape.com <devnull@localhost>2002-02-15 22:54:08 +0000
committernelsonb%netscape.com <devnull@localhost>2002-02-15 22:54:08 +0000
commit738456c67ff3fb409226a12e51fb0ca563e3d909 (patch)
treedfbe428591494ceaf2ae25c831889dc85656ad31
parent526d8ca9a9340281ac8b28404fbc6ddf692f4f2b (diff)
downloadnss-hg-738456c67ff3fb409226a12e51fb0ca563e3d909.tar.gz
Change most coreconf and NSS makefiles to use OS_TARGET (which can
be overridden via an environment variable) rather than OS_ARCH. This is a precursor to more flexibility in cross-platform builds. Bug 104541.
-rw-r--r--security/coreconf/AIX4.1.mk9
-rw-r--r--security/coreconf/Linux.mk5
-rw-r--r--security/coreconf/OS2.mk21
-rwxr-xr-xsecurity/coreconf/OpenVMS.mk5
-rw-r--r--security/coreconf/WIN16.mk86
-rw-r--r--security/coreconf/WIN32.mk88
-rw-r--r--security/coreconf/arch.mk179
-rw-r--r--security/coreconf/command.mk5
-rw-r--r--security/coreconf/config.mk59
-rw-r--r--security/coreconf/headers.mk6
-rw-r--r--security/coreconf/jdk.mk12
-rw-r--r--security/coreconf/location.mk4
-rw-r--r--security/coreconf/module.mk11
-rw-r--r--security/coreconf/nsinstall/Makefile2
-rw-r--r--security/coreconf/prefix.mk19
-rw-r--r--security/coreconf/rules.mk37
-rw-r--r--security/coreconf/ruleset.mk183
-rw-r--r--security/coreconf/source.mk47
-rw-r--r--security/coreconf/suffix.mk60
-rw-r--r--security/coreconf/tree.mk78
-rw-r--r--security/coreconf/version.mk28
-rw-r--r--security/nss/Makefile10
-rw-r--r--security/nss/cmd/Makefile2
-rw-r--r--security/nss/cmd/crmf-cgi/Makefile2
-rw-r--r--security/nss/cmd/crmftest/Makefile8
-rw-r--r--security/nss/cmd/dbtest/Makefile2
-rw-r--r--security/nss/cmd/modutil/config.mk14
-rw-r--r--security/nss/cmd/rsaperf/Makefile2
-rw-r--r--security/nss/cmd/tstclnt/Makefile2
-rw-r--r--security/nss/cmd/zlib/config.mk11
-rw-r--r--security/nss/lib/ckfw/builtins/Makefile8
-rw-r--r--security/nss/lib/ckfw/builtins/config.mk8
-rw-r--r--security/nss/lib/fortcrypt/Makefile14
-rw-r--r--security/nss/lib/fortcrypt/swfort/pkcs11/Makefile10
-rw-r--r--security/nss/lib/freebl/Makefile20
-rw-r--r--security/nss/lib/freebl/config.mk4
-rw-r--r--security/nss/lib/nss/config.mk4
-rw-r--r--security/nss/lib/pk11wrap/Makefile4
-rw-r--r--security/nss/lib/pki/config.mk24
-rw-r--r--security/nss/lib/smime/config.mk12
-rw-r--r--security/nss/lib/softoken/Makefile4
-rw-r--r--security/nss/lib/softoken/config.mk16
-rw-r--r--security/nss/lib/ssl/Makefile4
-rw-r--r--security/nss/lib/ssl/config.mk12
-rw-r--r--security/nss/lib/util/Makefile8
45 files changed, 622 insertions, 527 deletions
diff --git a/security/coreconf/AIX4.1.mk b/security/coreconf/AIX4.1.mk
index ba93b4ce2..115ee8dc8 100644
--- a/security/coreconf/AIX4.1.mk
+++ b/security/coreconf/AIX4.1.mk
@@ -44,3 +44,12 @@ AIX_LINK_OPTS += -bnso -berok
DLL_SUFFIX = a
OS_LIBS += -lsvld
+
+# override default value set in suffix.mk, for AIX 4.1 only
+DYNAMIC_LIB_EXTENSION = _shr
+
+# override default value in ruleset.mk
+ifdef LIBRARY_NAME
+ SHARED_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION)_shr$(JDK_DEBUG_SUFFIX).a
+endif
+
diff --git a/security/coreconf/Linux.mk b/security/coreconf/Linux.mk
index 3267913aa..5c346e037 100644
--- a/security/coreconf/Linux.mk
+++ b/security/coreconf/Linux.mk
@@ -123,3 +123,8 @@ DSO_LDFLAGS =
# INCLUDES += -I/usr/include -Y/usr/include/linux
G++INCLUDES = -I/usr/include/g++
+
+#
+# Always set CPU_TAG on Linux, OpenVMS, WINCE.
+#
+CPU_TAG = _$(CPU_ARCH)
diff --git a/security/coreconf/OS2.mk b/security/coreconf/OS2.mk
index 735ed4986..361addd90 100644
--- a/security/coreconf/OS2.mk
+++ b/security/coreconf/OS2.mk
@@ -224,3 +224,24 @@ DEFINES += -DXP_OS2
define MAKE_OBJDIR
if test ! -d $(@D); then rm -rf $(@D); $(NSINSTALL) -D $(@D); fi
endef
+
+#
+# override the definition of DLL_PREFIX in prefix.mk
+#
+
+ifndef DLL_PREFIX
+ DLL_PREFIX = $(NULL)
+endif
+
+#
+# override the TARGETS defined in ruleset.mk, adding IMPORT_LIBRARY
+#
+ifndef TARGETS
+ TARGETS = $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(PROGRAM)
+endif
+
+
+ifdef LIBRARY_NAME
+ IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)$(JDK_DEBUG_SUFFIX).lib
+endif
+
diff --git a/security/coreconf/OpenVMS.mk b/security/coreconf/OpenVMS.mk
index f7dcd7aa8..8e9813b32 100755
--- a/security/coreconf/OpenVMS.mk
+++ b/security/coreconf/OpenVMS.mk
@@ -60,3 +60,8 @@ endif
# Change PROCESS to put the mapfile in the correct format for this platform
PROCESS_MAP_FILE = copy $(LIBRARY_NAME).def $@
+
+#
+# Always set CPU_TAG on Linux, OpenVMS, WINCE.
+#
+CPU_TAG = _$(CPU_ARCH)
diff --git a/security/coreconf/WIN16.mk b/security/coreconf/WIN16.mk
index fa428de25..00121150c 100644
--- a/security/coreconf/WIN16.mk
+++ b/security/coreconf/WIN16.mk
@@ -121,3 +121,89 @@ PROCESS_MAP_FILE = copy $(LIBRARY_NAME).def $@
#
OS_CFLAGS += -d_WINDOWS -d_MSC_VER=700
+
+#
+# override the definitions of RELEASE_TREE found in tree.mk
+#
+ifndef RELEASE_TREE
+ ifdef BUILD_SHIP
+ ifdef USE_SHIPS
+ RELEASE_TREE = $(NTBUILD_SHIP)
+ else
+ RELEASE_TREE = //redbuild/components
+ endif
+ else
+ RELEASE_TREE = //redbuild/components
+ endif
+endif
+
+#
+# override the definitions of LIB_PREFIX and DLL_PREFIX in prefix.mk
+#
+ifndef LIB_PREFIX
+ LIB_PREFIX = $(NULL)
+endif
+
+ifndef DLL_PREFIX
+ DLL_PREFIX = $(NULL)
+endif
+
+#
+# override the definitions of various _SUFFIX symbols in suffix.mk
+#
+
+#
+# Object suffixes
+#
+ifndef OBJ_SUFFIX
+ OBJ_SUFFIX = .obj
+endif
+
+#
+# Assembler source suffixes
+#
+ifndef ASM_SUFFIX
+ ASM_SUFFIX = .asm
+endif
+
+#
+# Library suffixes
+#
+ifndef IMPORT_LIB_SUFFIX
+ IMPORT_LIB_SUFFIX = .$(LIB_SUFFIX)
+endif
+
+ifndef DYNAMIC_LIB_SUFFIX_FOR_LINKING
+ DYNAMIC_LIB_SUFFIX_FOR_LINKING = $(IMPORT_LIB_SUFFIX)
+endif
+
+#
+# Program suffixes
+#
+ifndef PROG_SUFFIX
+ PROG_SUFFIX = .exe
+endif
+
+#
+# When the processor is NOT 386-based on Windows NT, override the
+# value of $(CPU_TAG). For WinNT, 95, 16, not CE.
+#
+ifneq ($(CPU_ARCH),x386)
+ CPU_TAG = _$(CPU_ARCH)
+endif
+
+#
+# override ruleset.mk, removing the "lib" prefix for library names, and
+# adding the "32" after the LIBRARY_VERSION.
+#
+ifdef LIBRARY_NAME
+ SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)32$(JDK_DEBUG_SUFFIX).dll
+ IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)32$(JDK_DEBUG_SUFFIX).lib
+endif
+
+#
+# override the TARGETS defined in ruleset.mk, adding IMPORT_LIBRARY
+#
+ifndef TARGETS
+ TARGETS = $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(PROGRAM)
+endif
diff --git a/security/coreconf/WIN32.mk b/security/coreconf/WIN32.mk
index ed8cd4bc2..1c438cf64 100644
--- a/security/coreconf/WIN32.mk
+++ b/security/coreconf/WIN32.mk
@@ -108,3 +108,91 @@ DEFINES += -D_WINDOWS
AS = ml.exe
ASFLAGS = -Cp -Sn -Zi -coff $(INCLUDES)
+#
+# override the definitions of RELEASE_TREE found in tree.mk
+#
+ifndef RELEASE_TREE
+ ifdef BUILD_SHIP
+ ifdef USE_SHIPS
+ RELEASE_TREE = $(NTBUILD_SHIP)
+ else
+ RELEASE_TREE = //redbuild/components
+ endif
+ else
+ RELEASE_TREE = //redbuild/components
+ endif
+endif
+
+#
+# override the definitions of LIB_PREFIX and DLL_PREFIX in prefix.mk
+#
+
+ifndef LIB_PREFIX
+ LIB_PREFIX = $(NULL)
+endif
+
+ifndef DLL_PREFIX
+ DLL_PREFIX = $(NULL)
+endif
+
+#
+# override the definitions of various _SUFFIX symbols in suffix.mk
+#
+
+#
+# Object suffixes
+#
+ifndef OBJ_SUFFIX
+ OBJ_SUFFIX = .obj
+endif
+
+#
+# Assembler source suffixes
+#
+ifndef ASM_SUFFIX
+ ASM_SUFFIX = .asm
+endif
+
+#
+# Library suffixes
+#
+
+ifndef IMPORT_LIB_SUFFIX
+ IMPORT_LIB_SUFFIX = .$(LIB_SUFFIX)
+endif
+
+ifndef DYNAMIC_LIB_SUFFIX_FOR_LINKING
+ DYNAMIC_LIB_SUFFIX_FOR_LINKING = $(IMPORT_LIB_SUFFIX)
+endif
+
+#
+# Program suffixes
+#
+ifndef PROG_SUFFIX
+ PROG_SUFFIX = .exe
+endif
+
+#
+# When the processor is NOT 386-based on Windows NT, override the
+# value of $(CPU_TAG). For WinNT, 95, 16, not CE.
+#
+ifneq ($(CPU_ARCH),x386)
+ CPU_TAG = _$(CPU_ARCH)
+endif
+
+#
+# override ruleset.mk, removing the "lib" prefix for library names, and
+# adding the "32" after the LIBRARY_VERSION.
+#
+ifdef LIBRARY_NAME
+ SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)32$(JDK_DEBUG_SUFFIX).dll
+ IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)32$(JDK_DEBUG_SUFFIX).lib
+endif
+
+#
+# override the TARGETS defined in ruleset.mk, adding IMPORT_LIBRARY
+#
+ifndef TARGETS
+ TARGETS = $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(PROGRAM)
+endif
+
diff --git a/security/coreconf/arch.mk b/security/coreconf/arch.mk
index f9878104d..b5c4f7d0a 100644
--- a/security/coreconf/arch.mk
+++ b/security/coreconf/arch.mk
@@ -33,6 +33,16 @@
#######################################################################
# Master "Core Components" macros for getting the OS architecture #
+# defines these symbols:
+# 64BIT_TAG
+# OS_ARCH (from uname -r)
+# OS_TEST (from uname -m)
+# OS_RELEASE (from uname -v and/or -r)
+# OS_TARGET User defined, or set to OS_ARCH
+# CPU_ARCH (from unmame -m or -p, ONLY on WINNT)
+# OS_CONFIG OS_TARGET + OS_RELEASE
+# OBJDIR_TAG
+# OBJDIR_NAME
#######################################################################
#
@@ -53,9 +63,9 @@ OS_ARCH := $(subst /,_,$(shell uname -s))
OS_TEST := $(shell uname -m)
ifeq ($(OS_TEST),i86pc)
- OS_RELEASE := $(shell uname -r)_$(OS_TEST)
+ OS_RELEASE := $(shell uname -r)_$(OS_TEST)
else
- OS_RELEASE := $(shell uname -r)
+ OS_RELEASE := $(shell uname -r)
endif
#
@@ -63,7 +73,7 @@ endif
#
ifeq ($(OS_ARCH),IRIX64)
- OS_ARCH = IRIX
+ OS_ARCH = IRIX
endif
#
@@ -71,7 +81,7 @@ endif
#
ifeq ($(OS_ARCH),BSD_386)
- OS_ARCH = BSD_OS
+ OS_ARCH = BSD_OS
endif
#
@@ -79,23 +89,23 @@ endif
#
ifeq ($(OS_ARCH),UNIX_SV)
- ifneq ($(findstring NCR, $(shell grep NCR /etc/bcheckrc | head -1 )),)
- OS_ARCH = NCR
- else
- # Make UnixWare something human readable
- OS_ARCH = UNIXWARE
- endif
-
- # Get the OS release number, not 4.2
- OS_RELEASE := $(shell uname -v)
+ ifneq ($(findstring NCR, $(shell grep NCR /etc/bcheckrc | head -1 )),)
+ OS_ARCH = NCR
+ else
+ # Make UnixWare something human readable
+ OS_ARCH = UNIXWARE
+ endif
+
+ # Get the OS release number, not 4.2
+ OS_RELEASE := $(shell uname -v)
endif
ifeq ($(OS_ARCH),UNIX_System_V)
- OS_ARCH = NEC
+ OS_ARCH = NEC
endif
ifeq ($(OS_ARCH),AIX)
- OS_RELEASE := $(shell uname -v).$(shell uname -r)
+ OS_RELEASE := $(shell uname -v).$(shell uname -r)
endif
#
@@ -103,13 +113,13 @@ endif
#
ifeq ($(OS_ARCH)$(OS_RELEASE),OSF1V4.0)
- OS_VERSION := $(shell uname -v)
- ifeq ($(OS_VERSION),564)
- OS_RELEASE := V4.0B
- endif
- ifeq ($(OS_VERSION),878)
- OS_RELEASE := V4.0D
- endif
+ OS_VERSION := $(shell uname -v)
+ ifeq ($(OS_VERSION),564)
+ OS_RELEASE := V4.0B
+ endif
+ ifeq ($(OS_VERSION),878)
+ OS_RELEASE := V4.0D
+ endif
endif
#
@@ -117,13 +127,13 @@ endif
#
ifeq ($(OS_ARCH),ReliantUNIX-N)
- OS_ARCH = ReliantUNIX
- OS_RELEASE = 5.4
+ OS_ARCH = ReliantUNIX
+ OS_RELEASE = 5.4
endif
ifeq ($(OS_ARCH),SINIX-N)
- OS_ARCH = ReliantUNIX
- OS_RELEASE = 5.4
+ OS_ARCH = ReliantUNIX
+ OS_RELEASE = 5.4
endif
#
@@ -131,24 +141,24 @@ endif
#
ifeq (,$(filter-out Linux FreeBSD,$(OS_ARCH)))
-OS_RELEASE := $(shell echo $(OS_RELEASE) | sed 's/-.*//')
+ OS_RELEASE := $(shell echo $(OS_RELEASE) | sed 's/-.*//')
endif
ifeq ($(OS_ARCH),Linux)
- OS_RELEASE := $(basename $(OS_RELEASE))
+ OS_RELEASE := $(basename $(OS_RELEASE))
endif
#
# For OS/2
#
ifeq ($(OS_ARCH),OS_2)
- OS_ARCH = OS2
- OS_RELEASE := $(shell uname -v)
+ OS_ARCH = OS2
+ OS_RELEASE := $(shell uname -v)
endif
ifneq (,$(findstring OpenVMS,$(OS_ARCH)))
- OS_ARCH = OpenVMS
- OS_RELEASE := $(shell uname -v)
+ OS_ARCH = OpenVMS
+ OS_RELEASE := $(shell uname -v)
endif
#######################################################################
@@ -177,12 +187,12 @@ endif
# It also accomodates for MKS's and Cygwin's uname.exe.
#
ifeq ($(OS_ARCH),WIN95)
- OS_ARCH = WINNT
- OS_TARGET = WIN95
+ OS_ARCH = WINNT
+ OS_TARGET = WIN95
endif
ifeq ($(OS_ARCH),Windows_95)
- OS_ARCH = Windows_NT
- OS_TARGET = WIN95
+ OS_ARCH = Windows_NT
+ OS_TARGET = WIN95
endif
ifeq ($(OS_ARCH),CYGWIN_95-4.0)
OS_ARCH = CYGWIN_NT-4.0
@@ -194,16 +204,17 @@ ifeq ($(OS_ARCH),CYGWIN_98-4.10)
endif
#
-# On WIN32, we also define the variable CPU_ARCH.
+# On WIN32, we also define the variable CPU_ARCH, if it isn't already.
#
-
-ifeq ($(OS_ARCH), WINNT)
+ifndef CPU_ARCH
+ ifeq ($(OS_ARCH), WINNT)
CPU_ARCH := $(shell uname -p)
ifeq ($(CPU_ARCH),I386)
- CPU_ARCH = x386
+ CPU_ARCH = x386
endif
-else
-#
+ endif
+endif
+
# If uname -s returns "Windows_NT", we assume that we are using
# the uname.exe in MKS toolkit.
#
@@ -212,48 +223,55 @@ else
# Moreover, it doesn't have the -p option, so we need to use uname -m.
#
ifeq ($(OS_ARCH), Windows_NT)
- OS_ARCH = WINNT
- OS_MINOR_RELEASE := $(shell uname -v)
- ifeq ($(OS_MINOR_RELEASE),00)
- OS_MINOR_RELEASE = 0
- endif
- OS_RELEASE := $(OS_RELEASE).$(OS_MINOR_RELEASE)
+ OS_ARCH = WINNT
+ OS_MINOR_RELEASE := $(shell uname -v)
+ ifeq ($(OS_MINOR_RELEASE),00)
+ OS_MINOR_RELEASE = 0
+ endif
+ OS_RELEASE := $(OS_RELEASE).$(OS_MINOR_RELEASE)
+ ifndef CPU_ARCH
CPU_ARCH := $(shell uname -m)
#
# MKS's uname -m returns "586" on a Pentium machine.
#
ifneq (,$(findstring 86,$(CPU_ARCH)))
- CPU_ARCH = x386
+ CPU_ARCH = x386
endif
+ endif
endif
#
# If uname -s returns "CYGWIN_NT-4.0", we assume that we are using
# the uname.exe in the Cygwin tools.
#
ifeq (CYGWIN_NT,$(findstring CYGWIN_NT,$(OS_ARCH)))
- OS_RELEASE := $(patsubst CYGWIN_NT-%,%,$(OS_ARCH))
- OS_ARCH = WINNT
+ OS_RELEASE := $(patsubst CYGWIN_NT-%,%,$(OS_ARCH))
+ OS_ARCH = WINNT
+ ifndef CPU_ARCH
CPU_ARCH := $(shell uname -m)
#
# Cygwin's uname -m returns "i686" on a Pentium Pro machine.
#
ifneq (,$(findstring 86,$(CPU_ARCH)))
- CPU_ARCH = x86
+ CPU_ARCH = x86
endif
-endif
+ endif
endif
ifndef OS_TARGET
- OS_TARGET = $(OS_ARCH)
+ OS_TARGET = $(OS_ARCH)
endif
ifeq ($(OS_TARGET), WIN95)
- OS_RELEASE = 4.0
+ OS_RELEASE = 4.0
endif
ifeq ($(OS_TARGET), WIN16)
- OS_RELEASE =
-# OS_RELEASE = _3.11
+ OS_RELEASE =
+# OS_RELEASE = _3.11
+endif
+
+ifdef OS_TARGET_RELEASE
+ OS_RELEASE = $(OS_TARGET_RELEASE)
endif
#
@@ -268,25 +286,25 @@ OS_CONFIG = $(OS_TARGET)$(OS_RELEASE)
#
ifdef BUILD_OPT
+ ifeq ($(OS_TARGET),WIN16)
+ OBJDIR_TAG = _O
+ else
+ OBJDIR_TAG = $(64BIT_TAG)_OPT
+ endif
+else
+ ifdef BUILD_IDG
ifeq ($(OS_TARGET),WIN16)
- OBJDIR_TAG = _O
+ OBJDIR_TAG = _I
else
- OBJDIR_TAG = $(64BIT_TAG)_OPT
+ OBJDIR_TAG = $(64BIT_TAG)_IDG
endif
-else
- ifdef BUILD_IDG
- ifeq ($(OS_TARGET),WIN16)
- OBJDIR_TAG = _I
- else
- OBJDIR_TAG = $(64BIT_TAG)_IDG
- endif
+ else
+ ifeq ($(OS_TARGET),WIN16)
+ OBJDIR_TAG = _D
else
- ifeq ($(OS_TARGET),WIN16)
- OBJDIR_TAG = _D
- else
- OBJDIR_TAG = $(64BIT_TAG)_DBG
- endif
+ OBJDIR_TAG = $(64BIT_TAG)_DBG
endif
+ endif
endif
#
@@ -298,29 +316,18 @@ endif
# IMPL_STRATEGY may be defined too.
#
-# Name of the binary code directories
-ifeq ($(OS_ARCH), WINNT)
- ifeq ($(CPU_ARCH),x386)
- OBJDIR_NAME = $(OS_CONFIG)$(OBJDIR_TAG).OBJ
- else
- OBJDIR_NAME = $(OS_CONFIG)$(CPU_ARCH)$(OBJDIR_TAG).OBJ
- endif
-else
-endif
-
-OBJDIR_NAME = $(OS_CONFIG)$(CPU_TAG)$(COMPILER_TAG)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ
+OBJDIR_NAME = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(COMPILER_TAG)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ
-ifeq ($(OS_ARCH), WINNT)
-ifneq ($(OS_TARGET),WIN16)
+ifeq (,$(filter-out WINNT WIN95 WINCE,$(OS_TARGET))) # list omits WIN16
ifndef BUILD_OPT
#
# Define USE_DEBUG_RTL if you want to use the debug runtime library
# (RTL) in the debug build
#
ifdef USE_DEBUG_RTL
- OBJDIR_NAME = $(OS_CONFIG)$(CPU_TAG)$(COMPILER_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJD
-endif
+ OBJDIR_NAME = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(COMPILER_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJD
endif
endif
endif
+MK_ARCH = included
diff --git a/security/coreconf/command.mk b/security/coreconf/command.mk
index 77665f918..96cddff68 100644
--- a/security/coreconf/command.mk
+++ b/security/coreconf/command.mk
@@ -49,6 +49,7 @@ TAR = /bin/tar
#
# For purify
#
-NOMD_CFLAGS += $(OPTIMIZER) $(NOMD_OS_CFLAGS) $(XP_DEFINE) $(DEFINES) $(INCLUDES) \
- $(XCFLAGS)
+NOMD_CFLAGS += $(OPTIMIZER) $(NOMD_OS_CFLAGS) $(XP_DEFINE) $(DEFINES) \
+ $(INCLUDES) $(XCFLAGS)
+MK_COMMAND = included
diff --git a/security/coreconf/config.mk b/security/coreconf/config.mk
index 8683c71d6..97c4c7724 100644
--- a/security/coreconf/config.mk
+++ b/security/coreconf/config.mk
@@ -37,44 +37,50 @@
# [1.0] Master "Core Components" source and release <architecture> #
# tags #
#######################################################################
-
+ifndef MK_ARCH
include $(CORE_DEPTH)/coreconf/arch.mk
+endif
#######################################################################
# [2.0] Master "Core Components" default command macros #
-# (NOTE: may be overridden in $(OS_CONFIG).mk) #
+# (NOTE: may be overridden in $(OS_TARGET)$(OS_RELEASE).mk) #
#######################################################################
-
+ifndef MK_COMMAND
include $(CORE_DEPTH)/coreconf/command.mk
+endif
#######################################################################
# [3.0] Master "Core Components" <architecture>-specific macros #
# (dependent upon <architecture> tags) #
# #
# We are moving towards just having a $(OS_TARGET).mk file #
-# as opposed to multiple $(OS_CONFIG).mk files, one for #
-# each OS release. #
+# as opposed to multiple $(OS_TARGET)$(OS_RELEASE).mk files, #
+# one for each OS release. #
#######################################################################
-ifeq (,$(filter-out FreeBSD BSD_OS NetBSD OpenUNIX OS2 QNX Darwin,$(OS_TARGET)))
+TARGET_OSES = FreeBSD BSD_OS NetBSD OpenUNIX OS2 QNX Darwin
+
+ifeq (,$(filter-out $(TARGET_OSES),$(OS_TARGET)))
include $(CORE_DEPTH)/coreconf/$(OS_TARGET).mk
else
-include $(CORE_DEPTH)/coreconf/$(OS_CONFIG).mk
+include $(CORE_DEPTH)/coreconf/$(OS_TARGET)$(OS_RELEASE).mk
endif
#######################################################################
# [4.0] Master "Core Components" source and release <platform> tags #
# (dependent upon <architecture> tags) #
#######################################################################
-
-include $(CORE_DEPTH)/coreconf/platform.mk
+ifndef PLATFORM
+PLATFORM = $(OBJDIR_NAME)
+endif
#######################################################################
# [5.0] Master "Core Components" release <tree> tags #
# (dependent upon <architecture> tags) #
#######################################################################
-
+ifndef MK_TREE
include $(CORE_DEPTH)/coreconf/tree.mk
+endif
#######################################################################
# [6.0] Master "Core Components" source and release <component> tags #
@@ -83,8 +89,9 @@ include $(CORE_DEPTH)/coreconf/tree.mk
# command line, as an environment variable, or in individual #
# makefiles, or more appropriately, manifest.mn) #
#######################################################################
-
+ifndef MK_MODULE
include $(CORE_DEPTH)/coreconf/module.mk
+endif
#######################################################################
# [7.0] Master "Core Components" release <version> tags #
@@ -92,24 +99,27 @@ include $(CORE_DEPTH)/coreconf/module.mk
# command line, as an environment variable, or in individual #
# makefiles, or more appropriately, manifest.mn) #
#######################################################################
-
+ifndef MK_VERSION
include $(CORE_DEPTH)/coreconf/version.mk
+endif
#######################################################################
# [8.0] Master "Core Components" macros to figure out #
# binary code location #
# (dependent upon <platform> tags) #
#######################################################################
-
+ifndef MK_LOCATION
include $(CORE_DEPTH)/coreconf/location.mk
+endif
#######################################################################
# [9.0] Master "Core Components" <component>-specific source path #
# (dependent upon <user_source_tree>, <source_component>, #
# <version>, and <platform> tags) #
#######################################################################
-
+ifndef MK_SOURCE
include $(CORE_DEPTH)/coreconf/source.mk
+endif
#######################################################################
# [10.0] Master "Core Components" include switch for support header #
@@ -117,34 +127,43 @@ include $(CORE_DEPTH)/coreconf/source.mk
# (dependent upon <tree>, <component>, <version>, #
# and <platform> tags) #
#######################################################################
-
+ifndef MK_HEADERS
include $(CORE_DEPTH)/coreconf/headers.mk
+endif
#######################################################################
# [11.0] Master "Core Components" for computing program prefixes #
#######################################################################
-
+ifndef MK_PREFIX
include $(CORE_DEPTH)/coreconf/prefix.mk
+endif
#######################################################################
# [12.0] Master "Core Components" for computing program suffixes #
# (dependent upon <architecture> tags) #
#######################################################################
-
+ifndef MK_SUFFIX
include $(CORE_DEPTH)/coreconf/suffix.mk
+endif
#######################################################################
# [13.0] Master "Core Components" for defining JDK #
# (dependent upon <architecture>, <source>, and <suffix> tags)#
#######################################################################
-
+ifdef NS_USE_JDK
include $(CORE_DEPTH)/coreconf/jdk.mk
+endif
#######################################################################
# [14.0] Master "Core Components" rule set #
-# (should always be the last file included by config.mk) #
#######################################################################
-
+ifndef MK_RULESET
include $(CORE_DEPTH)/coreconf/ruleset.mk
+endif
+
+#######################################################################
+# [15.0] Dependencies.
+#######################################################################
+
-include $(MKDEPENDENCIES)
diff --git a/security/coreconf/headers.mk b/security/coreconf/headers.mk
index c23eefd9a..ff2da9a7f 100644
--- a/security/coreconf/headers.mk
+++ b/security/coreconf/headers.mk
@@ -43,7 +43,7 @@
INCLUDES += -I$(SOURCE_MDHEADERS_DIR)
ifneq ($(OS_TARGET),WIN16)
-INCLUDES += -I$(SOURCE_XPHEADERS_DIR)
+ INCLUDES += -I$(SOURCE_XPHEADERS_DIR)
endif
#
@@ -54,5 +54,7 @@ endif
INCLUDES += -I$(SOURCE_XPPRIVATE_DIR)
ifdef MOZILLA_CLIENT
-INCLUDES += -I$(SOURCE_XP_DIR)/include $(MOZILLA_INCLUDES)
+ INCLUDES += -I$(SOURCE_XP_DIR)/include $(MOZILLA_INCLUDES)
endif
+
+MK_HEADERS = included
diff --git a/security/coreconf/jdk.mk b/security/coreconf/jdk.mk
index 79b8b7662..9e0151023 100644
--- a/security/coreconf/jdk.mk
+++ b/security/coreconf/jdk.mk
@@ -118,7 +118,7 @@ ifeq ($(OS_ARCH), WINNT)
endif
# set [Sun Solaris] platforms
-ifeq ($(OS_ARCH), SunOS)
+ifeq ($(OS_TARGET), SunOS)
JAVA_CLASSES = $(JAVA_HOME)/lib/classes.zip
ifeq ($(JRE_HOME),)
@@ -168,7 +168,7 @@ endif
endif
# set [Hewlett Packard HP-UX] platforms
-ifeq ($(OS_ARCH), HP-UX)
+ifeq ($(OS_TARGET), HP-UX)
JAVA_CLASSES = $(JAVA_HOME)/lib/classes.zip
ifeq ($(JRE_HOME),)
@@ -207,7 +207,7 @@ ifeq ($(OS_ARCH), HP-UX)
endif
# set [Redhat Linux] platforms
-ifeq ($(OS_ARCH), Linux)
+ifeq ($(OS_TARGET), Linux)
JAVA_CLASSES = $(JAVA_HOME)/lib/classes.zip
ifeq ($(JRE_HOME),)
@@ -246,7 +246,7 @@ ifeq ($(OS_ARCH), Linux)
endif
# set [IBM AIX] platforms
-ifeq ($(OS_ARCH), AIX)
+ifeq ($(OS_TARGET), AIX)
JAVA_CLASSES = $(JAVA_HOME)/lib/classes.zip
ifeq ($(JRE_HOME),)
@@ -285,7 +285,7 @@ ifeq ($(OS_ARCH), AIX)
endif
# set [Digital UNIX] platforms
-ifeq ($(OS_ARCH), OSF1)
+ifeq ($(OS_TARGET), OSF1)
JAVA_CLASSES = $(JAVA_HOME)/lib/classes.zip
ifeq ($(JRE_HOME),)
@@ -324,7 +324,7 @@ ifeq ($(OS_ARCH), OSF1)
endif
# set [Silicon Graphics IRIX] platforms
-ifeq ($(OS_ARCH), IRIX)
+ifeq ($(OS_TARGET), IRIX)
JAVA_CLASSES = $(JAVA_HOME)/lib/dev.jar:$(JAVA_HOME)/lib/rt.jar
ifeq ($(JRE_HOME),)
diff --git a/security/coreconf/location.mk b/security/coreconf/location.mk
index e27de152c..060bb47ee 100644
--- a/security/coreconf/location.mk
+++ b/security/coreconf/location.mk
@@ -58,7 +58,9 @@ endif
DIST = $(SOURCE_PREFIX)/$(PLATFORM)
ifdef BUILD_DEBUG_GC
- DEFINES += -DDEBUG_GC
+ DEFINES += -DDEBUG_GC
endif
GARBAGE += $(DEPENDENCIES) core $(wildcard core.[0-9]*)
+
+MK_LOCATION = included
diff --git a/security/coreconf/module.mk b/security/coreconf/module.mk
index 55f7f8691..6a9d49f59 100644
--- a/security/coreconf/module.mk
+++ b/security/coreconf/module.mk
@@ -43,22 +43,23 @@
#
ifndef JAVA_SOURCE_COMPONENT
- JAVA_SOURCE_COMPONENT = java
+ JAVA_SOURCE_COMPONENT = java
endif
ifndef NETLIB_SOURCE_COMPONENT
- NETLIB_SOURCE_COMPONENT = netlib
+ NETLIB_SOURCE_COMPONENT = netlib
endif
ifndef NSPR_SOURCE_COMPONENT
- NSPR_SOURCE_COMPONENT = nspr20
+ NSPR_SOURCE_COMPONENT = nspr20
endif
ifndef SECTOOLS_SOURCE_COMPONENT
- SECTOOLS_SOURCE_COMPONENT = sectools
+ SECTOOLS_SOURCE_COMPONENT = sectools
endif
ifndef SECURITY_SOURCE_COMPONENT
- SECURITY_SOURCE_COMPONENT = security
+ SECURITY_SOURCE_COMPONENT = security
endif
+MK_MODULE = included
diff --git a/security/coreconf/nsinstall/Makefile b/security/coreconf/nsinstall/Makefile
index 80534139c..625d4bc77 100644
--- a/security/coreconf/nsinstall/Makefile
+++ b/security/coreconf/nsinstall/Makefile
@@ -45,7 +45,7 @@ PROGRAM = nsinstall
include $(DEPTH)/coreconf/config.mk
-ifeq (,$(filter-out OS2 WINNT,$(OS_ARCH)))
+ifeq (,$(filter-out OS2 WIN%,$(OS_TARGET)))
PROGRAM =
else
TARGETS = $(PROGRAM) $(PLSRCS:.pl=)
diff --git a/security/coreconf/prefix.mk b/security/coreconf/prefix.mk
index bda9dfe27..efcdd3c44 100644
--- a/security/coreconf/prefix.mk
+++ b/security/coreconf/prefix.mk
@@ -40,7 +40,7 @@
#
ifndef OBJ_PREFIX
- OBJ_PREFIX =
+ OBJ_PREFIX =
endif
#
@@ -48,25 +48,17 @@ endif
#
ifndef LIB_PREFIX
- ifeq (,$(filter-out OS2 WIN%,$(OS_TARGET)))
- LIB_PREFIX =
- else
- LIB_PREFIX = lib
- endif
+ LIB_PREFIX = lib
endif
ifndef DLL_PREFIX
- ifeq (,$(filter-out OS2 WIN%,$(OS_TARGET)))
- DLL_PREFIX =
- else
- DLL_PREFIX = lib
- endif
+ DLL_PREFIX = lib
endif
ifndef IMPORT_LIB_PREFIX
- IMPORT_LIB_PREFIX =
+ IMPORT_LIB_PREFIX =
endif
#
@@ -74,6 +66,7 @@ endif
#
ifndef PROG_PREFIX
- PROG_PREFIX =
+ PROG_PREFIX =
endif
+MK_PREFIX = included
diff --git a/security/coreconf/rules.mk b/security/coreconf/rules.mk
index 0b92ab3c3..728adc023 100644
--- a/security/coreconf/rules.mk
+++ b/security/coreconf/rules.mk
@@ -52,7 +52,7 @@ endif
platform::
@echo $(OBJDIR_NAME)
-ifeq ($(OS_ARCH), WINNT)
+ifeq (,$(filter-out WIN%,$(OS_TARGET)))
USE_NT_C_SYNTAX=1
endif
@@ -106,7 +106,7 @@ ifdef LIBRARY
endif
ifdef SHARED_LIBRARY
$(INSTALL) -m 775 $(SHARED_LIBRARY) $(SOURCE_LIB_DIR)
-ifeq ($(OS_ARCH),OpenVMS)
+ifeq ($(OS_TARGET),OpenVMS)
$(INSTALL) -m 775 $(SHARED_LIBRARY:$(DLL_SUFFIX)=vms) $(SOURCE_LIB_DIR)
endif
endif
@@ -284,7 +284,7 @@ endif
$(PROGRAM): $(OBJS) $(EXTRA_LIBS)
@$(MAKE_OBJDIR)
-ifeq ($(OS_ARCH),WINNT)
+ifeq (,$(filter-out WIN%,$(OS_TARGET)))
$(MKPROG) $(subst /,\\,$(OBJS)) -Fe$@ -link $(LDFLAGS) $(subst /,\\,$(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS))
else
ifdef XP_OS2_VACPP
@@ -300,7 +300,7 @@ get_objs:
$(LIBRARY): $(OBJS)
@$(MAKE_OBJDIR)
rm -f $@
-ifeq ($(OS_ARCH), WINNT)
+ifeq (,$(filter-out WIN%,$(OS_TARGET)))
$(AR) $(subst /,\\,$(OBJS))
else
$(AR) $(OBJS)
@@ -308,7 +308,7 @@ endif
$(RANLIB) $@
-ifeq ($(OS_ARCH),OS2)
+ifeq ($(OS_TARGET),OS2)
$(IMPORT_LIBRARY): $(SHARED_LIBRARY)
rm -f $@
$(IMPLIB) $@ $(patsubst %.lib,%.dll.def,$@)
@@ -326,7 +326,7 @@ endif
$(SHARED_LIBRARY): $(OBJS) $(MAPFILE)
@$(MAKE_OBJDIR)
rm -f $@
-ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.1)
+ifeq ($(OS_TARGET)$(OS_RELEASE), AIX4.1)
echo "#!" > $(OBJDIR)/lib$(LIBRARY_NAME)_syms
nm -B -C -g $(OBJS) \
| awk '/ [T,D] / {print $$3}' \
@@ -335,10 +335,10 @@ ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.1)
$(LD) $(XCFLAGS) -o $@ $(OBJS) -bE:$(OBJDIR)/lib$(LIBRARY_NAME)_syms \
-bM:SRE -bnoentry $(OS_LIBS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS)
else
-ifeq ($(OS_ARCH), WINNT)
+ifeq (,$(filter-out WIN%,$(OS_TARGET)))
$(LINK_DLL) -MAP $(DLLBASE) $(subst /,\\,$(OBJS) $(SUB_SHLOBJS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS) $(LD_LIBS))
else
-ifeq ($(OS_ARCH),OS2)
+ifeq ($(OS_TARGET),OS2)
@cmd /C "echo LIBRARY $(notdir $(basename $(SHARED_LIBRARY))) INITINSTANCE TERMINSTANCE >$@.def"
@cmd /C "echo PROTMODE >>$@.def"
@cmd /C "echo CODE LOADONCALL MOVEABLE DISCARDABLE >>$@.def"
@@ -361,13 +361,13 @@ else
$(MKSHLIB) -o $@ $(OBJS) $(SUB_SHLOBJS) $(LD_LIBS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS)
endif
chmod +x $@
-ifeq ($(OS_ARCH),OpenVMS)
+ifeq ($(OS_TARGET),OpenVMS)
@echo "`translate $@`" > $(@:$(DLL_SUFFIX)=vms)
endif
endif
endif
-ifeq ($(OS_ARCH), WINNT)
+ifeq (,$(filter-out WIN%,$(OS_TARGET)))
$(RES): $(RESNAME)
@$(MAKE_OBJDIR)
# The resource compiler does not understand the -U option.
@@ -382,7 +382,7 @@ $(MAPFILE): $(LIBRARY_NAME).def
$(OBJDIR)/$(PROG_PREFIX)%$(PROG_SUFFIX): $(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX)
@$(MAKE_OBJDIR)
-ifeq ($(OS_ARCH),WINNT)
+ifeq (,$(filter-out WIN%,$(OS_TARGET)))
$(MKPROG) $(OBJDIR)/$(PROG_PREFIX)$*$(OBJ_SUFFIX) -Fe$@ -link \
$(LDFLAGS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS)
else
@@ -409,7 +409,7 @@ else
$(CC) -o $@ -c $(CFLAGS) $<
endif
-ifneq ($(OS_ARCH), WINNT)
+ifneq (,$(filter-out WIN%,$(OS_TARGET)))
$(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.s
@$(MAKE_OBJDIR)
$(AS) -o $@ $(ASFLAGS) -c $<
@@ -460,13 +460,13 @@ endif #STRICT_CPLUSPLUS_SUFFIX
$(CCC) -C -E $(CFLAGS) $< > $*.i
%.i: %.c
-ifeq ($(OS_ARCH),WINNT)
+ifeq (,$(filter-out WIN%,$(OS_TARGET)))
$(CC) -C /P $(CFLAGS) $<
else
$(CC) -C -E $(CFLAGS) $< > $*.i
endif
-ifneq ($(OS_ARCH), WINNT)
+ifneq (,$(filter-out WIN%,$(OS_TARGET)))
%.i: %.s
$(CC) -C -E $(CFLAGS) $< > $*.i
endif
@@ -795,9 +795,14 @@ endif
### AND RESULTS_SUBDIR TO BE SET TO SOMETHING LIKE SECURITY/PKCS5
##########################################################################
-TESTS_DIR = $(RESULTS_DIR)/$(RESULTS_SUBDIR)/$(OS_CONFIG)$(CPU_TAG)$(COMPILER_TAG)$(IMPL_STRATEGY)
+TESTS_DIR = $(RESULTS_DIR)/$(RESULTS_SUBDIR)/$(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(COMPILER_TAG)$(IMPL_STRATEGY)
ifneq ($(REGRESSION_SPEC),)
+
+ifneq ($(BUILD_OPT),)
+REGDATE = $(subst \ ,, $(shell perl $(CORE_DEPTH)/$(MODULE)/scripts/now))
+endif
+
tests:: $(REGRESSION_SPEC)
cd $(PLATFORM); \
../$(SOURCE_MD_DIR)/bin/regress$(PROG_SUFFIX) specfile=../$(REGRESSION_SPEC) progress $(EXTRA_REGRESS_OPTIONS); \
@@ -839,7 +844,7 @@ endif
-include $(DEPENDENCIES)
-ifneq (,$(filter-out OS2 WINNT,$(OS_ARCH)))
+ifneq (,$(filter-out OS2 WIN%,$(OS_TARGET)))
# Can't use sed because of its 4000-char line length limit, so resort to perl
.DEFAULT:
@perl -e ' \
diff --git a/security/coreconf/ruleset.mk b/security/coreconf/ruleset.mk
index 8882c21ff..1453afebd 100644
--- a/security/coreconf/ruleset.mk
+++ b/security/coreconf/ruleset.mk
@@ -77,60 +77,26 @@
#######################################################################
#
-# At this time, the CPU_TAG value is actually assigned.
-#
-
-CPU_TAG =
-
-#
-# When the processor is NOT 386-based on Windows NT, override the
-# value of $(CPU_TAG).
-#
-ifeq ($(OS_ARCH), WINNT)
- ifneq ($(CPU_ARCH),x386)
- CPU_TAG = _$(CPU_ARCH)
- endif
-endif
-
-#
-# Always set CPU_TAG on Linux.
-#
-ifeq ($(OS_ARCH), Linux)
- CPU_TAG = _$(CPU_ARCH)
-endif
-
-#
-# Always set CPU_TAG on OpenVMS.
-#
-ifeq ($(OS_ARCH), OpenVMS)
- CPU_TAG = _$(CPU_ARCH)
-endif
-
-#
-# At this time, the COMPILER_TAG value is actually assigned.
+# CPU_TAG is now defined in the $(TARGET).mk files
#
ifndef COMPILER_TAG
-ifneq ($(DEFAULT_COMPILER), $(CC))
+ ifneq ($(DEFAULT_COMPILER), $(CC))
#
# Temporary define for the Client; to be removed when binary release is used
#
ifdef MOZILLA_CLIENT
- COMPILER_TAG =
+ COMPILER_TAG =
else
- COMPILER_TAG = _$(CC)
+ COMPILER_TAG = _$(CC)
endif
-else
+ else
COMPILER_TAG =
-endif
+ endif
endif
-#
-# At this time, a default value of $(CC) is assigned to MKPROG.
-#
-
ifeq ($(MKPROG),)
- MKPROG = $(CC)
+ MKPROG = $(CC)
endif
#
@@ -138,26 +104,21 @@ endif
# objects:
# - (1) LIBRARY: a static (archival) library
# - (2) SHARED_LIBRARY: a shared (dynamic link) library
-# - (3) IMPORT_LIBRARY: an import library, used only on Windows
+# - (3) IMPORT_LIBRARY: an import library, defined in $(OS_TARGET).mk
# - (4) PROGRAM: an executable binary
#
# NOTE: The names of libraries can be generated by simply specifying
# LIBRARY_NAME (and LIBRARY_VERSION in the case of non-static libraries).
+# LIBRARY and SHARED_LIBRARY may be defined differently in $(OS_TARGET).mk
#
ifdef LIBRARY_NAME
+ ifndef LIBRARY
LIBRARY = $(OBJDIR)/$(LIB_PREFIX)$(LIBRARY_NAME).$(LIB_SUFFIX)
+ endif
+ ifndef SHARED_LIBRARY
SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(JDK_DEBUG_SUFFIX).$(DLL_SUFFIX)
- ifeq (,$(filter-out WIN%,$(OS_TARGET)))
- SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)32$(JDK_DEBUG_SUFFIX).dll
- IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)32$(JDK_DEBUG_SUFFIX).lib
- endif
- ifeq ($(OS_TARGET)$(OS_RELEASE), AIX4.1)
- SHARED_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION)_shr$(JDK_DEBUG_SUFFIX).a
- endif
- ifeq ($(OS_TARGET), OS2)
- IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)$(JDK_DEBUG_SUFFIX).lib
- endif
+ endif
endif
#
@@ -165,23 +126,19 @@ endif
#
ifdef PROGRAM
- PROGRAM := $(addprefix $(OBJDIR)/, $(PROGRAM)$(JDK_DEBUG_SUFFIX)$(PROG_SUFFIX))
+ PROGRAM := $(addprefix $(OBJDIR)/, $(PROGRAM)$(JDK_DEBUG_SUFFIX)$(PROG_SUFFIX))
endif
ifdef PROGRAMS
- PROGRAMS := $(addprefix $(OBJDIR)/, $(PROGRAMS:%=%$(JDK_DEBUG_SUFFIX)$(PROG_SUFFIX)))
+ PROGRAMS := $(addprefix $(OBJDIR)/, $(PROGRAMS:%=%$(JDK_DEBUG_SUFFIX)$(PROG_SUFFIX)))
endif
ifndef TARGETS
- ifeq (,$(filter-out OS2 WINNT,$(OS_ARCH)))
- TARGETS = $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(PROGRAM)
- else
- TARGETS = $(LIBRARY) $(SHARED_LIBRARY) $(PROGRAM)
- endif
+ TARGETS = $(LIBRARY) $(SHARED_LIBRARY) $(PROGRAM)
endif
ifndef OBJS
- SIMPLE_OBJS = $(JRI_STUB_CFILES) \
+ SIMPLE_OBJS = $(JRI_STUB_CFILES) \
$(addsuffix $(OBJ_SUFFIX), $(JMC_GEN)) \
$(CSRCS:.c=$(OBJ_SUFFIX)) \
$(CPPSRCS:.cpp=$(OBJ_SUFFIX)) \
@@ -189,52 +146,51 @@ ifndef OBJS
$(BUILT_CSRCS:.c=$(OBJ_SUFFIX)) \
$(BUILT_CPPSRCS:.cpp=$(OBJ_SUFFIX)) \
$(BUILT_ASFILES:$(ASM_SUFFIX)=$(OBJ_SUFFIX))
- OBJS = $(addprefix $(OBJDIR)/$(PROG_PREFIX), $(SIMPLE_OBJS))
+ OBJS = $(addprefix $(OBJDIR)/$(PROG_PREFIX), $(SIMPLE_OBJS)) $(RES)
endif
ifndef BUILT_SRCS
- BUILT_SRCS = $(addprefix $(OBJDIR)/$(PROG_PREFIX), \
- $(BUILT_CSRCS) $(BUILT_CPPSRCS) $(BUILT_ASFILES))
+ BUILT_SRCS = $(addprefix $(OBJDIR)/$(PROG_PREFIX), \
+ $(BUILT_CSRCS) $(BUILT_CPPSRCS) $(BUILT_ASFILES))
endif
-ifeq ($(OS_ARCH),WINNT)
- OBJS += $(RES)
- MAKE_OBJDIR = $(INSTALL) -D $(OBJDIR)
+ifeq (,$(filter-out WIN%,$(OS_TARGET)))
+ MAKE_OBJDIR = $(INSTALL) -D $(OBJDIR)
else
- define MAKE_OBJDIR
+ define MAKE_OBJDIR
if test ! -d $(@D); then rm -rf $(@D); $(NSINSTALL) -D $(@D); fi
- endef
+ endef
endif
ifndef PACKAGE
- PACKAGE = .
+ PACKAGE = .
endif
ALL_TRASH := $(TARGETS) $(OBJS) $(OBJDIR) LOGS TAGS $(GARBAGE) \
$(NOSUCHFILE) $(JDK_HEADER_CFILES) $(JDK_STUB_CFILES) \
- $(JRI_HEADER_CFILES) $(JRI_STUB_CFILES) $(JNI_HEADERS) $(JMC_STUBS) \
- $(JMC_HEADERS) $(JMC_EXPORT_FILES) so_locations \
- _gen _jmc _jri _jni _stubs \
+ $(JRI_HEADER_CFILES) $(JRI_STUB_CFILES) $(JNI_HEADERS) \
+ $(JMC_STUBS) $(JMC_HEADERS) $(JMC_EXPORT_FILES) \
+ so_locations _gen _jmc _jri _jni _stubs \
$(wildcard $(JAVA_DESTPATH)/$(PACKAGE)/*.class) \
$(BUILT_SRCS)
ifdef JDIRS
- ALL_TRASH += $(addprefix $(JAVA_DESTPATH)/,$(JDIRS))
+ ALL_TRASH += $(addprefix $(JAVA_DESTPATH)/,$(JDIRS))
endif
ifdef NSBUILDROOT
- JDK_GEN_DIR = $(SOURCE_XP_DIR)/_gen
- JMC_GEN_DIR = $(SOURCE_XP_DIR)/_jmc
- JNI_GEN_DIR = $(SOURCE_XP_DIR)/_jni
- JRI_GEN_DIR = $(SOURCE_XP_DIR)/_jri
- JDK_STUB_DIR = $(SOURCE_XP_DIR)/_stubs
+ JDK_GEN_DIR = $(SOURCE_XP_DIR)/_gen
+ JMC_GEN_DIR = $(SOURCE_XP_DIR)/_jmc
+ JNI_GEN_DIR = $(SOURCE_XP_DIR)/_jni
+ JRI_GEN_DIR = $(SOURCE_XP_DIR)/_jri
+ JDK_STUB_DIR = $(SOURCE_XP_DIR)/_stubs
else
- JDK_GEN_DIR = _gen
- JMC_GEN_DIR = _jmc
- JNI_GEN_DIR = _jni
- JRI_GEN_DIR = _jri
- JDK_STUB_DIR = _stubs
+ JDK_GEN_DIR = _gen
+ JMC_GEN_DIR = _jmc
+ JNI_GEN_DIR = _jni
+ JRI_GEN_DIR = _jri
+ JDK_STUB_DIR = _stubs
endif
#
@@ -243,48 +199,39 @@ endif
#
ifdef BUILD_OFFICIAL
- EXIT_ON_ERROR = +e
- CLICK_STOPWATCH = date
+ EXIT_ON_ERROR = +e
+ CLICK_STOPWATCH = date
else
- EXIT_ON_ERROR = -e
- CLICK_STOPWATCH = true
+ EXIT_ON_ERROR = -e
+ CLICK_STOPWATCH = true
endif
ifdef REQUIRES
- MODULE_INCLUDES := $(addprefix -I$(SOURCE_XP_DIR)/public/, $(REQUIRES))
- INCLUDES += $(MODULE_INCLUDES)
- ifeq ($(MODULE), sectools)
- PRIVATE_INCLUDES := $(addprefix -I$(SOURCE_XP_DIR)/private/, $(REQUIRES))
- INCLUDES += $(PRIVATE_INCLUDES)
- endif
+ MODULE_INCLUDES := $(addprefix -I$(SOURCE_XP_DIR)/public/, $(REQUIRES))
+ INCLUDES += $(MODULE_INCLUDES)
+ ifeq ($(MODULE), sectools)
+ PRIVATE_INCLUDES := $(addprefix -I$(SOURCE_XP_DIR)/private/, $(REQUIRES))
+ INCLUDES += $(PRIVATE_INCLUDES)
+ endif
endif
ifdef SYSTEM_INCL_DIR
- YOPT = -Y$(SYSTEM_INCL_DIR)
+ YOPT = -Y$(SYSTEM_INCL_DIR)
endif
ifdef DIRS
- LOOP_OVER_DIRS = \
- @for directory in $(DIRS); do \
- if test -d $$directory; then \
- set $(EXIT_ON_ERROR); \
- echo "cd $$directory; $(MAKE) $@"; \
- $(MAKE) -C $$directory $@; \
- set +e; \
- else \
- echo "Skipping non-directory $$directory..."; \
- fi; \
- $(CLICK_STOPWATCH); \
- done
-endif
-
-
-
-# special stuff for tests rule in rules.mk
-
-ifneq ($(OS_ARCH),WINNT)
- REGDATE = $(subst \ ,, $(shell perl $(CORE_DEPTH)/$(MODULE)/scripts/now))
-else
- REGCOREDEPTH = $(subst \\,/,$(CORE_DEPTH))
- REGDATE = $(subst \ ,, $(shell perl $(CORE_DEPTH)/$(MODULE)/scripts/now))
-endif
+ LOOP_OVER_DIRS = \
+ @for directory in $(DIRS); do \
+ if test -d $$directory; then \
+ set $(EXIT_ON_ERROR); \
+ echo "cd $$directory; $(MAKE) $@"; \
+ $(MAKE) -C $$directory $@; \
+ set +e; \
+ else \
+ echo "Skipping non-directory $$directory..."; \
+ fi; \
+ $(CLICK_STOPWATCH); \
+ done
+endif
+
+MK_RULESET = included
diff --git a/security/coreconf/source.mk b/security/coreconf/source.mk
index 170d7dc25..2eb9d1d7b 100644
--- a/security/coreconf/source.mk
+++ b/security/coreconf/source.mk
@@ -40,11 +40,11 @@
#
ifndef SOURCE_PREFIX
-ifndef BUILD_TREE
-SOURCE_PREFIX = $(CORE_DEPTH)/../dist
-else
-SOURCE_PREFIX = $(BUILD_TREE)/dist
-endif
+ ifndef BUILD_TREE
+ SOURCE_PREFIX = $(CORE_DEPTH)/../dist
+ else
+ SOURCE_PREFIX = $(BUILD_TREE)/dist
+ endif
endif
#
@@ -52,7 +52,7 @@ endif
#
ifndef SOURCE_XP_DIR
-SOURCE_XP_DIR = $(SOURCE_PREFIX)
+ SOURCE_XP_DIR = $(SOURCE_PREFIX)
endif
#
@@ -65,9 +65,9 @@ SOURCE_XPHEADERS_DIR = $(SOURCE_XP_DIR)/public/$(MODULE)
SOURCE_XPPRIVATE_DIR = $(SOURCE_XP_DIR)/private/$(MODULE)
ifdef BUILD_OPT
- IMPORT_XPCLASS_DIR = $(SOURCE_CLASSES_DIR)
+ IMPORT_XPCLASS_DIR = $(SOURCE_CLASSES_DIR)
else
- IMPORT_XPCLASS_DIR = $(SOURCE_CLASSES_DBG_DIR)
+ IMPORT_XPCLASS_DIR = $(SOURCE_CLASSES_DBG_DIR)
endif
#
@@ -75,7 +75,7 @@ endif
#
ifndef SOURCE_MD_DIR
-SOURCE_MD_DIR = $(SOURCE_PREFIX)/$(PLATFORM)
+ SOURCE_MD_DIR = $(SOURCE_PREFIX)/$(PLATFORM)
endif
#
@@ -84,17 +84,17 @@ endif
#This is where we install built executables and (for Windows only) DLLs.
ifndef SOURCE_BIN_DIR
-SOURCE_BIN_DIR = $(SOURCE_MD_DIR)/bin
+ SOURCE_BIN_DIR = $(SOURCE_MD_DIR)/bin
endif
#This is where we install built libraries (.a, .so, .lib).
ifndef SOURCE_LIB_DIR
-SOURCE_LIB_DIR = $(SOURCE_MD_DIR)/lib
+ SOURCE_LIB_DIR = $(SOURCE_MD_DIR)/lib
endif
# This is where NSPR header files are found.
ifndef SOURCE_MDHEADERS_DIR
-SOURCE_MDHEADERS_DIR = $(SOURCE_MD_DIR)/include
+ SOURCE_MDHEADERS_DIR = $(SOURCE_MD_DIR)/include
endif
#######################################################################
@@ -108,14 +108,14 @@ endif
#
ifeq ($(POLICY), domestic)
- SOURCE_RELEASE_PREFIX = $(SOURCE_PREFIX)/release/domestic
+ SOURCE_RELEASE_PREFIX = $(SOURCE_PREFIX)/release/domestic
else
- ifeq ($(POLICY), export)
- SOURCE_RELEASE_PREFIX = $(SOURCE_PREFIX)/release/export
+ ifeq ($(POLICY), export)
+ SOURCE_RELEASE_PREFIX = $(SOURCE_PREFIX)/release/export
+ else
+ ifeq ($(POLICY), france)
+ SOURCE_RELEASE_PREFIX = $(SOURCE_PREFIX)/release/france
else
- ifeq ($(POLICY), france)
- SOURCE_RELEASE_PREFIX = $(SOURCE_PREFIX)/release/france
- else
#We shouldn't have to put another directory under here, but without it the perl
#script for releasing doesn't find the directory. It thinks it doesn't exist.
#So we're adding this no-policy directory so that the script for releasing works
@@ -123,9 +123,9 @@ else
#files land, only where they are placed in the local tree when building the jar
#files. When there is no policy, the jar files will still land in
#<dist>/<module>/<date>/<platform> like they used to.
- SOURCE_RELEASE_PREFIX = $(SOURCE_PREFIX)/release/no-policy
- endif
+ SOURCE_RELEASE_PREFIX = $(SOURCE_PREFIX)/release/no-policy
endif
+ endif
endif
#
@@ -151,9 +151,9 @@ XPCLASS_DBG_JAR = xpclass_dbg.jar
XPHEADER_JAR = xpheader.jar
ifdef BUILD_OPT
- IMPORT_XPCLASS_JAR = $(XPCLASS_JAR)
+ IMPORT_XPCLASS_JAR = $(XPCLASS_JAR)
else
- IMPORT_XPCLASS_JAR = $(XPCLASS_DBG_JAR)
+ IMPORT_XPCLASS_JAR = $(XPCLASS_DBG_JAR)
endif
#
@@ -182,6 +182,7 @@ MDHEADER_JAR = mdheader.jar
# Where to put the results
ifneq ($(RESULTS_DIR),)
- RESULTS_DIR = $(RELEASE_TREE)/sectools/results
+ RESULTS_DIR = $(RELEASE_TREE)/sectools/results
endif
+MK_SOURCE = included
diff --git a/security/coreconf/suffix.mk b/security/coreconf/suffix.mk
index 2739f9fe6..4366befc4 100644
--- a/security/coreconf/suffix.mk
+++ b/security/coreconf/suffix.mk
@@ -36,88 +36,60 @@
#######################################################################
#
-# Object suffixes
+# Object suffixes (OS2 and WIN% override this)
#
-
ifndef OBJ_SUFFIX
- ifeq ($(OS_ARCH), WINNT)
- OBJ_SUFFIX = .obj
- else
- ifeq ($(OS_ARCH), OS2)
- OBJ_SUFFIX = .obj
- else
- OBJ_SUFFIX = .o
- endif
- endif
+ OBJ_SUFFIX = .o
endif
#
-# Assembler source suffixes
+# Assembler source suffixes (OS2 and WIN% override this)
#
-
ifndef ASM_SUFFIX
- ifeq ($(OS_ARCH), WINNT)
- ASM_SUFFIX = .asm
- else
- ASM_SUFFIX = .s
- endif
+ ASM_SUFFIX = .s
endif
#
# Library suffixes
#
-
STATIC_LIB_EXTENSION =
ifndef DYNAMIC_LIB_EXTENSION
- ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.1)
- DYNAMIC_LIB_EXTENSION = _shr
- else
- DYNAMIC_LIB_EXTENSION =
- endif
+ DYNAMIC_LIB_EXTENSION =
endif
ifndef STATIC_LIB_SUFFIX
- STATIC_LIB_SUFFIX = .$(LIB_SUFFIX)
+ STATIC_LIB_SUFFIX = .$(LIB_SUFFIX)
endif
ifndef DYNAMIC_LIB_SUFFIX
- DYNAMIC_LIB_SUFFIX = .$(DLL_SUFFIX)
+ DYNAMIC_LIB_SUFFIX = .$(DLL_SUFFIX)
endif
-
+# WIN% overridese this
ifndef IMPORT_LIB_SUFFIX
- ifeq ($(OS_ARCH), WINNT)
- IMPORT_LIB_SUFFIX = .$(LIB_SUFFIX)
- else
- IMPORT_LIB_SUFFIX =
- endif
+ IMPORT_LIB_SUFFIX =
endif
ifndef STATIC_LIB_SUFFIX_FOR_LINKING
- STATIC_LIB_SUFFIX_FOR_LINKING = $(STATIC_LIB_SUFFIX)
+ STATIC_LIB_SUFFIX_FOR_LINKING = $(STATIC_LIB_SUFFIX)
endif
+# WIN% overridese this
ifndef DYNAMIC_LIB_SUFFIX_FOR_LINKING
- ifeq ($(OS_ARCH), WINNT)
- DYNAMIC_LIB_SUFFIX_FOR_LINKING = $(IMPORT_LIB_SUFFIX)
- else
- DYNAMIC_LIB_SUFFIX_FOR_LINKING = $(DYNAMIC_LIB_SUFFIX)
- endif
+ DYNAMIC_LIB_SUFFIX_FOR_LINKING = $(DYNAMIC_LIB_SUFFIX)
endif
#
-# Program suffixes
+# Program suffixes (OS2 and WIN% override this)
#
ifndef PROG_SUFFIX
- ifeq (,$(filter-out OS2 WINNT,$(OS_ARCH)))
- PROG_SUFFIX = .exe
- else
- PROG_SUFFIX =
- endif
+ PROG_SUFFIX =
endif
+
+MK_SUFFIX = included
diff --git a/security/coreconf/tree.mk b/security/coreconf/tree.mk
index fdcb8ee0e..273a47c1e 100644
--- a/security/coreconf/tree.mk
+++ b/security/coreconf/tree.mk
@@ -35,53 +35,17 @@
# Master "Core Components" file system "release" prefixes #
#######################################################################
-# RELEASE_TREE = $(CORE_DEPTH)/../coredist
-
-
+# Windows platforms override this. See WIN32.mk or WIN16.mk.
ifndef RELEASE_TREE
- ifdef BUILD_SHIP
- ifdef USE_SHIPS
- RELEASE_TREE = $(BUILD_SHIP)
- else
- RELEASE_TREE = /share/builds/components
- endif
+ ifdef BUILD_SHIP
+ ifdef USE_SHIPS
+ RELEASE_TREE = $(BUILD_SHIP)
else
- RELEASE_TREE = /share/builds/components
- endif
- ifeq ($(OS_TARGET), WINNT)
- ifdef BUILD_SHIP
- ifdef USE_SHIPS
- RELEASE_TREE = $(NTBUILD_SHIP)
- else
- RELEASE_TREE = //redbuild/components
- endif
- else
- RELEASE_TREE = //redbuild/components
- endif
- endif
-
- ifeq ($(OS_TARGET), WIN95)
- ifdef BUILD_SHIP
- ifdef USE_SHIPS
- RELEASE_TREE = $(NTBUILD_SHIP)
- else
- RELEASE_TREE = //redbuild/components
- endif
- else
- RELEASE_TREE = //redbuild/components
- endif
- endif
- ifeq ($(OS_TARGET), WIN16)
- ifdef BUILD_SHIP
- ifdef USE_SHIPS
- RELEASE_TREE = $(NTBUILD_SHIP)
- else
- RELEASE_TREE = //redbuild/components
- endif
- else
- RELEASE_TREE = //redbuild/components
- endif
+ RELEASE_TREE = /share/builds/components
endif
+ else
+ RELEASE_TREE = /share/builds/components
+ endif
endif
#
@@ -90,21 +54,21 @@ endif
#
ifeq ($(POLICY), domestic)
- RELEASE_XP_DIR = domestic
- RELEASE_MD_DIR = domestic/$(PLATFORM)
+ RELEASE_XP_DIR = domestic
+ RELEASE_MD_DIR = domestic/$(PLATFORM)
else
- ifeq ($(POLICY), export)
- RELEASE_XP_DIR = export
- RELEASE_MD_DIR = export/$(PLATFORM)
+ ifeq ($(POLICY), export)
+ RELEASE_XP_DIR = export
+ RELEASE_MD_DIR = export/$(PLATFORM)
+ else
+ ifeq ($(POLICY), france)
+ RELEASE_XP_DIR = france
+ RELEASE_MD_DIR = france/$(PLATFORM)
else
- ifeq ($(POLICY), france)
- RELEASE_XP_DIR = france
- RELEASE_MD_DIR = france/$(PLATFORM)
- else
- RELEASE_XP_DIR =
- RELEASE_MD_DIR = $(PLATFORM)
- endif
+ RELEASE_XP_DIR =
+ RELEASE_MD_DIR = $(PLATFORM)
endif
+ endif
endif
@@ -112,3 +76,5 @@ REPORTER_TREE = $(subst \,\\,$(RELEASE_TREE))
IMPORT_XP_DIR =
IMPORT_MD_DIR = $(PLATFORM)
+
+MK_TREE = included
diff --git a/security/coreconf/version.mk b/security/coreconf/version.mk
index b2a55d180..7d459a95f 100644
--- a/security/coreconf/version.mk
+++ b/security/coreconf/version.mk
@@ -47,15 +47,15 @@ CURRENT_VERSION_SYMLINK = current
#
ifndef VERSION
- ifdef BUILD_NUM
- VERSION = $(BUILD_NUM)
- endif
+ ifdef BUILD_NUM
+ VERSION = $(BUILD_NUM)
+ endif
endif
ifndef RELEASE_VERSION
- ifdef BUILD_NUM
- RELEASE_VERSION = $(BUILD_NUM)
- endif
+ ifdef BUILD_NUM
+ RELEASE_VERSION = $(BUILD_NUM)
+ endif
endif
#
@@ -65,7 +65,7 @@ endif
# to $(CURRENT_VERSION_SYMLINK).
ifndef VERSION
- VERSION = $(CURRENT_VERSION_SYMLINK)
+ VERSION = $(CURRENT_VERSION_SYMLINK)
endif
# If RELEASE_VERSION has still NOT been set on the command line,
@@ -75,7 +75,7 @@ endif
#
ifndef RELEASE_VERSION
- RELEASE_VERSION =
+ RELEASE_VERSION =
endif
#
@@ -83,21 +83,23 @@ endif
#
ifndef JAVA_VERSION
- JAVA_VERSION = $(CURRENT_VERSION_SYMLINK)
+ JAVA_VERSION = $(CURRENT_VERSION_SYMLINK)
endif
ifndef NETLIB_VERSION
- NETLIB_VERSION = $(CURRENT_VERSION_SYMLINK)
+ NETLIB_VERSION = $(CURRENT_VERSION_SYMLINK)
endif
ifndef NSPR_VERSION
- NSPR_VERSION = $(CURRENT_VERSION_SYMLINK)
+ NSPR_VERSION = $(CURRENT_VERSION_SYMLINK)
endif
ifndef SECTOOLS_VERSION
- SECTOOLS_VERSION = $(CURRENT_VERSION_SYMLINK)
+ SECTOOLS_VERSION = $(CURRENT_VERSION_SYMLINK)
endif
ifndef SECURITY_VERSION
- SECURITY_VERSION = $(CURRENT_VERSION_SYMLINK)
+ SECURITY_VERSION = $(CURRENT_VERSION_SYMLINK)
endif
+
+MK_VERSION = included
diff --git a/security/nss/Makefile b/security/nss/Makefile
index 6e18827cd..d7373ed82 100644
--- a/security/nss/Makefile
+++ b/security/nss/Makefile
@@ -54,7 +54,9 @@ include $(CORE_DEPTH)/coreconf/config.mk
# (4) Include "local" platform-dependent assignments (OPTIONAL). #
#######################################################################
-
+ifeq ($(OS_TARGET),WINCE)
+DIRS = lib # omit cmd since wince has no command line shell
+endif
#######################################################################
# (5) Execute "global" rules. (OPTIONAL) #
@@ -114,7 +116,7 @@ endif
#
USEABSPATH="YES"
-ifeq ($(OS_ARCH),WINNT)
+ifeq (,$(filter-out WIN%,$(OS_TARGET)))
ifeq (,$(findstring :,$(shell pwd)))
USEABSPATH="NO"
endif
@@ -149,7 +151,7 @@ build_dbm:
moz_import::
-ifeq ($(OS_ARCH),WINNT)
+ifeq (,$(filter-out WIN%,$(OS_TARGET)))
$(NSINSTALL) -D $(DIST)/include/nspr
cp $(DIST)/../include/nspr/*.h $(DIST)/include/nspr
cp $(DIST)/../include/* $(DIST)/include
@@ -160,7 +162,7 @@ else
endif
mv $(DIST)/lib/dbm32.lib $(DIST)/lib/dbm.lib
else
-ifeq ($(OS_ARCH),OS2)
+ifeq ($(OS_TARGET),OS2)
cp -rf $(DIST)/../include $(DIST)
cp -rf $(DIST)/../lib $(DIST)
cp -f $(DIST)/lib/libmozdbm_s.$(LIB_SUFFIX) $(DIST)/lib/libdbm.$(LIB_SUFFIX)
diff --git a/security/nss/cmd/Makefile b/security/nss/cmd/Makefile
index dd012940e..5e716b9b3 100644
--- a/security/nss/cmd/Makefile
+++ b/security/nss/cmd/Makefile
@@ -149,7 +149,7 @@ TARGETS = $(NON_DIRS)
include $(CORE_DEPTH)/coreconf/rules.mk
-ifneq ($(OS_ARCH),OS2)
+ifneq ($(OS_TARGET),OS2)
$(OBJDIR)/%-us.o: %.c
@$(MAKE_OBJDIR)
$(CCF) -o $@ $(US_FLAGS) -c $*.c
diff --git a/security/nss/cmd/crmf-cgi/Makefile b/security/nss/cmd/crmf-cgi/Makefile
index cc2f035d6..23cb6f6b5 100644
--- a/security/nss/cmd/crmf-cgi/Makefile
+++ b/security/nss/cmd/crmf-cgi/Makefile
@@ -35,7 +35,7 @@
#######################################################################
# (1) Include initial platform-independent assignments (MANDATORY). #
#######################################################################
-ifeq ($(OS_ARCH), WINNT)
+ifeq (,$(filter-out WIN%,$(OS_TARGET)))
EXTRA_LIBS += $(DIST)/lib/crmf.lib
else
EXTRA_LIBS += $(DIST)/lib/libcrmf.$(LIB_SUFFIX)
diff --git a/security/nss/cmd/crmftest/Makefile b/security/nss/cmd/crmftest/Makefile
index 9eae3715a..5df669763 100644
--- a/security/nss/cmd/crmftest/Makefile
+++ b/security/nss/cmd/crmftest/Makefile
@@ -55,15 +55,15 @@ include $(CORE_DEPTH)/coreconf/config.mk
#######################################################################
include config.mk
-ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.2)
+ifeq ($(OS_TARGET)$(OS_RELEASE), AIX4.2)
OS_LIBS += -lsvld
endif
-ifeq ($(OS_ARCH)$(OS_RELEASE), SunOS5.6)
+ifeq ($(OS_TARGET)$(OS_RELEASE), SunOS5.6)
OS_LIBS += -ldl -lxnet -lposix4 -lsocket -lnsl
endif
-ifeq ($(OS_ARCH), WINNT)
+ifeq (,$(filter-out WIN%,$(OS_TARGET)))
EXTRA_LIBS += $(DIST)/lib/crmf.lib
else
EXTRA_LIBS += $(DIST)/lib/libcrmf.$(LIB_SUFFIX)
@@ -89,7 +89,7 @@ include $(CORE_DEPTH)/coreconf/rules.mk
LDDIST = $(DIST)/lib
-ifeq ($(OS_ARCH), WINNT)
+ifeq (,$(filter-out WIN%,$(OS_TARGET)))
EXTRA_LIBS += $(LDDIST)/sectool.lib
endif
diff --git a/security/nss/cmd/dbtest/Makefile b/security/nss/cmd/dbtest/Makefile
index ed30c638a..0d4b54c29 100644
--- a/security/nss/cmd/dbtest/Makefile
+++ b/security/nss/cmd/dbtest/Makefile
@@ -58,7 +58,7 @@ ifdef XP_OS2_VACPP
CFLAGS += -I../modutil
endif
-ifeq ($(OS_ARCH), WINNT)
+ifeq (,$(filter-out WINNT WIN95 WIN16,$(OS_TARGET))) # omits WINCE
ifndef BUILD_OPT
LDFLAGS += /subsystem:console /profile /debug /machine:I386 /incremental:no
OS_CFLAGS += -D_CONSOLE
diff --git a/security/nss/cmd/modutil/config.mk b/security/nss/cmd/modutil/config.mk
index 3da32a667..9f0cdf1e4 100644
--- a/security/nss/cmd/modutil/config.mk
+++ b/security/nss/cmd/modutil/config.mk
@@ -58,9 +58,9 @@ LDFLAGS = \
# Strip out the symbols
ifdef BUILD_OPT
- ifneq ($(OS_ARCH),WINNT)
- LDFLAGS += -s
- endif
+ ifneq (,$(filter-out WIN%,$(OS_TARGET)))
+ LDFLAGS += -s
+ endif
endif
#######################################################################
@@ -68,10 +68,10 @@ endif
#######################################################################
-ifeq ($(OS_ARCH),WINNT)
- PACKAGE_FILES = license.txt README.TXT specification.html pk11jar.html modutil.exe
+ifeq (,$(filter-out WIN%,$(OS_TARGET)))
+ PACKAGE_FILES = license.txt README.TXT specification.html pk11jar.html modutil.exe
else
- PACKAGE_FILES = license.doc README specification.html pk11jar.html modutil
+ PACKAGE_FILES = license.doc README specification.html pk11jar.html modutil
endif
-ARCHIVE_NAME = modutil_$(OS_CONFIG)
+ARCHIVE_NAME = modutil_$(OS_TARGET)$(OS_RELEASE)
diff --git a/security/nss/cmd/rsaperf/Makefile b/security/nss/cmd/rsaperf/Makefile
index cf93911eb..1a555a2fe 100644
--- a/security/nss/cmd/rsaperf/Makefile
+++ b/security/nss/cmd/rsaperf/Makefile
@@ -53,7 +53,7 @@ include $(CORE_DEPTH)/coreconf/config.mk
#######################################################################
include ../platlibs.mk
-ifeq ($(OS_ARCH), WINNT)
+ifeq (,$(filter-out WINNT WIN95 WIN16,$(OS_TARGET))) #omits WINCE
ifndef BUILD_OPT
LDFLAGS += /subsystem:console /profile /debug /machine:I386 /incremental:no
OS_CFLAGS += -D_CONSOLE
diff --git a/security/nss/cmd/tstclnt/Makefile b/security/nss/cmd/tstclnt/Makefile
index 7e236b453..8a0332d89 100644
--- a/security/nss/cmd/tstclnt/Makefile
+++ b/security/nss/cmd/tstclnt/Makefile
@@ -54,7 +54,7 @@ include $(CORE_DEPTH)/coreconf/config.mk
include ../platlibs.mk
-ifeq ($(OS_ARCH), WINNT)
+ifeq (,$(filter-out WINNT WIN95 WIN16,$(OS_TARGET))) # omits WINCE
ifndef BUILD_OPT
LDFLAGS += /subsystem:console /profile /debug /machine:I386 /incremental:no
OS_CFLAGS += -D_CONSOLE
diff --git a/security/nss/cmd/zlib/config.mk b/security/nss/cmd/zlib/config.mk
index 090b93d70..a1c67fdb4 100644
--- a/security/nss/cmd/zlib/config.mk
+++ b/security/nss/cmd/zlib/config.mk
@@ -46,17 +46,20 @@ PROGRAM =
# library names, and all special system linking options #
#######################################################################
-SECTOOLS_LIBS = $(LDOPTS) $(LIBSSL) $(LIBPKCS7) $(LIBCERT) $(LIBKEY) $(LIBSECMOD) $(LIBCRYPTO) $(LIBSECUTIL) $(LIBSECMOD) $(LIBSSL) $(LIBPKCS7) $(LIBCERT) $(LIBKEY) $(LIBCRYPTO) $(LIBSECUTIL) $(LIBHASH) $(LIBDBM) $(DLLPLC) $(DLLPLDS) $(DLLPR) $(DLLSYSTEM)
+SECTOOLS_LIBS = $(LDOPTS) $(LIBSSL) $(LIBPKCS7) $(LIBCERT) $(LIBKEY) \
+ $(LIBSECMOD) $(LIBCRYPTO) $(LIBSECUTIL) $(LIBSECMOD) $(LIBSSL) \
+ $(LIBPKCS7) $(LIBCERT) $(LIBKEY) $(LIBCRYPTO) $(LIBSECUTIL) \
+ $(LIBHASH) $(LIBDBM) $(DLLPLC) $(DLLPLDS) $(DLLPR) $(DLLSYSTEM)
-ifeq ($(OS_ARCH),AIX)
+ifeq ($(OS_TARGET),AIX)
OS_LIBS += $(SECTOOLS_LIBS)
endif
-ifeq ($(OS_ARCH),NCR)
+ifeq ($(OS_TARGET),NCR)
OS_LIBS += $(SECTOOLS_LIBS)
endif
-ifeq ($(OS_ARCH),SCO_SV)
+ifeq ($(OS_TARGET),SCO_SV)
OS_LIBS += $(SECTOOLS_LIBS)
endif
diff --git a/security/nss/lib/ckfw/builtins/Makefile b/security/nss/lib/ckfw/builtins/Makefile
index ca036297f..d58e910d9 100644
--- a/security/nss/lib/ckfw/builtins/Makefile
+++ b/security/nss/lib/ckfw/builtins/Makefile
@@ -41,8 +41,8 @@ EXTRA_LIBS = \
$(DIST)/lib/$(LIB_PREFIX)nssb.$(LIB_SUFFIX) \
$(NULL)
-# can't do this in manifest.mn because OS_ARCH isn't defined there.
-ifeq ($(OS_ARCH), WINNT)
+# can't do this in manifest.mn because OS_TARGET isn't defined there.
+ifeq (,$(filter-out WIN%,$(OS_TARGET)))
EXTRA_LIBS += \
$(DIST)/lib/$(NSPR31_LIB_PREFIX)plc4_s.lib \
@@ -71,7 +71,7 @@ generate:
# This'll need some help from a build person.
-ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.1)
+ifeq ($(OS_TARGET)$(OS_RELEASE), AIX4.1)
DSO_LDOPTS = -bM:SRE -bh:4 -bnoentry
EXTRA_DSO_LDOPTS = -lc
MKSHLIB = xlC $(DSO_LDOPTS)
@@ -84,7 +84,7 @@ $(SHARED_LIBRARY): $(OBJS)
endif
-ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.2)
+ifeq ($(OS_TARGET)$(OS_RELEASE), AIX4.2)
LD += -G
endif
diff --git a/security/nss/lib/ckfw/builtins/config.mk b/security/nss/lib/ckfw/builtins/config.mk
index 29063b0fd..cccc96eb8 100644
--- a/security/nss/lib/ckfw/builtins/config.mk
+++ b/security/nss/lib/ckfw/builtins/config.mk
@@ -42,17 +42,17 @@ LIBRARY =
IMPORT_LIBRARY =
PROGRAM =
-ifeq (,$(filter-out OS2 WINNT,$(OS_ARCH)))
- SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).dll
+ifeq (,$(filter-out OS2 WIN%,$(OS_TARGET)))
+ SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).dll
endif
ifdef BUILD_IDG
-DEFINES += -DNSSDEBUG
+ DEFINES += -DNSSDEBUG
endif
#
# To create a loadable module on Darwin, we must use -bundle.
#
-ifeq ($(OS_ARCH),Darwin)
+ifeq ($(OS_TARGET),Darwin)
DSO_LDOPTS := $(subst -dynamiclib,-bundle,$(DSO_LDOPTS))
endif
diff --git a/security/nss/lib/fortcrypt/Makefile b/security/nss/lib/fortcrypt/Makefile
index 32b8df58d..40609cb98 100644
--- a/security/nss/lib/fortcrypt/Makefile
+++ b/security/nss/lib/fortcrypt/Makefile
@@ -37,9 +37,9 @@ include $(CORE_DEPTH)/coreconf/config.mk
include config.mk
CILIB = $(OBJDIR)/cilib.$(LIB_SUFFIX)
-ORIG_CILIB = libci/$(OS_CONFIG).$(LIB_SUFFIX)
+ORIG_CILIB = libci/$(OS_TARGET)$(OS_RELEASE).$(LIB_SUFFIX)
-ifeq ($(OS_ARCH), WINNT)
+ifeq (,$(filter-out WINNT WINCE,$(OS_TARGET))) # omits WIN16 WIN95
ORIG_CILIB = libci/tssp32.lib
endif
@@ -51,7 +51,7 @@ ifeq ($(OS_TARGET), WIN95)
ORIG_CILIB = libci/tssp32.lib
endif
-ifeq ($(OS_ARCH), WINNT)
+ifeq (,$(filter-out WIN%,$(OS_TARGET)))
STUBDLL = $(OBJDIR)/stub.$(DLL_SUFFIX)
endif
@@ -100,14 +100,14 @@ $(CILIB):
$(STUBLIB): $(OBJDIR)/maci$(OBJ_SUFFIX)
@$(MAKE_OBJDIR)
-ifeq ($(OS_ARCH), WINNT)
+ifeq (,$(filter-out WIN%,$(OS_TARGET)))
$(MAKE) $(STUBDLL)
else
$(AR) $<
endif
cp $@ $(CILIB)
-ifeq ($(OS_ARCH), WINNT)
+ifeq (,$(filter-out WIN%,$(OS_TARGET)))
$(STUBDLL): $(OBJDIR)/maci.o
$(LINK_DLL) -MAP $(DLLBASE) $(subst /,\\,$(OBJDIR)/maci.o $(OS_LIBS))
@@ -142,7 +142,7 @@ MD_FILES += $(LIBCI_JAR)
# so I'm going to override their shared library command and build the shared
# library the way config used to.
#
-ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.1)
+ifeq ($(OS_TARGET)$(OS_RELEASE), AIX4.1)
DSO_LDOPTS = -bM:SRE -bh:4 -bnoentry
EXTRA_DSO_LDOPTS = -lc
MKSHLIB = svld $(DSO_LDOPTS)
@@ -154,7 +154,7 @@ $(SHARED_LIBRARY): $(OBJS)
chmod +x $@
endif
-ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.2)
+ifeq ($(OS_TARGET)$(OS_RELEASE), AIX4.2)
LD += -G
endif
diff --git a/security/nss/lib/fortcrypt/swfort/pkcs11/Makefile b/security/nss/lib/fortcrypt/swfort/pkcs11/Makefile
index 8af29d6b5..c148b325c 100644
--- a/security/nss/lib/fortcrypt/swfort/pkcs11/Makefile
+++ b/security/nss/lib/fortcrypt/swfort/pkcs11/Makefile
@@ -36,11 +36,11 @@ include manifest.mn
include $(CORE_DEPTH)/coreconf/config.mk
include config.mk
-
CRYPTO_LIB = $(DIST)/lib/$(LIB_PREFIX)freebl.$(LIB_SUFFIX)
+#SWCILI = ../$(OBJDIR)/$(LIB_PREFIX)swfci.$(LIB_SUFFIX)
-# can't do this in manifest.mn because OS_ARCH isn't defined there.
-ifeq ($(OS_ARCH), WINNT)
+# can't do this in manifest.mn because OS_TARGET isn't defined there.
+ifeq (,$(filter-out WIN%,$(OS_TARGET)))
ifdef MOZILLA_SECURITY_BUILD
CRYPTO_LIB = $(DIST)/lib/crypto.lib
@@ -134,7 +134,7 @@ MD_FILES += $(LIBCI_JAR) $(LIBSWCI_JAR)
#
-ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.1)
+ifeq ($(OS_TARGET)$(OS_RELEASE), AIX4.1)
DSO_LDOPTS = -bM:SRE -bh:4 -bnoentry
EXTRA_DSO_LDOPTS = -lc
MKSHLIB = xlC $(DSO_LDOPTS)
@@ -147,7 +147,7 @@ $(SHARED_LIBRARY): $(OBJS)
endif
-ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.2)
+ifeq ($(OS_TARGET)$(OS_RELEASE), AIX4.2)
LD += -G
endif
diff --git a/security/nss/lib/freebl/Makefile b/security/nss/lib/freebl/Makefile
index 34cbecf84..eaaff9658 100644
--- a/security/nss/lib/freebl/Makefile
+++ b/security/nss/lib/freebl/Makefile
@@ -67,21 +67,23 @@ endif
# des.c wants _X86_ defined for intel CPUs.
# coreconf does this for windows, but not for Linux, FreeBSD, etc.
ifeq ($(CPU_ARCH),x86)
-ifneq ($(OS_ARCH),WINNT)
+ifneq (,$(filter-out WIN%,$(OS_TARGET)))
OS_REL_CFLAGS += -D_X86_
endif
endif
-ifeq ($(OS_ARCH),OSF1)
+ifeq ($(OS_TARGET),OSF1)
DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_NO_MP_WORD
MPI_SRCS += mpvalpha.c
endif
-ifeq ($(OS_ARCH),WINNT)
-ifneq ($(OS_TARGET),WIN16)
+ifeq (,$(filter-out WINNT WIN95,$(OS_TARGET))) #omits WIN16 and WINCE
ASFILES = mpi_x86.asm
DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE -DMP_ASSEMBLY_DIV_2DX1D
endif
+
+ifeq ($(OS_TARGET),WINCE)
+ DEFINES += -DMP_ARGCHK=0 # no assert in WinCE
endif
ifdef XP_OS2_VACPP
@@ -89,7 +91,7 @@ ifdef XP_OS2_VACPP
DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE -DMP_ASSEMBLY_DIV_2DX1D -DMP_USE_UINT_DIGIT -DMP_NO_MP_WORD
endif
-ifeq ($(OS_ARCH),IRIX)
+ifeq ($(OS_TARGET),IRIX)
ifeq ($(USE_N32),1)
ASFILES = mpi_mips.s
ifeq ($(NS_USE_GCC),1)
@@ -110,14 +112,14 @@ ifeq ($(CPU_ARCH),x86)
endif
endif
-ifeq ($(OS_ARCH),AIX)
+ifeq ($(OS_TARGET),AIX)
DEFINES += -DMP_USE_UINT_DIGIT
ifndef USE_64
DEFINES += -DMP_NO_DIV_WORD -DMP_NO_ADD_WORD -DMP_NO_SUB_WORD
endif
endif
-ifeq ($(OS_ARCH), HP-UX)
+ifeq ($(OS_TARGET), HP-UX)
MKSHLIB += +k +vshlibunsats -u FREEBL_GetVector +e FREEBL_GetVector
ifndef FREEBL_EXTENDED_BUILD
ifdef USE_PURE_32
@@ -227,7 +229,7 @@ rijndael_tables:
ifdef MOZILLA_BSAFE_BUILD
private_export::
-ifeq ($(OS_ARCH), WINNT)
+ifeq (,$(filter-out WIN%,$(OS_TARGET)))
rm -f $(DIST)/lib/bsafe$(BSAFEVER).lib
endif
$(NSINSTALL) -R $(BSAFEPATH) $(DIST)/lib
@@ -279,7 +281,7 @@ endif
ifdef FREEBL_EXTENDED_BUILD
-PURE32DIR = $(OBJDIR)/$(OS_ARCH)pure32
+PURE32DIR = $(OBJDIR)/$(OS_TARGET)pure32
ALL_TRASH += $(PURE32DIR)
FILES2LN = \
diff --git a/security/nss/lib/freebl/config.mk b/security/nss/lib/freebl/config.mk
index 77eea20a2..476e7743f 100644
--- a/security/nss/lib/freebl/config.mk
+++ b/security/nss/lib/freebl/config.mk
@@ -36,7 +36,7 @@ ifndef FREEBL_RECURSIVE_BUILD
# we only do this stuff for some of the 32-bit builds, no 64-bit builds
ifndef USE_64
-ifeq ($(OS_ARCH), HP-UX)
+ifeq ($(OS_TARGET), HP-UX)
FREEBL_EXTENDED_BUILD = 1
endif
@@ -83,7 +83,7 @@ TARGETS = $(SHARED_LIBRARY)
LIBRARY =
PROGRAM =
-#ifeq ($(OS_ARCH), HP-UX)
+#ifeq ($(OS_TARGET), HP-UX)
EXTRA_LIBS += \
$(DIST)/lib/libsecutil.$(LIB_SUFFIX) \
$(NULL)
diff --git a/security/nss/lib/nss/config.mk b/security/nss/lib/nss/config.mk
index 78e041dae..4878c39e6 100644
--- a/security/nss/lib/nss/config.mk
+++ b/security/nss/lib/nss/config.mk
@@ -36,8 +36,8 @@
# are specifed as dependencies within rules.mk.
#
-# can't do this in manifest.mn because OS_ARCH isn't defined there.
-ifeq ($(OS_ARCH), WINNT)
+# can't do this in manifest.mn because OS_TARGET isn't defined there.
+ifeq (,$(filter-out WIN%,$(OS_TARGET)))
# don't want the 32 in the shared library name
SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).dll
diff --git a/security/nss/lib/pk11wrap/Makefile b/security/nss/lib/pk11wrap/Makefile
index 4810efd29..a84456e7d 100644
--- a/security/nss/lib/pk11wrap/Makefile
+++ b/security/nss/lib/pk11wrap/Makefile
@@ -77,8 +77,7 @@ export:: private_export
# On AIX 4.3, IBM xlC_r compiler (version 3.6.6) cannot compile
# pk11slot.c in 64-bit mode for unknown reasons. A workaround is
# to compile it with optimizations turned on. (Bugzilla bug #63815)
-ifeq ($(OS_ARCH),AIX)
-ifeq ($(OS_RELEASE),4.3)
+ifeq ($(OS_TARGET)$(OS_RELEASE),AIX4.3)
ifeq ($(USE_64),1)
ifndef BUILD_OPT
$(OBJDIR)/pk11slot.o: pk11slot.c
@@ -87,4 +86,3 @@ $(OBJDIR)/pk11slot.o: pk11slot.c
endif
endif
endif
-endif
diff --git a/security/nss/lib/pki/config.mk b/security/nss/lib/pki/config.mk
index bace96690..9614977ee 100644
--- a/security/nss/lib/pki/config.mk
+++ b/security/nss/lib/pki/config.mk
@@ -37,18 +37,8 @@ ifdef BUILD_IDG
DEFINES += -DNSSDEBUG
endif
-#
-# Override TARGETS variable so that only static libraries
-# are specifed as dependencies within rules.mk.
-#
-
-#TARGETS = $(LIBRARY)
-#SHARED_LIBRARY =
-#IMPORT_LIBRARY =
-#PROGRAM =
-
-# can't do this in manifest.mn because OS_ARCH isn't defined there.
-ifeq ($(OS_ARCH), WINNT)
+# can't do this in manifest.mn because OS_TARGET isn't defined there.
+ifeq (,$(filter-out WIN%,$(OS_TARGET)))
# don't want the 32 in the shared library name
SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).dll
@@ -112,7 +102,7 @@ EXTRA_SHARED_LIBS += \
$(NULL)
endif
-ifeq ($(OS_ARCH),SunOS)
+ifeq ($(OS_TARGET),SunOS)
MAPFILE = $(OBJDIR)/nsspkimap.sun
ALL_TRASH += $(MAPFILE)
MKSHLIB += -M $(MAPFILE)
@@ -125,25 +115,25 @@ endif
endif
endif
-ifeq ($(OS_ARCH),AIX)
+ifeq ($(OS_TARGET),AIX)
MAPFILE = $(OBJDIR)/nsspkimap.aix
ALL_TRASH += $(MAPFILE)
EXPORT_RULES = -bexport:$(MAPFILE)
endif
-ifeq ($(OS_ARCH),HP-UX)
+ifeq ($(OS_TARGET),HP-UX)
MAPFILE = $(OBJDIR)/nsspkimap.hp
ALL_TRASH += $(MAPFILE)
MKSHLIB += -c $(MAPFILE)
endif
-ifeq ($(OS_ARCH), OSF1)
+ifeq ($(OS_TARGET), OSF1)
MAPFILE = $(OBJDIR)/nsspkimap.osf
ALL_TRASH += $(MAPFILE)
MKSHLIB += -hidden -input $(MAPFILE)
endif
-ifeq ($(OS_ARCH),Linux)
+ifeq ($(OS_TARGET),Linux)
MAPFILE = $(OBJDIR)/nsspkimap.linux
ALL_TRASH += $(MAPFILE)
MKSHLIB += -Wl,--version-script,$(MAPFILE)
diff --git a/security/nss/lib/smime/config.mk b/security/nss/lib/smime/config.mk
index ed1e8e596..d67ed0b8a 100644
--- a/security/nss/lib/smime/config.mk
+++ b/security/nss/lib/smime/config.mk
@@ -31,19 +31,9 @@
# GPL.
#
-#
-# Override TARGETS variable so that only static libraries
-# are specifed as dependencies within rules.mk.
-#
-
-#TARGETS = $(LIBRARY)
-#SHARED_LIBRARY =
-#IMPORT_LIBRARY =
-#PROGRAM =
-
RELEASE_LIBS = $(TARGETS)
-ifeq ($(OS_ARCH), WINNT)
+ifeq (,$(filter-out WIN%,$(OS_TARGET)))
# don't want the 32 in the shared library name
SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).dll
diff --git a/security/nss/lib/softoken/Makefile b/security/nss/lib/softoken/Makefile
index 02e3d5079..fa3b20648 100644
--- a/security/nss/lib/softoken/Makefile
+++ b/security/nss/lib/softoken/Makefile
@@ -77,8 +77,7 @@ export:: private_export
# On AIX 4.3, IBM xlC_r compiler (version 3.6.6) cannot compile
# pkcs11c.c in 64-bit mode for unknown reasons. A workaround is
# to compile it with optimizations turned on. (Bugzilla bug #63815)
-ifeq ($(OS_ARCH),AIX)
-ifeq ($(OS_RELEASE),4.3)
+ifeq ($(OS_TARGET)$(OS_RELEASE),AIX4.3)
ifeq ($(USE_64),1)
ifndef BUILD_OPT
$(OBJDIR)/pkcs11.o: pkcs11.c
@@ -90,4 +89,3 @@ $(OBJDIR)/pkcs11c.o: pkcs11c.c
endif
endif
endif
-endif
diff --git a/security/nss/lib/softoken/config.mk b/security/nss/lib/softoken/config.mk
index df7e328fc..f280dec2d 100644
--- a/security/nss/lib/softoken/config.mk
+++ b/security/nss/lib/softoken/config.mk
@@ -31,16 +31,6 @@
# GPL.
#
-#
-# Override TARGETS variable so that only static libraries
-# are specifed as dependencies within rules.mk.
-#
-
-#TARGETS = $(LIBRARY)
-#SHARED_LIBRARY =
-#IMPORT_LIBRARY =
-#PROGRAM =
-
ifdef MOZILLA_CLIENT
DEFINES += -DMOZ_CLIENT
@@ -60,8 +50,8 @@ EXTRA_LIBS += \
$(DIST)/lib/$(LIB_PREFIX)dbm.$(LIB_SUFFIX) \
$(NULL)
-# can't do this in manifest.mn because OS_ARCH isn't defined there.
-ifeq ($(OS_ARCH), WINNT)
+# can't do this in manifest.mn because OS_TARGET isn't defined there.
+ifeq (,$(filter-out WIN%,$(OS_TARGET)))
# don't want the 32 in the shared library name
SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).dll
@@ -96,7 +86,7 @@ EXTRA_SHARED_LIBS += \
$(NULL)
endif
-ifeq ($(OS_ARCH),SunOS)
+ifeq ($(OS_TARGET),SunOS)
ifndef USE_64
ifeq ($(CPU_ARCH),sparc)
# The -R '$ORIGIN' linker option instructs libnss3.so to search for its
diff --git a/security/nss/lib/ssl/Makefile b/security/nss/lib/ssl/Makefile
index fff62966e..9b652250d 100644
--- a/security/nss/lib/ssl/Makefile
+++ b/security/nss/lib/ssl/Makefile
@@ -56,11 +56,11 @@ include $(CORE_DEPTH)/coreconf/config.mk
include config.mk
-ifeq ($(OS_ARCH),WINNT)
+ifeq (,$(filter-out WIN%,$(OS_TARGET)))
CSRCS += win32err.c
DEFINES += -DIN_LIBSSL
else
-ifeq ($(OS_ARCH),OS2)
+ifeq ($(OS_TARGET),OS2)
CSRCS += os2_err.c
else
CSRCS += unix_err.c
diff --git a/security/nss/lib/ssl/config.mk b/security/nss/lib/ssl/config.mk
index f26102698..225257d53 100644
--- a/security/nss/lib/ssl/config.mk
+++ b/security/nss/lib/ssl/config.mk
@@ -31,17 +31,7 @@
# GPL.
#
-#
-# Override TARGETS variable so that only static libraries
-# are specifed as dependencies within rules.mk.
-#
-
-#TARGETS = $(LIBRARY)
-#SHARED_LIBRARY =
-#IMPORT_LIBRARY =
-#PROGRAM =
-
-ifeq ($(OS_ARCH), WINNT)
+ifeq (,$(filter-out WIN%,$(OS_TARGET)))
# don't want the 32 in the shared library name
SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).dll
diff --git a/security/nss/lib/util/Makefile b/security/nss/lib/util/Makefile
index 35c2bfb28..26b783874 100644
--- a/security/nss/lib/util/Makefile
+++ b/security/nss/lib/util/Makefile
@@ -42,14 +42,14 @@ include manifest.mn
# (2) Include "global" configuration information. (OPTIONAL) #
#######################################################################
-include $(CORE_DEPTH)/coreconf/arch.mk
+# include $(CORE_DEPTH)/coreconf/arch.mk
-ifeq ($(OS_ARCH),HP-UX)
+include $(CORE_DEPTH)/coreconf/config.mk
+
+ifeq ($(OS_TARGET),HP-UX)
ASFILES += ret_cr16.s
endif
-include $(CORE_DEPTH)/coreconf/config.mk
-
#######################################################################
# (3) Include "component" configuration information. (OPTIONAL) #
#######################################################################