diff options
author | Moonchild <moonchild@palemoon.org> | 2020-12-09 21:38:33 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-12-09 21:38:33 +0000 |
commit | 3414c329bd855d86c35331f912e3bd5a54439a6e (patch) | |
tree | 66bd00424c95e6b2f62f35fa2e7cf6c5c000aa8b | |
parent | 2e9bdf61802c939008e3ad0582ed7b0124eb9415 (diff) | |
download | uxp-3414c329bd855d86c35331f912e3bd5a54439a6e.tar.gz |
Revert 1629553
182 files changed, 2775 insertions, 331 deletions
diff --git a/security/nss/cmd/crmf-cgi/Makefile b/security/nss/cmd/crmf-cgi/Makefile index 00a6b95dca..f8172689f2 100644 --- a/security/nss/cmd/crmf-cgi/Makefile +++ b/security/nss/cmd/crmf-cgi/Makefile @@ -7,7 +7,11 @@ ####################################################################### # (1) Include initial platform-independent assignments (MANDATORY). # ####################################################################### - +ifeq (,$(filter-out WIN%,$(OS_TARGET))) +EXTRA_LIBS += $(DIST)/lib/crmf.lib +else +EXTRA_LIBS += $(DIST)/lib/libcrmf.$(LIB_SUFFIX) +endif include manifest.mn ####################################################################### @@ -20,11 +24,7 @@ include $(CORE_DEPTH)/coreconf/config.mk # (3) Include "component" configuration information. (OPTIONAL) # ####################################################################### -ifeq (,$(filter-out WIN%,$(OS_TARGET))) -EXTRA_LIBS += $(DIST)/lib/crmf.lib -else -EXTRA_LIBS += $(DIST)/lib/libcrmf.$(LIB_SUFFIX) -endif + ####################################################################### # (4) Include "local" platform-dependent assignments (OPTIONAL). # diff --git a/security/nss/cmd/crmf-cgi/config.mk b/security/nss/cmd/crmf-cgi/config.mk new file mode 100644 index 0000000000..77fca36960 --- /dev/null +++ b/security/nss/cmd/crmf-cgi/config.mk @@ -0,0 +1,16 @@ +# +# 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/. + + +# +# Override TARGETS variable so that only static libraries +# are specifed as dependencies within rules.mk. +# + +TARGETS = $(PROGRAM) +SHARED_LIBRARY = +IMPORT_LIBRARY = +LIBRARY = + diff --git a/security/nss/cmd/crmftest/Makefile b/security/nss/cmd/crmftest/Makefile index 715d0b7d18..369cdc89f9 100644 --- a/security/nss/cmd/crmftest/Makefile +++ b/security/nss/cmd/crmftest/Makefile @@ -20,6 +20,13 @@ include $(CORE_DEPTH)/coreconf/config.mk # (3) Include "component" configuration information. (OPTIONAL) # ####################################################################### + + +####################################################################### +# (4) Include "local" platform-dependent assignments (OPTIONAL). # +####################################################################### +include config.mk + ifeq ($(OS_TARGET)$(OS_RELEASE), AIX4.2) OS_LIBS += -lsvld endif @@ -30,10 +37,6 @@ endif EXTRA_LIBS += $(DIST)/lib/$(LIB_PREFIX)crmf.$(LIB_SUFFIX) -####################################################################### -# (4) Include "local" platform-dependent assignments (OPTIONAL). # -####################################################################### - include ../platlibs.mk ####################################################################### diff --git a/security/nss/cmd/crmftest/config.mk b/security/nss/cmd/crmftest/config.mk new file mode 100644 index 0000000000..9838ef15c3 --- /dev/null +++ b/security/nss/cmd/crmftest/config.mk @@ -0,0 +1,15 @@ +# +# 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/. + +# +# Override TARGETS variable so that only static libraries +# are specifed as dependencies within rules.mk. +# + +TARGETS = $(PROGRAM) +SHARED_LIBRARY = +IMPORT_LIBRARY = +LIBRARY = + diff --git a/security/nss/cmd/lib/Makefile b/security/nss/cmd/lib/Makefile index b1f9d1a31e..94cfb1d7b9 100644 --- a/security/nss/cmd/lib/Makefile +++ b/security/nss/cmd/lib/Makefile @@ -26,6 +26,7 @@ include $(CORE_DEPTH)/coreconf/config.mk # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### +include config.mk include ../platlibs.mk ####################################################################### diff --git a/security/nss/cmd/lib/config.mk b/security/nss/cmd/lib/config.mk new file mode 100644 index 0000000000..b8c03de796 --- /dev/null +++ b/security/nss/cmd/lib/config.mk @@ -0,0 +1,15 @@ +# +# 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/. + +# +# Override TARGETS variable so that only static libraries +# are specifed as dependencies within rules.mk. +# + +TARGETS = $(LIBRARY) +SHARED_LIBRARY = +IMPORT_LIBRARY = +PROGRAM = + diff --git a/security/nss/cmd/lib/manifest.mn b/security/nss/cmd/lib/manifest.mn index 86233e63d7..b3c36b3a98 100644 --- a/security/nss/cmd/lib/manifest.mn +++ b/security/nss/cmd/lib/manifest.mn @@ -5,7 +5,6 @@ CORE_DEPTH = ../.. LIBRARY_NAME = sectool -SHARED_LIBRARY = $(NULL) # MODULE public and private header directories are implicitly REQUIRED. MODULE = nss diff --git a/security/nss/cmd/libpkix/config.mk b/security/nss/cmd/libpkix/config.mk new file mode 100644 index 0000000000..672f6ff872 --- /dev/null +++ b/security/nss/cmd/libpkix/config.mk @@ -0,0 +1,9 @@ +# +# 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/. + +TARGETS = $(LIBRARY) +SHARED_LIBRARY = +IMPORT_LIBRARY = +PROGRAM = diff --git a/security/nss/cmd/libpkix/perf/Makefile b/security/nss/cmd/libpkix/perf/Makefile index 3181547e2c..b7241027d0 100755 --- a/security/nss/cmd/libpkix/perf/Makefile +++ b/security/nss/cmd/libpkix/perf/Makefile @@ -20,6 +20,8 @@ include $(CORE_DEPTH)/coreconf/config.mk # (3) Include "component" configuration information. (OPTIONAL) # ####################################################################### +include $(PKIX_DEPTH)/config.mk + ####################################################################### # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### diff --git a/security/nss/cmd/libpkix/perf/manifest.mn b/security/nss/cmd/libpkix/perf/manifest.mn index f70040234a..005c96caaf 100755 --- a/security/nss/cmd/libpkix/perf/manifest.mn +++ b/security/nss/cmd/libpkix/perf/manifest.mn @@ -15,7 +15,6 @@ CSRCS = libpkix_buildthreads.c \ $(NULL) LIBRARY_NAME = pkixtoolperf -SHARED_LIBRARY = $(NULL) SOURCE_LIB_DIR = $(PKIX_DEPTH)/$(OBJDIR) diff --git a/security/nss/cmd/libpkix/pkix/Makefile b/security/nss/cmd/libpkix/pkix/Makefile index 1de5ef2694..ab4ffbda5c 100755 --- a/security/nss/cmd/libpkix/pkix/Makefile +++ b/security/nss/cmd/libpkix/pkix/Makefile @@ -20,6 +20,8 @@ include $(CORE_DEPTH)/coreconf/config.mk # (3) Include "component" configuration information. (OPTIONAL) # ####################################################################### +include $(PKIX_DEPTH)/config.mk + ####################################################################### # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### diff --git a/security/nss/cmd/libpkix/pkix/certsel/Makefile b/security/nss/cmd/libpkix/pkix/certsel/Makefile index 802e7729d9..09ca5f1c6e 100755 --- a/security/nss/cmd/libpkix/pkix/certsel/Makefile +++ b/security/nss/cmd/libpkix/pkix/certsel/Makefile @@ -20,6 +20,8 @@ include $(CORE_DEPTH)/coreconf/config.mk # (3) Include "component" configuration information. (OPTIONAL) # ####################################################################### +include $(PKIX_DEPTH)/config.mk + ####################################################################### # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### diff --git a/security/nss/cmd/libpkix/pkix/certsel/manifest.mn b/security/nss/cmd/libpkix/pkix/certsel/manifest.mn index d9da6e1674..2e8198cb34 100755 --- a/security/nss/cmd/libpkix/pkix/certsel/manifest.mn +++ b/security/nss/cmd/libpkix/pkix/certsel/manifest.mn @@ -14,8 +14,7 @@ CSRCS = test_certselector.c \ test_comcertselparams.c \ $(NULL) -LIBRARY_NAME = pkixtoolcertsel -SHARED_LIBRARY = $(NULL) +LIBRARY_NAME=pkixtoolcertsel SOURCE_LIB_DIR=$(PKIX_DEPTH)/$(OBJDIR) diff --git a/security/nss/cmd/libpkix/pkix/checker/Makefile b/security/nss/cmd/libpkix/pkix/checker/Makefile index 802e7729d9..09ca5f1c6e 100755 --- a/security/nss/cmd/libpkix/pkix/checker/Makefile +++ b/security/nss/cmd/libpkix/pkix/checker/Makefile @@ -20,6 +20,8 @@ include $(CORE_DEPTH)/coreconf/config.mk # (3) Include "component" configuration information. (OPTIONAL) # ####################################################################### +include $(PKIX_DEPTH)/config.mk + ####################################################################### # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### diff --git a/security/nss/cmd/libpkix/pkix/checker/manifest.mn b/security/nss/cmd/libpkix/pkix/checker/manifest.mn index 54e1486e68..3101e02e24 100755 --- a/security/nss/cmd/libpkix/pkix/checker/manifest.mn +++ b/security/nss/cmd/libpkix/pkix/checker/manifest.mn @@ -12,8 +12,7 @@ MODULE = nss CSRCS = test_certchainchecker.c -LIBRARY_NAME = pkixtoolchecker -SHARED_LIBRARY = $(NULL) +LIBRARY_NAME=pkixtoolchecker SOURCE_LIB_DIR=$(PKIX_DEPTH)/$(OBJDIR) diff --git a/security/nss/cmd/libpkix/pkix/crlsel/Makefile b/security/nss/cmd/libpkix/pkix/crlsel/Makefile index 802e7729d9..09ca5f1c6e 100755 --- a/security/nss/cmd/libpkix/pkix/crlsel/Makefile +++ b/security/nss/cmd/libpkix/pkix/crlsel/Makefile @@ -20,6 +20,8 @@ include $(CORE_DEPTH)/coreconf/config.mk # (3) Include "component" configuration information. (OPTIONAL) # ####################################################################### +include $(PKIX_DEPTH)/config.mk + ####################################################################### # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### diff --git a/security/nss/cmd/libpkix/pkix/crlsel/manifest.mn b/security/nss/cmd/libpkix/pkix/crlsel/manifest.mn index 3b13298aa6..dfac43bb52 100755 --- a/security/nss/cmd/libpkix/pkix/crlsel/manifest.mn +++ b/security/nss/cmd/libpkix/pkix/crlsel/manifest.mn @@ -14,8 +14,7 @@ CSRCS = test_crlselector.c \ test_comcrlselparams.c \ $(NULL) -LIBRARY_NAME = pkixtoolcrlsel -SHARED_LIBRARY = $(NULL) +LIBRARY_NAME=pkixtoolcrlsel SOURCE_LIB_DIR=$(PKIX_DEPTH)/$(OBJDIR) diff --git a/security/nss/cmd/libpkix/pkix/params/Makefile b/security/nss/cmd/libpkix/pkix/params/Makefile index 802e7729d9..09ca5f1c6e 100755 --- a/security/nss/cmd/libpkix/pkix/params/Makefile +++ b/security/nss/cmd/libpkix/pkix/params/Makefile @@ -20,6 +20,8 @@ include $(CORE_DEPTH)/coreconf/config.mk # (3) Include "component" configuration information. (OPTIONAL) # ####################################################################### +include $(PKIX_DEPTH)/config.mk + ####################################################################### # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### diff --git a/security/nss/cmd/libpkix/pkix/params/manifest.mn b/security/nss/cmd/libpkix/pkix/params/manifest.mn index c7629a6207..a2e7e675be 100755 --- a/security/nss/cmd/libpkix/pkix/params/manifest.mn +++ b/security/nss/cmd/libpkix/pkix/params/manifest.mn @@ -16,8 +16,7 @@ CSRCS = test_procparams.c \ test_resourcelimits.c \ $(NULL) -LIBRARY_NAME = pkixtoolparams -SHARED_LIBRARY = $(NULL) +LIBRARY_NAME=pkixtoolparams SOURCE_LIB_DIR=$(PKIX_DEPTH)/$(OBJDIR) diff --git a/security/nss/cmd/libpkix/pkix/results/Makefile b/security/nss/cmd/libpkix/pkix/results/Makefile index 802e7729d9..09ca5f1c6e 100755 --- a/security/nss/cmd/libpkix/pkix/results/Makefile +++ b/security/nss/cmd/libpkix/pkix/results/Makefile @@ -20,6 +20,8 @@ include $(CORE_DEPTH)/coreconf/config.mk # (3) Include "component" configuration information. (OPTIONAL) # ####################################################################### +include $(PKIX_DEPTH)/config.mk + ####################################################################### # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### diff --git a/security/nss/cmd/libpkix/pkix/results/manifest.mn b/security/nss/cmd/libpkix/pkix/results/manifest.mn index 7e4caeac60..5a8b936924 100755 --- a/security/nss/cmd/libpkix/pkix/results/manifest.mn +++ b/security/nss/cmd/libpkix/pkix/results/manifest.mn @@ -16,8 +16,7 @@ CSRCS = test_buildresult.c \ test_valresult.c \ $(NULL) -LIBRARY_NAME = pkixtoolresults -SHARED_LIBRARY = $(NULL) +LIBRARY_NAME=pkixtoolresults SOURCE_LIB_DIR=$(PKIX_DEPTH)/$(OBJDIR) diff --git a/security/nss/cmd/libpkix/pkix/store/Makefile b/security/nss/cmd/libpkix/pkix/store/Makefile index 802e7729d9..09ca5f1c6e 100755 --- a/security/nss/cmd/libpkix/pkix/store/Makefile +++ b/security/nss/cmd/libpkix/pkix/store/Makefile @@ -20,6 +20,8 @@ include $(CORE_DEPTH)/coreconf/config.mk # (3) Include "component" configuration information. (OPTIONAL) # ####################################################################### +include $(PKIX_DEPTH)/config.mk + ####################################################################### # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### diff --git a/security/nss/cmd/libpkix/pkix/store/manifest.mn b/security/nss/cmd/libpkix/pkix/store/manifest.mn index b939ffdcfd..566a346848 100755 --- a/security/nss/cmd/libpkix/pkix/store/manifest.mn +++ b/security/nss/cmd/libpkix/pkix/store/manifest.mn @@ -12,8 +12,7 @@ MODULE = nss CSRCS = test_store.c -LIBRARY_NAME = pkixtoolstore -SHARED_LIBRARY = $(NULL) +LIBRARY_NAME=pkixtoolstore SOURCE_LIB_DIR=$(PKIX_DEPTH)/$(OBJDIR) diff --git a/security/nss/cmd/libpkix/pkix/top/Makefile b/security/nss/cmd/libpkix/pkix/top/Makefile index 802e7729d9..09ca5f1c6e 100755 --- a/security/nss/cmd/libpkix/pkix/top/Makefile +++ b/security/nss/cmd/libpkix/pkix/top/Makefile @@ -20,6 +20,8 @@ include $(CORE_DEPTH)/coreconf/config.mk # (3) Include "component" configuration information. (OPTIONAL) # ####################################################################### +include $(PKIX_DEPTH)/config.mk + ####################################################################### # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### diff --git a/security/nss/cmd/libpkix/pkix/top/manifest.mn b/security/nss/cmd/libpkix/pkix/top/manifest.mn index 8840204f7f..a7d997dfba 100755 --- a/security/nss/cmd/libpkix/pkix/top/manifest.mn +++ b/security/nss/cmd/libpkix/pkix/top/manifest.mn @@ -26,8 +26,7 @@ CSRCS = test_basicchecker.c \ test_validatechain_NB.c \ $(NULL) -LIBRARY_NAME = pkixtooltop -SHARED_LIBRARY = $(NULL) +LIBRARY_NAME=pkixtooltop SOURCE_LIB_DIR=$(PKIX_DEPTH)/$(OBJDIR) diff --git a/security/nss/cmd/libpkix/pkix/util/Makefile b/security/nss/cmd/libpkix/pkix/util/Makefile index 802e7729d9..09ca5f1c6e 100755 --- a/security/nss/cmd/libpkix/pkix/util/Makefile +++ b/security/nss/cmd/libpkix/pkix/util/Makefile @@ -20,6 +20,8 @@ include $(CORE_DEPTH)/coreconf/config.mk # (3) Include "component" configuration information. (OPTIONAL) # ####################################################################### +include $(PKIX_DEPTH)/config.mk + ####################################################################### # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### diff --git a/security/nss/cmd/libpkix/pkix/util/manifest.mn b/security/nss/cmd/libpkix/pkix/util/manifest.mn index c7790c401b..7dbeb6d47f 100755 --- a/security/nss/cmd/libpkix/pkix/util/manifest.mn +++ b/security/nss/cmd/libpkix/pkix/util/manifest.mn @@ -16,8 +16,7 @@ CSRCS = test_error.c \ test_logger.c \ $(NULL) -LIBRARY_NAME = pkixtoolutil -SHARED_LIBRARY = $(NULL) +LIBRARY_NAME=pkixtoolutil SOURCE_LIB_DIR=$(PKIX_DEPTH)/$(OBJDIR) diff --git a/security/nss/cmd/libpkix/pkix_pl/Makefile b/security/nss/cmd/libpkix/pkix_pl/Makefile index 1de5ef2694..ab4ffbda5c 100755 --- a/security/nss/cmd/libpkix/pkix_pl/Makefile +++ b/security/nss/cmd/libpkix/pkix_pl/Makefile @@ -20,6 +20,8 @@ include $(CORE_DEPTH)/coreconf/config.mk # (3) Include "component" configuration information. (OPTIONAL) # ####################################################################### +include $(PKIX_DEPTH)/config.mk + ####################################################################### # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### diff --git a/security/nss/cmd/libpkix/pkix_pl/module/Makefile b/security/nss/cmd/libpkix/pkix_pl/module/Makefile index 802e7729d9..09ca5f1c6e 100755 --- a/security/nss/cmd/libpkix/pkix_pl/module/Makefile +++ b/security/nss/cmd/libpkix/pkix_pl/module/Makefile @@ -20,6 +20,8 @@ include $(CORE_DEPTH)/coreconf/config.mk # (3) Include "component" configuration information. (OPTIONAL) # ####################################################################### +include $(PKIX_DEPTH)/config.mk + ####################################################################### # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### diff --git a/security/nss/cmd/libpkix/pkix_pl/module/manifest.mn b/security/nss/cmd/libpkix/pkix_pl/module/manifest.mn index 50d20d0bb4..eedc934494 100755 --- a/security/nss/cmd/libpkix/pkix_pl/module/manifest.mn +++ b/security/nss/cmd/libpkix/pkix_pl/module/manifest.mn @@ -17,8 +17,7 @@ CSRCS = test_colcertstore.c \ test_httpcertstore.c \ $(NULL) -LIBRARY_NAME = pkixtoolmodule -SHARED_LIBRARY = $(NULL) +LIBRARY_NAME=pkixtoolmodule SOURCE_LIB_DIR=$(PKIX_DEPTH)/$(OBJDIR) diff --git a/security/nss/cmd/libpkix/pkix_pl/pki/Makefile b/security/nss/cmd/libpkix/pkix_pl/pki/Makefile index 802e7729d9..09ca5f1c6e 100755 --- a/security/nss/cmd/libpkix/pkix_pl/pki/Makefile +++ b/security/nss/cmd/libpkix/pkix_pl/pki/Makefile @@ -20,6 +20,8 @@ include $(CORE_DEPTH)/coreconf/config.mk # (3) Include "component" configuration information. (OPTIONAL) # ####################################################################### +include $(PKIX_DEPTH)/config.mk + ####################################################################### # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### diff --git a/security/nss/cmd/libpkix/pkix_pl/pki/manifest.mn b/security/nss/cmd/libpkix/pkix_pl/pki/manifest.mn index 15fae7bb5f..7c6e0a76da 100755 --- a/security/nss/cmd/libpkix/pkix_pl/pki/manifest.mn +++ b/security/nss/cmd/libpkix/pkix_pl/pki/manifest.mn @@ -21,8 +21,7 @@ CSRCS = test_cert.c \ test_subjectinfoaccess.c \ $(NULL) -LIBRARY_NAME = pkixtoolpki -SHARED_LIBRARY = $(NULL) +LIBRARY_NAME=pkixtoolpki SOURCE_LIB_DIR=$(PKIX_DEPTH)/$(OBJDIR) diff --git a/security/nss/cmd/libpkix/pkix_pl/system/Makefile b/security/nss/cmd/libpkix/pkix_pl/system/Makefile index 802e7729d9..09ca5f1c6e 100755 --- a/security/nss/cmd/libpkix/pkix_pl/system/Makefile +++ b/security/nss/cmd/libpkix/pkix_pl/system/Makefile @@ -20,6 +20,8 @@ include $(CORE_DEPTH)/coreconf/config.mk # (3) Include "component" configuration information. (OPTIONAL) # ####################################################################### +include $(PKIX_DEPTH)/config.mk + ####################################################################### # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### diff --git a/security/nss/cmd/libpkix/pkix_pl/system/manifest.mn b/security/nss/cmd/libpkix/pkix_pl/system/manifest.mn index 52bb34ece0..edbf0cda88 100755 --- a/security/nss/cmd/libpkix/pkix_pl/system/manifest.mn +++ b/security/nss/cmd/libpkix/pkix_pl/system/manifest.mn @@ -30,8 +30,8 @@ CSRCS = test_bigint.c \ test_string2.c \ $(NULL) -LIBRARY_NAME = pkixtoolsys -SHARED_LIBRARY = $(NULL) + +LIBRARY_NAME=pkixtoolsys SOURCE_LIB_DIR=$(PKIX_DEPTH)/$(OBJDIR) diff --git a/security/nss/cmd/libpkix/testutil/config.mk b/security/nss/cmd/libpkix/testutil/config.mk index f1f6674f90..820dbb2d47 100644 --- a/security/nss/cmd/libpkix/testutil/config.mk +++ b/security/nss/cmd/libpkix/testutil/config.mk @@ -5,4 +5,11 @@ # don't build the static library LIBRARY = -RES = + +ifeq (,$(filter-out WIN%,$(OS_TARGET))) + +# don't want the 32 in the shared library name +SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX) +IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX) + +endif diff --git a/security/nss/cmd/libpkix/testutil/manifest.mn b/security/nss/cmd/libpkix/testutil/manifest.mn index 184085b1b1..2f831fcd62 100755 --- a/security/nss/cmd/libpkix/testutil/manifest.mn +++ b/security/nss/cmd/libpkix/testutil/manifest.mn @@ -20,7 +20,6 @@ CSRCS = \ $(NULL) LIBRARY_NAME = pkixtooltestutil -SHARED_LIBRARY = $(NULL) SOURCE_LIB_DIR = $(PKIX_DEPTH)/$(OBJDIR) diff --git a/security/nss/coreconf/OS2.mk b/security/nss/coreconf/OS2.mk index 4aa40eb6a3..ff7dd93295 100644 --- a/security/nss/coreconf/OS2.mk +++ b/security/nss/coreconf/OS2.mk @@ -136,10 +136,6 @@ ifndef DLL_PREFIX DLL_PREFIX = $(NULL) endif -ifndef IMPORT_LIB_SUFFIX - IMPORT_LIB_SUFFIX = .$(LIB_SUFFIX) -endif - # # override the TARGETS defined in ruleset.mk, adding IMPORT_LIBRARY # @@ -147,3 +143,8 @@ 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/nss/coreconf/OpenUNIX.mk b/security/nss/coreconf/OpenUNIX.mk index 1afc80ac75..209ca410e1 100644 --- a/security/nss/coreconf/OpenUNIX.mk +++ b/security/nss/coreconf/OpenUNIX.mk @@ -55,3 +55,6 @@ PROCESS_MAP_FILE = cp $< $@ BUILD_UNIX_PLUGINS = 1 #DSO_LDOPTS += -b elf -G -z defs DSO_LDOPTS += -G + +# Used for Java compiler +EXPORT_FLAGS += -W l,-Bexport diff --git a/security/nss/coreconf/README b/security/nss/coreconf/README index 9d4c9e4547..15a77b2253 100644 --- a/security/nss/coreconf/README +++ b/security/nss/coreconf/README @@ -291,6 +291,13 @@ OVERVIEW of "rules.mk": CATEGORY/rule:: Purpose =================== ======================================= + $(PUBLIC_EXPORT_DIR):: create directory used to + house public "C" header files + + $(PRIVATE_EXPORT_DIR):: create directory used to + house private "C" header + files + GENERAL ------- all:: "default" all-encompassing rule which @@ -337,6 +344,12 @@ OVERVIEW of "rules.mk": clobber_all:: synonym for "realclean::" rule + IMPORT + ------ + import:: uses perl script to retrieve specified + VERSION of the binary release from + $(RELEASE_TREE) + RELEASE ------- release_clean:: remove all files from the @@ -358,6 +371,18 @@ OVERVIEW of "rules.mk": $(SOURCE_RELEASE_PREFIX)/ $(SOURCE_RELEASE_BIN_DIR) directory + release_jars:: use perl script to package appropriate + files in the $(XPCLASS_JAR), + $(XPHEADER_JAR), $(MDHEADER_JAR), and + $(MDBINARY_JAR) jar files + + release_cpdistdir:: use perl script to copy the + $(XPCLASS_JAR), $(XPHEADER_JAR), + $(MDHEADER_JAR), and $(MDBINARY_JAR) + jar files to the specified VERSION + of the $(RELEASE_TREE) directory + + TOOLS and AUTOMATION -------------------- diff --git a/security/nss/coreconf/SCO_SV3.2.mk b/security/nss/coreconf/SCO_SV3.2.mk index 813603f265..e0b9fe8568 100644 --- a/security/nss/coreconf/SCO_SV3.2.mk +++ b/security/nss/coreconf/SCO_SV3.2.mk @@ -55,3 +55,6 @@ PROCESS_MAP_FILE = cp $< $@ BUILD_UNIX_PLUGINS = 1 #DSO_LDOPTS += -b elf -G -z defs DSO_LDOPTS += -b elf -G + +# Used for Java compiler +EXPORT_FLAGS += -W l,-Bexport diff --git a/security/nss/coreconf/WIN32.mk b/security/nss/coreconf/WIN32.mk index 9e04ad93e4..a02fddbfa8 100644 --- a/security/nss/coreconf/WIN32.mk +++ b/security/nss/coreconf/WIN32.mk @@ -359,6 +359,15 @@ ifneq ($(CPU_ARCH),x386) 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 diff --git a/security/nss/coreconf/config.mk b/security/nss/coreconf/config.mk index 2f7b63896d..6927a2866d 100644 --- a/security/nss/coreconf/config.mk +++ b/security/nss/coreconf/config.mk @@ -122,6 +122,14 @@ 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 # ####################################################################### ifndef MK_RULESET diff --git a/security/nss/coreconf/cpdist.pl b/security/nss/coreconf/cpdist.pl new file mode 100644 index 0000000000..800edfb466 --- /dev/null +++ b/security/nss/coreconf/cpdist.pl @@ -0,0 +1,167 @@ +#! /usr/local/bin/perl +# +# 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/. +require('coreconf.pl'); + +#######-- read in variables on command line into %var + +&parse_argv; + +### do the copy + +print STDERR "RELEASE TREE / MODULE = $var{RELEASE_TREE} $var{MODULE}\n"; + + + +# 1 +if ($var{RELEASE} eq "") { exit; } # Can't do release here, so exit. + +# 2 +#if (! ($var{RELEASE} =~ /\//)) { # if no specific version is specified in RELEASE variable +# $component = $var{RELEASE}; +#} +#else { # if a subcomponent/version is given in the RELEASE variable +# $var{RELEASE} =~ m|^([^/]*)/|; +# $component = $1; # everything before the first slash; +# } + +# 3 +$path = $var{RELEASE}; + + +# 4 +# find out what directory we would create for 'today' + +$year = (localtime)[5] + 1900; +$month = (localtime)[4] + 1; +$day = (localtime)[3]; +$today = sprintf( "%d%02d%02d", $year, $month, $day ); + +# 5 +# if version is null, then set the version to today. +if ($var{"RELEASE_VERSION"} eq "") { + $var{"RELEASE_VERSION"} = $today; +} + +#6 +$version = $var{"RELEASE_VERSION"}; # set RELEASE_VERSION to passed in variable + +#7 +# if version is today, then we will want to make a 'current' link. + +if ($version eq $today) { + $create_current = 1; +} + +#8 +# version can be a) passed in value from command line, b) value in manifest.mn +# or c) computed value such as '19970909' + + +$dir = "$var{'RELEASE_TREE'}/$path"; + +#9 +if (! (-e "$dir/$version" && -d "$dir/$version")) { + print "making dir $dir \n"; + &rec_mkdir("$dir/$version"); +} + + + +print "version = $version\n"; +print "path = $path\n"; +print "var{release_tree} = $var{'RELEASE_TREE'}\n"; +print "dir = $dir = RELEASE_TREE/path\n"; + + +#10 +if ($create_current == 1) { + +# unlinking and linking always occurs, even if the link is correct + print "unlinking $dir/current\n"; + unlink("$dir/current"); + + print "putting version number $today into 'current' file.."; + + open(FILE,">$dir/current") || die " couldn't open current\n"; + print FILE "$today\n"; + close(FILE); + print " ..done\n" + +} + +&rec_mkdir("$dir/$version/$var{'RELEASE_MD_DIR'}"); +&rec_mkdir("$dir/$version/$var{'RELEASE_XP_DIR'}"); + + + + +foreach $jarfile (split(/ /,$var{FILES}) ) { + print STDERR "---------------------------------------------\n"; + + $jarinfo = $var{$jarfile}; + + ($jardir,$jaropts) = split(/\|/,$jarinfo); + + if ($jaropts =~ /f/) { + print STDERR "Copying files $jardir....\n"; + } + else { + print STDERR "Copying jar file $jarfile....\n"; + } + + print "jaropts = $jaropts\n"; + + if ($jaropts =~ /m/) { + $destdir = $var{"RELEASE_MD_DIR"}; + print "found m, using MD dir $destdir\n"; + } + elsif ($jaropts =~ /x/) { + $destdir = $var{"RELEASE_XP_DIR"}; + print "found x, using XP dir $destdir\n"; + } + else { + die "Error: must specify m or x in jar options in $jarinfo line\n"; + } + + + $distdir = "$dir/$version/$destdir"; + + + + if ($jaropts =~ /f/) { + + print "splitting: \"$jardir\"\n"; + for $srcfile (split(/ /,$jardir)) { + +#if srcfile has a slash + if ($srcfile =~ m|/|) { +#pull out everything before the last slash into $1 + $srcfile =~ m|(.*)/|; + $distsubdir = "/$1"; + print "making dir $distdir$distsubdir\n"; + &rec_mkdir("$distdir$distsubdir"); + } + print "copy: from $srcfile\n"; + print " to $distdir$distsubdir\n"; + $srcprefix = ""; + if ($jaropts =~/m/) { + $srcprefix = "$var{'PLATFORM'}/"; + } + system("cp $srcprefix$srcfile $distdir$distsubdir"); + } + } + else { + $srcfile = "$var{SOURCE_RELEASE_PREFIX}/$jardir/$jarfile"; + + print "copy: from $srcfile\n"; + print " to $distdir\n"; + + system("cp $srcfile $distdir"); + + } + + } + diff --git a/security/nss/coreconf/import.pl b/security/nss/coreconf/import.pl new file mode 100644 index 0000000000..dd2d177f68 --- /dev/null +++ b/security/nss/coreconf/import.pl @@ -0,0 +1,189 @@ +#! /usr/local/bin/perl +# +# 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/. + +print STDERR "import.pl\n"; + +require('coreconf.pl'); + + +$returncode =0; + + +#######-- read in variables on command line into %var + +$var{UNZIP} = "unzip -o"; + +&parse_argv; + +if (! ($var{IMPORTS} =~ /\w/)) { + print STDERR "nothing to import\n"; +} + +######-- Do the import! + +foreach $import (split(/ /,$var{IMPORTS}) ) { + + print STDERR "\n\nIMPORTING .... $import\n-----------------------------\n"; + + +# if a specific version specified in IMPORT variable +# (if $import has a slash in it) + + if ($import =~ /\//) { + # $component=everything before the first slash of $import + + $import =~ m|^([^/]*)/|; + $component = $1; + + $import =~ m|^(.*)/([^/]*)$|; + + # $path=everything before the last slash of $import + $path = $1; + + # $version=everything after the last slash of $import + $version = $2; + + if ($var{VERSION} ne "current") { + $version = $var{VERSION}; + } + } + else { + $component = $import; + $path = $import; + $version = $var{VERSION}; + } + + $releasejardir = "$var{RELEASE_TREE}/$path"; + if ($version eq "current") { + print STDERR "Current version specified. Reading 'current' file ... \n"; + + open(CURRENT,"$releasejardir/current") || die "NO CURRENT FILE\n"; + $version = <CURRENT>; + $version =~ s/(\r?\n)*$//; # remove any trailing [CR/]LF's + close(CURRENT); + print STDERR "Using version $version\n"; + if ( $version eq "") { + die "Current version file empty. Stopping\n"; + } + } + + $releasejardir = "$releasejardir/$version"; + if ( ! -d $releasejardir) { + die "$releasejardir doesn't exist (Invalid Version?)\n"; + } + foreach $jarfile (split(/ /,$var{FILES})) { + + ($relpath,$distpath,$options) = split(/\|/, $var{$jarfile}); + + if ($var{'OVERRIDE_IMPORT_CHECK'} eq 'YES') { + $options =~ s/v//g; + } + + if ( $relpath ne "") { $releasejarpathname = "$releasejardir/$relpath";} + else { $releasejarpathname = $releasejardir; } + +# If a component doesn't have IDG versions, import the DBG ones + if( ! -e "$releasejarpathname/$jarfile" ) { + if( $relpath =~ /IDG\.OBJ$/ ) { + $relpath =~ s/IDG.OBJ/DBG.OBJ/; + $releasejarpathname = "$releasejardir/$relpath"; + } elsif( $relpath =~ /IDG\.OBJD$/ ) { + $relpath =~ s/IDG.OBJD/DBG.OBJD/; + $releasejarpathname = "$releasejardir/$relpath"; + } + } + + if (-e "$releasejarpathname/$jarfile") { + print STDERR "\nWorking on jarfile: $jarfile\n"; + + if ($distpath =~ m|/$|) { + $distpathname = "$distpath$component"; + } + else { + $distpathname = "$distpath"; + } + + +#the block below is used to determine whether or not the xp headers have +#already been imported for this component + + $doimport = 1; + if ($options =~ /v/) { # if we should check the imported version + print STDERR "Checking if version file exists $distpathname/version\n"; + if (-e "$distpathname/version") { + open( VFILE, "<$distpathname/version") || + die "Cannot open $distpathname/version for reading. Permissions?\n"; + $importversion = <VFILE>; + close (VFILE); + $importversion =~ s/\r?\n$//; # Strip off any trailing CR/LF + if ($version eq $importversion) { + print STDERR "$distpathname version '$importversion' already imported. Skipping...\n"; + $doimport =0; + } + } + } + + if ($doimport == 1) { + if (! -d "$distpathname") { + &rec_mkdir("$distpathname"); + } + # delete the stuff in there already. + # (this should really be recursive delete.) + + if ($options =~ /v/) { + $remheader = "\nREMOVING files in '$distpathname/' :"; + opendir(DIR,"$distpathname") || + die ("Cannot read directory $distpathname\n"); + @filelist = readdir(DIR); + closedir(DIR); + foreach $file ( @filelist ) { + if (! ($file =~ m!/.?.$!) ) { + if (! (-d $file)) { + $file =~ m!([^/]*)$!; + print STDERR "$remheader $1"; + $remheader = " "; + unlink "$distpathname/$file"; + } + } + } + } + + + print STDERR "\n\n"; + + print STDERR "\nExtracting jarfile '$jarfile' to local directory $distpathname/\n"; + + print STDERR "$var{UNZIP} $releasejarpathname/$jarfile -d $distpathname\n"; + system("$var{UNZIP} $releasejarpathname/$jarfile -d $distpathname"); + + $r = $?; + + if ($options =~ /v/) { + if ($r == 0) { + unlink ("$distpathname/version"); + if (open(VFILE,">$distpathname/version")) { + print VFILE "$version\n"; + close(VFILE); + } + } + else { + print STDERR "Could not create '$distpathname/version'. Permissions?\n"; + $returncode ++; + } + } + } # if (doimport) + } # if (-e releasejarpathname/jarfile) + } # foreach jarfile) +} # foreach IMPORT + + + +exit($returncode); + + + + + diff --git a/security/nss/coreconf/jdk.mk b/security/nss/coreconf/jdk.mk new file mode 100644 index 0000000000..92eb0e6f35 --- /dev/null +++ b/security/nss/coreconf/jdk.mk @@ -0,0 +1,504 @@ +# +# 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/. + +ifdef NS_USE_JDK +####################################################################### +# [1] Define preliminary JDK "Core Components" toolset options # +####################################################################### + +# set default JDK java threading model +ifeq ($(JDK_THREADING_MODEL),) + JDK_THREADING_MODEL = native_threads +# no such thing as -native flag + JDK_THREADING_MODEL_OPT = +endif + +####################################################################### +# [2] Define platform-independent JDK "Core Components" options # +####################################################################### + +# set default location of the java classes repository +ifeq ($(JAVA_DESTPATH),) +ifdef BUILD_OPT + JAVA_DESTPATH = $(SOURCE_CLASSES_DIR) +else + JAVA_DESTPATH = $(SOURCE_CLASSES_DBG_DIR) +endif +endif + +# set default location of the package under the java classes repository +# note that this overrides the default package value in ruleset.mk +ifeq ($(PACKAGE),) + PACKAGE = . +endif + +# set default location of the java source code repository +ifeq ($(JAVA_SOURCEPATH),) + JAVA_SOURCEPATH = . +endif + +# add JNI directory to default include search path +ifneq ($(JNI_GEN),) + ifdef NSBUILDROOT + INCLUDES += -I$(JNI_GEN_DIR) -I$(SOURCE_XP_DIR) + else + INCLUDES += -I$(JNI_GEN_DIR) + endif +endif + +####################################################################### +# [3] Define platform-dependent JDK "Core Components" options # +####################################################################### + +# set [Microsoft Windows] platforms +ifeq ($(OS_ARCH), WINNT) + JAVA_CLASSES = $(JAVA_HOME)/jre/lib/rt.jar + + ifeq ($(JRE_HOME),) + JRE_HOME = $(JAVA_HOME) + JRE_CLASSES = $(JAVA_CLASSES) + else + ifeq ($(JRE_CLASSES),) + JRE_CLASSES = $(JRE_HOME)/lib/rt.jar + endif + endif + + PATH_SEPARATOR = ; + + # (2) specify "header" information + JAVA_ARCH = win32 + + INCLUDES += -I$(JAVA_HOME)/include + INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH) + + # currently, disable JIT option on this platform + JDK_JIT_OPT = -nojit +endif + +# set [Sun Solaris] platforms +ifeq ($(OS_ARCH), SunOS) + JAVA_CLASSES = $(JAVA_HOME)/jre/lib/rt.jar + + ifeq ($(JRE_HOME),) + JRE_HOME = $(JAVA_HOME) + JRE_CLASSES = $(JAVA_CLASSES) + else + ifeq ($(JRE_CLASSES),) + JRE_CLASSES = $(JRE_HOME)/lib/rt.jar + endif + endif + + PATH_SEPARATOR = : + + # (2) specify "header" information + JAVA_ARCH = solaris + + INCLUDES += -I$(JAVA_HOME)/include + INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH) + + # currently, disable JIT option on this platform + JDK_JIT_OPT = +endif + +# set [Hewlett Packard HP-UX] platforms +ifeq ($(OS_ARCH), HP-UX) + JAVA_CLASSES = $(JAVA_HOME)/jre/lib/rt.jar + + ifeq ($(JRE_HOME),) + JRE_HOME = $(JAVA_HOME) + JRE_CLASSES = $(JAVA_CLASSES) + else + ifeq ($(JRE_CLASSES),) + JRE_CLASSES = $(JRE_HOME)/lib/rt.jar + endif + endif + + PATH_SEPARATOR = : + + # (2) specify "header" information + JAVA_ARCH = hp-ux + + INCLUDES += -I$(JAVA_HOME)/include + INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH) + + # no JIT option available on this platform + JDK_JIT_OPT = +endif + +# set [Redhat Linux] platforms +ifeq ($(OS_ARCH), Linux) + JAVA_CLASSES = $(JAVA_HOME)/jre/lib/rt.jar + + ifeq ($(JRE_HOME),) + JRE_HOME = $(JAVA_HOME) + JRE_CLASSES = $(JAVA_CLASSES) + else + ifeq ($(JRE_CLASSES),) + JRE_CLASSES = $(JRE_HOME)/lib/rt.jar + endif + endif + + PATH_SEPARATOR = : + + # (2) specify "header" information + JAVA_ARCH = linux + + INCLUDES += -I$(JAVA_HOME)/include + INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH) + + # no JIT option available on this platform + JDK_JIT_OPT = +endif + +# set [Mac OS X] platforms +ifeq ($(OS_ARCH), Darwin) + JAVA_CLASSES = $(JAVA_HOME)/../Classes/classes.jar + + ifeq ($(JRE_HOME),) + JRE_HOME = $(JAVA_HOME) + JRE_CLASSES = $(JAVA_CLASSES) + else + ifeq ($(JRE_CLASSES),) + JRE_CLASSES = $(JRE_HOME)/../Classes/classes.jar + endif + endif + + PATH_SEPARATOR = : + + # (2) specify "header" information + JAVA_ARCH = darwin + + INCLUDES += -I$(JAVA_HOME)/include + INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH) + + # no JIT option available on this platform + JDK_JIT_OPT = +endif + +# set [IBM AIX] platforms +ifeq ($(OS_ARCH), AIX) + JAVA_CLASSES = $(JAVA_HOME)/jre/lib/rt.jar + + ifeq ($(JRE_HOME),) + JRE_HOME = $(JAVA_HOME) + JRE_CLASSES = $(JAVA_CLASSES) + else + ifeq ($(JRE_CLASSES),) + JRE_CLASSES = $(JRE_HOME)/lib/rt.jar + endif + endif + + PATH_SEPARATOR = : + + # (2) specify "header" information + JAVA_ARCH = aix + + INCLUDES += -I$(JAVA_HOME)/include + INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH) + + # no JIT option available on this platform + JDK_JIT_OPT = +endif + +# set [Digital UNIX] platforms +ifeq ($(OS_ARCH), OSF1) + JAVA_CLASSES = $(JAVA_HOME)/jre/lib/rt.jar + + ifeq ($(JRE_HOME),) + JRE_HOME = $(JAVA_HOME) + JRE_CLASSES = $(JAVA_CLASSES) + else + ifeq ($(JRE_CLASSES),) + JRE_CLASSES = $(JRE_HOME)/lib/rt.jar + endif + endif + + PATH_SEPARATOR = : + + # (2) specify "header" information + JAVA_ARCH = alpha + + INCLUDES += -I$(JAVA_HOME)/include + INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH) + + # no JIT option available on this platform + JDK_JIT_OPT = +endif + +# set [Silicon Graphics IRIX] platforms +ifeq ($(OS_ARCH), IRIX) + JAVA_CLASSES = $(JAVA_HOME)/lib/dev.jar:$(JAVA_HOME)/lib/rt.jar + + ifeq ($(JRE_HOME),) + JRE_HOME = $(JAVA_HOME) + JRE_CLASSES = $(JAVA_CLASSES) + else + ifeq ($(JRE_CLASSES),) + JRE_CLASSES = $(JRE_HOME)/lib/dev.jar:$(JRE_HOME)/lib/rt.jar + endif + endif + + PATH_SEPARATOR = : + + # (2) specify "header" information + JAVA_ARCH = irix + + INCLUDES += -I$(JAVA_HOME)/include + INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH) + + # no JIT option available on this platform + JDK_JIT_OPT = +endif + +####################################################################### +# [4] Define remaining JDK "Core Components" default toolset options # +####################################################################### + +# set JDK optimization model +ifeq ($(BUILD_OPT),1) + JDK_OPTIMIZER_OPT = -O +else + JDK_OPTIMIZER_OPT = -g +endif + +# set minimal JDK debugging model +ifeq ($(JDK_DEBUG),1) + JDK_DEBUG_OPT = -debug +else + JDK_DEBUG_OPT = +endif + +# set default path to repository for JDK classes +ifeq ($(JDK_CLASS_REPOSITORY_OPT),) + JDK_CLASS_REPOSITORY_OPT = -d $(JAVA_DESTPATH) +endif + +# define a default JDK classpath +ifeq ($(JDK_CLASSPATH),) + JDK_CLASSPATH = '$(JAVA_DESTPATH)$(PATH_SEPARATOR)$(JAVA_SOURCEPATH)$(PATH_SEPARATOR)$(JAVA_CLASSES)' +endif + +# by default, override CLASSPATH environment variable using the JDK classpath option with $(JDK_CLASSPATH) +ifeq ($(JDK_CLASSPATH_OPT),) + JDK_CLASSPATH_OPT = -classpath $(JDK_CLASSPATH) +endif + +ifeq ($(USE_64), 1) + JDK_USE_64 = -d64 +endif + +endif + + +####################################################################### +# [5] Define JDK "Core Components" toolset; # +# (always allow a user to override these values) # +####################################################################### + +# +# (1) appletviewer +# + +ifeq ($(APPLETVIEWER),) + APPLETVIEWER_PROG = $(JAVA_HOME)/bin/appletviewer$(PROG_SUFFIX) + APPLETVIEWER_FLAGS = $(JDK_THREADING_MODEL_OPT) + APPLETVIEWER_FLAGS += $(JDK_DEBUG_OPT) + APPLETVIEWER_FLAGS += $(JDK_JIT_OPT) + APPLETVIEWER = $(APPLETVIEWER_PROG) $(APPLETVIEWER_FLAGS) +endif + +# +# (2) jar +# + +ifeq ($(JAR),) + JAR_PROG = $(JAVA_HOME)/bin/jar$(PROG_SUFFIX) + JAR_FLAGS = $(JDK_THREADING_MODEL_OPT) + JAR = $(JAR_PROG) $(JAR_FLAGS) +endif + +# +# (3) java +# + +ifeq ($(JAVA),) + JAVA_PROG = $(JAVA_HOME)/bin/java$(PROG_SUFFIX) + JAVA_FLAGS = $(JDK_THREADING_MODEL_OPT) + JAVA_FLAGS += $(JDK_DEBUG_OPT) + JAVA_FLAGS += $(JDK_CLASSPATH_OPT) + JAVA_FLAGS += $(JDK_JIT_OPT) + JAVA_FLAGS += $(JDK_USE_64) + JAVA = $(JAVA_PROG) $(JAVA_FLAGS) +endif + +# +# (4) javac +# + +ifeq ($(JAVAC),) + JAVAC_PROG = $(JAVA_HOME)/bin/javac$(PROG_SUFFIX) + JAVAC_FLAGS = $(JDK_THREADING_MODEL_OPT) + JAVAC_FLAGS += $(JDK_OPTIMIZER_OPT) + JAVAC_FLAGS += $(JDK_DEBUG_OPT) + JAVAC_FLAGS += $(JDK_CLASSPATH_OPT) + JAVAC_FLAGS += $(JDK_CLASS_REPOSITORY_OPT) + JAVAC_FLAGS += $(JDK_USE_64) + JAVAC = $(JAVAC_PROG) $(JAVAC_FLAGS) +endif + +# +# (5) javadoc +# + +ifeq ($(JAVADOC),) + JAVADOC_PROG = $(JAVA_HOME)/bin/javadoc$(PROG_SUFFIX) + JAVADOC_FLAGS = $(JDK_THREADING_MODEL_OPT) + JAVADOC_FLAGS += $(JDK_CLASSPATH_OPT) + JAVADOC = $(JAVADOC_PROG) $(JAVADOC_FLAGS) +endif + +# +# (6) javah +# + +ifeq ($(JAVAH),) + JAVAH_PROG = $(JAVA_HOME)/bin/javah$(PROG_SUFFIX) + JAVAH_FLAGS = $(JDK_THREADING_MODEL_OPT) + JAVAH_FLAGS += $(JDK_CLASSPATH_OPT) + JAVAH = $(JAVAH_PROG) $(JAVAH_FLAGS) +endif + +# +# (7) javakey +# + +ifeq ($(JAVAKEY),) + JAVAKEY_PROG = $(JAVA_HOME)/bin/javakey$(PROG_SUFFIX) + JAVAKEY_FLAGS = $(JDK_THREADING_MODEL_OPT) + JAVAKEY = $(JAVAKEY_PROG) $(JAVAKEY_FLAGS) +endif + +# +# (8) javap +# + +ifeq ($(JAVAP),) + JAVAP_PROG = $(JAVA_HOME)/bin/javap$(PROG_SUFFIX) + JAVAP_FLAGS = $(JDK_THREADING_MODEL_OPT) + JAVAP_FLAGS += $(JDK_CLASSPATH_OPT) + JAVAP = $(JAVAP_PROG) $(JAVAP_FLAGS) +endif + +# +# (9) javat +# + +ifeq ($(JAVAT),) + JAVAT_PROG = $(JAVA_HOME)/bin/javat$(PROG_SUFFIX) + JAVAT_FLAGS = $(JDK_THREADING_MODEL_OPT) + JAVAT = $(JAVAT_PROG) $(JAVAT_FLAGS) +endif + +# +# (10) javaverify +# + +ifeq ($(JAVAVERIFY),) + JAVAVERIFY_PROG = $(JAVA_HOME)/bin/javaverify$(PROG_SUFFIX) + JAVAVERIFY_FLAGS = $(JDK_THREADING_MODEL_OPT) + JAVAVERIFY = $(JAVAVERIFY_PROG) $(JAVAVERIFY_FLAGS) +endif + +# +# (11) javaw +# + +ifeq ($(JAVAW),) + jJAVAW_PROG = $(JAVA_HOME)/bin/javaw$(PROG_SUFFIX) + jJAVAW_FLAGS = $(JDK_THREADING_MODEL_OPT) + jJAVAW_FLAGS += $(JDK_DEBUG_OPT) + jJAVAW_FLAGS += $(JDK_CLASSPATH_OPT) + jJAVAW_FLAGS += $(JDK_JIT_OPT) + jJAVAW = $(JAVAW_PROG) $(JAVAW_FLAGS) +endif + +# +# (12) jdb +# + +ifeq ($(JDB),) + JDB_PROG = $(JAVA_HOME)/bin/jdb$(PROG_SUFFIX) + JDB_FLAGS = $(JDK_THREADING_MODEL_OPT) + JDB_FLAGS += $(JDK_DEBUG_OPT) + JDB_FLAGS += $(JDK_CLASSPATH_OPT) + JDB_FLAGS += $(JDK_JIT_OPT) + JDB = $(JDB_PROG) $(JDB_FLAGS) +endif + +# +# (13) jre +# + +ifeq ($(JRE),) + JRE_PROG = $(JAVA_HOME)/bin/jre$(PROG_SUFFIX) + JRE_FLAGS = $(JDK_THREADING_MODEL_OPT) + JRE_FLAGS += $(JDK_CLASSPATH_OPT) + JRE_FLAGS += $(JDK_JIT_OPT) + JRE = $(JRE_PROG) $(JRE_FLAGS) +endif + +# +# (14) jrew +# + +ifeq ($(JREW),) + JREW_PROG = $(JAVA_HOME)/bin/jrew$(PROG_SUFFIX) + JREW_FLAGS = $(JDK_THREADING_MODEL_OPT) + JREW_FLAGS += $(JDK_CLASSPATH_OPT) + JREW_FLAGS += $(JDK_JIT_OPT) + JREW = $(JREW_PROG) $(JREW_FLAGS) +endif + +# +# (15) native2ascii +# + +ifeq ($(NATIVE2ASCII),) + NATIVE2ASCII_PROG = $(JAVA_HOME)/bin/native2ascii$(PROG_SUFFIX) + NATIVE2ASCII_FLAGS = $(JDK_THREADING_MODEL_OPT) + NATIVE2ASCII = $(NATIVE2ASCII_PROG) $(NATIVE2ASCII_FLAGS) +endif + +# +# (16) rmic +# + +ifeq ($(RMIC),) + RMIC_PROG = $(JAVA_HOME)/bin/rmic$(PROG_SUFFIX) + RMIC_FLAGS = $(JDK_THREADING_MODEL_OPT) + RMIC_FLAGS += $(JDK_OPTIMIZER_OPT) + RMIC_FLAGS += $(JDK_CLASSPATH_OPT) + RMIC = $(RMIC_PROG) $(RMIC_FLAGS) +endif + +# +# (17) rmiregistry +# + +ifeq ($(RMIREGISTRY),) + RMIREGISTRY_PROG = $(JAVA_HOME)/bin/rmiregistry$(PROG_SUFFIX) + RMIREGISTRY_FLAGS = $(JDK_THREADING_MODEL_OPT) + RMIREGISTRY = $(RMIREGISTRY_PROG) $(RMIREGISTRY_FLAGS) +endif + +# +# (18) serialver +# + +ifeq ($(SERIALVER),) + SERIALVER_PROG = $(JAVA_HOME)/bin/serialver$(PROG_SUFFIX) + SERIALVER_FLAGS = $(JDK_THREADING_MODEL_OPT) + SERIALVER = $(SERIALVER_PROG) $(SERIALVER_FLAGS) +endif diff --git a/security/nss/coreconf/jniregen.pl b/security/nss/coreconf/jniregen.pl new file mode 100644 index 0000000000..2039180546 --- /dev/null +++ b/security/nss/coreconf/jniregen.pl @@ -0,0 +1,79 @@ +#!/usr/local/bin/perl +# +# 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/. + +# Input: -d dir -j javahcmd foo1 foo2 . . . +# Compares generated "_jni/foo1.h" file with "foo1.class", and +# generated "_jni/foo2.h" file with "foo2.class", etc. +# (NOTE: unlike its closely related cousin, outofdate.pl, +# the "-d dir" must always be specified) +# Runs the javahcmd on all files that are different. +# +# Returns: list of headers which are OLDER than corresponding class +# files (non-existent class files are considered to be real old :-) + +my $javah = ""; +my $classdir = ""; + +while(1) { + if ($ARGV[0] eq '-d') { + $classdir = $ARGV[1]; + $classdir .= "/"; + shift; + shift; + } elsif($ARGV[0] eq '-j') { + $javah = $ARGV[1]; + shift; + shift; + } else { + last; + } +} + +if( $javah eq "") { + die "Must specify -j <javah command>"; +} +if( $classdir eq "") { + die "Must specify -d <classdir>"; +} + +foreach $filename (@ARGV) +{ + $headerfilename = "_jni/"; + $headerfilename .= $filename; + $headerfilename =~ s/\./_/g; + $headerfilename .= ".h"; + + $classfilename = $filename; + $classfilename =~ s|\.|/|g; + $classfilename .= ".class"; + + $classfilename = $classdir . $classfilename; + + + ( $dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, $atime, $headermtime, + $ctime, $blksize, $blocks ) = stat( $headerfilename ); + + ( $dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, $atime, $classmtime, + $ctime, $blksize, $blocks ) = stat( $classfilename ); + + if( $headermtime < $classmtime ) + { + # NOTE: Since this is used by "javah", and "javah" refuses to overwrite + # an existing file, we force an unlink from this script, since + # we actually want to regenerate the header file at this time. + unlink $headerfilename; + push @filelist, $filename; + } +} + +if( @filelist ) { + $cmd = "$javah " . join(" ",@filelist); + $cmd =~ s/\'/\"/g; # because windows doesn't understand single quote + print "$cmd\n"; + exit (system($cmd) >> 8); +} else { + print "All JNI header files up to date.\n" +} diff --git a/security/nss/coreconf/module.mk b/security/nss/coreconf/module.mk index f9ddf6a170..5f6d2ccb8e 100644 --- a/security/nss/coreconf/module.mk +++ b/security/nss/coreconf/module.mk @@ -14,6 +14,10 @@ # always be identified for compiling/linking purposes # +ifndef JAVA_SOURCE_COMPONENT + JAVA_SOURCE_COMPONENT = java +endif + ifndef NETLIB_SOURCE_COMPONENT NETLIB_SOURCE_COMPONENT = netlib endif diff --git a/security/nss/coreconf/outofdate.pl b/security/nss/coreconf/outofdate.pl new file mode 100644 index 0000000000..33d80bb331 --- /dev/null +++ b/security/nss/coreconf/outofdate.pl @@ -0,0 +1,39 @@ +#!/usr/local/bin/perl +# +# 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/. + +#Input: [-d dir] foo1.java foo2.java +#Compares with: foo1.class foo2.class (if -d specified, checks in 'dir', +# otherwise assumes .class files in same directory as .java files) +#Returns: list of input arguments which are newer than corresponding class +#files (non-existent class files are considered to be real old :-) + +$found = 1; + +if ($ARGV[0] eq '-d') { + $classdir = $ARGV[1]; + $classdir .= "/"; + shift; + shift; +} else { + $classdir = "./"; +} + +foreach $filename (@ARGV) { + $classfilename = $classdir; + $classfilename .= $filename; + $classfilename =~ s/.java$/.class/; + ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime, + $ctime,$blksize,$blocks) = stat($filename); + ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$classmtime, + $ctime,$blksize,$blocks) = stat($classfilename); +# print $filename, " ", $mtime, ", ", $classfilename, " ", $classmtime, "\n"; + if ($mtime > $classmtime) { + print $filename, " "; + $found = 0; + } +} + +print "\n"; diff --git a/security/nss/coreconf/release.pl b/security/nss/coreconf/release.pl new file mode 100644 index 0000000000..7cde19d5eb --- /dev/null +++ b/security/nss/coreconf/release.pl @@ -0,0 +1,112 @@ +#! /usr/local/bin/perl +# +# 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/. + + +require('coreconf.pl'); + +#######-- read in variables on command line into %var + +$use_jar = 1; +$ZIP = "$ENV{JAVA_HOME}/bin/jar"; + +if ( $ENV{JAVA_HOME} eq "" ) { + $ZIP = "zip"; + $use_jar = 0; +} + + +&parse_argv; + + +######-- Do the packaging of jars. + +foreach $jarfile (split(/ /,$var{FILES}) ) { + print STDERR "---------------------------------------------\n"; + print STDERR "Packaging jar file $jarfile....\n"; + + $jarinfo = $var{$jarfile}; + + ($jardir,$jaropts) = split(/\|/,$jarinfo); + + if ( $use_jar ) { + $zipoptions = "-cvf"; + } else { + $zipoptions = "-T -r"; + if ($jaropts =~ /a/) { + if ($var{OS_ARCH} eq 'WINNT') { + $zipoptions .= ' -ll'; + } + } + } + +# just in case the directory ends in a /, remove it + if ($jardir =~ /\/$/) { + chop $jardir; + } + + $dirdepth --; + + print STDERR "jardir = $jardir\n"; + system("ls $jardir"); + + if (-d $jardir) { + + +# count the number of slashes + + $slashes =0; + + foreach $i (split(//,$jardir)) { + if ($i =~ /\//) { + $slashes++; + } + } + + $dotdots =0; + + foreach $i (split(m|/|,$jardir)) { + if ($i eq '..') { + $dotdots ++; + } + } + + $dirdepth = ($slashes +1) - (2*$dotdots); + + print STDERR "changing dir $jardir\n"; + chdir($jardir); + print STDERR "making dir META-INF\n"; + mkdir("META-INF",0755); + + $filelist = ""; + opendir(DIR,"."); + while ($_ = readdir(DIR)) { + if (! ( ($_ eq '.') || ($_ eq '..'))) { + if ( $jaropts =~ /i/) { + if (! /^include$/) { + $filelist .= "$_ "; + } + } + else { + $filelist .= "$_ "; + } + } + } + closedir(DIR); + + print STDERR "$ZIP $zipoptions $jarfile $filelist\n"; + system("$ZIP $zipoptions $jarfile $filelist"); + rmdir("META-INF"); + for $i (1 .. $dirdepth) { + chdir(".."); + print STDERR "chdir ..\n"; + } + } + else { + print STDERR "Directory $jardir doesn't exist\n"; + } + +} + diff --git a/security/nss/coreconf/rules.mk b/security/nss/coreconf/rules.mk index 1bdf08145a..199efa7d5e 100644 --- a/security/nss/coreconf/rules.mk +++ b/security/nss/coreconf/rules.mk @@ -39,10 +39,44 @@ $(DIRS): endif endif +# +# IMPORTS will always be associated with a component. Therefore, +# the "import" rule will always change directory to the top-level +# of a component, and traverse the IMPORTS keyword from the +# "manifest.mn" file located at this level only. +# +# note: if there is a trailing slash, the component will be appended +# (see import.pl - only used for xpheader.jar) + +import: + @echo "== import.pl ==" + @$(PERL) -I$(CORE_DEPTH)/coreconf $(CORE_DEPTH)/coreconf/import.pl \ + "RELEASE_TREE=$(RELEASE_TREE)" \ + "IMPORTS=$(IMPORTS)" \ + "VERSION=$(VERSION)" \ + "OS_ARCH=$(OS_ARCH)" \ + "PLATFORM=$(PLATFORM)" \ + "OVERRIDE_IMPORT_CHECK=$(OVERRIDE_IMPORT_CHECK)" \ + "ALLOW_VERSION_OVERRIDE=$(ALLOW_VERSION_OVERRIDE)" \ + "SOURCE_RELEASE_PREFIX=$(SOURCE_RELEASE_XP_DIR)" \ + "SOURCE_MD_DIR=$(SOURCE_MD_DIR)" \ + "SOURCE_XP_DIR=$(SOURCE_XP_DIR)" \ + "FILES=$(IMPORT_XPCLASS_JAR) $(XPHEADER_JAR) $(MDHEADER_JAR) $(MDBINARY_JAR)" \ + "$(IMPORT_XPCLASS_JAR)=$(IMPORT_XP_DIR)|$(IMPORT_XPCLASS_DIR)|" \ + "$(XPHEADER_JAR)=$(IMPORT_XP_DIR)|$(SOURCE_XP_DIR)/public/|v" \ + "$(MDHEADER_JAR)=$(IMPORT_MD_DIR)|$(SOURCE_MD_DIR)/include|" \ + "$(MDBINARY_JAR)=$(IMPORT_MD_DIR)|$(SOURCE_MD_DIR)|" +# On Mac OS X ranlib needs to be rerun after static libs are moved. +ifeq ($(OS_TARGET),Darwin) + find $(SOURCE_MD_DIR)/lib -name "*.a" -exec $(RANLIB) {} \; +endif + export: $(DIRS) private_export release_export: $(DIRS) +release_classes: $(DIRS) + libs program install: $(DIRS) $(TARGETS) ifneq ($(LIBRARY),) $(INSTALL) -m 664 $(LIBRARY) $(SOURCE_LIB_DIR) @@ -81,7 +115,90 @@ realclean clobber_all: $(DIRS) release_clean: rm -rf $(SOURCE_XP_DIR)/release/$(RELEASE_MD_DIR) -release: release_clean release_export release_md +release: release_clean release_export release_classes release_policy release_md release_jars release_cpdistdir + +release_cpdistdir: + @echo "== cpdist.pl ==" + @$(PERL) -I$(CORE_DEPTH)/coreconf $(CORE_DEPTH)/coreconf/cpdist.pl \ + "RELEASE_TREE=$(RELEASE_TREE)" \ + "CORE_DEPTH=$(CORE_DEPTH)" \ + "MODULE=${MODULE}" \ + "OS_ARCH=$(OS_ARCH)" \ + "RELEASE=$(RELEASE)" \ + "PLATFORM=$(PLATFORM)" \ + "RELEASE_VERSION=$(RELEASE_VERSION)" \ + "SOURCE_RELEASE_PREFIX=$(SOURCE_RELEASE_XP_DIR)" \ + "RELEASE_XP_DIR=$(RELEASE_XP_DIR)" \ + "RELEASE_MD_DIR=$(RELEASE_MD_DIR)" \ + "FILES=$(XPCLASS_JAR) $(XPCLASS_DBG_JAR) $(XPHEADER_JAR) $(MDHEADER_JAR) $(MDBINARY_JAR) XP_FILES MD_FILES" \ + "$(XPCLASS_JAR)=$(SOURCE_RELEASE_CLASSES_DIR)|x"\ + "$(XPCLASS_DBG_JAR)=$(SOURCE_RELEASE_CLASSES_DBG_DIR)|x"\ + "$(XPHEADER_JAR)=$(SOURCE_RELEASE_XPHEADERS_DIR)|x" \ + "$(MDHEADER_JAR)=$(SOURCE_RELEASE_MDHEADERS_DIR)|m" \ + "$(MDBINARY_JAR)=$(SOURCE_RELEASE_MD_DIR)|m" \ + "XP_FILES=$(XP_FILES)|xf" \ + "MD_FILES=$(MD_FILES)|mf" + + +# $(SOURCE_RELEASE_xxx_JAR) is a name like yyy.jar +# $(SOURCE_RELEASE_xx_DIR) is a name like + +release_jars: + @echo "== release.pl ==" + @$(PERL) -I$(CORE_DEPTH)/coreconf $(CORE_DEPTH)/coreconf/release.pl \ + "RELEASE_TREE=$(RELEASE_TREE)" \ + "PLATFORM=$(PLATFORM)" \ + "OS_ARCH=$(OS_ARCH)" \ + "RELEASE_VERSION=$(RELEASE_VERSION)" \ + "SOURCE_RELEASE_DIR=$(SOURCE_RELEASE_DIR)" \ + "FILES=$(XPCLASS_JAR) $(XPCLASS_DBG_JAR) $(XPHEADER_JAR) $(MDHEADER_JAR) $(MDBINARY_JAR)" \ + "$(XPCLASS_JAR)=$(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_CLASSES_DIR)|b"\ + "$(XPCLASS_DBG_JAR)=$(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_CLASSES_DBG_DIR)|b"\ + "$(XPHEADER_JAR)=$(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_XPHEADERS_DIR)|a" \ + "$(MDHEADER_JAR)=$(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_MDHEADERS_DIR)|a" \ + "$(MDBINARY_JAR)=$(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_MD_DIR)|bi" + +# Rules for releasing classes. +# We have to do some REALLY gross stuff to deal with multiple classes in one +# file, as well as nested classes, which have a filename of the form +# ContainingClass$NestedClass.class. +# RELEASE_CLASSES simply performs a required patsubst on CLASSES +# RELEASE_CLASS_PATH is RELEASE_CLASSES with the path (in ns/dist) prepended +# RELEASE_NESTED is all the nested classes in RELEASE_CLASS_PATH. We use a +# foreach and wildcard to get all the files that start out like one of the +# class files, then have a $. So, for each class file, we look for file$* +# RELEASE_FILES is the combination of RELEASE_NESTED and the class files +# specified by RELEASE_CLASSES which have .class appended to them. Note that +# the RELEASE_NESTED don't need to have .class appended because they were +# read in from the wildcard as complete filenames. +# +# The _DBG versions are the debuggable ones. +ifneq ($(CLASSES),) + +RELEASE_CLASSES := $(patsubst %,%,$(CLASSES)) + +ifdef BUILD_OPT + RELEASE_CLASS_PATH := $(patsubst %,$(SOURCE_CLASSES_DIR)/$(PACKAGE)/%, $(RELEASE_CLASSES)) + RELEASE_NESTED := $(foreach file,$(RELEASE_CLASS_PATH),$(wildcard $(file)$$*)) + RELEASE_FILES := $(patsubst %,%.class,$(RELEASE_CLASS_PATH)) $(RELEASE_NESTED) +else + RELEASE_DBG_CLASS_PATH:= $(patsubst %,$(SOURCE_CLASSES_DBG_DIR)/$(PACKAGE)/%, $(RELEASE_CLASSES)) + RELEASE_DBG_NESTED := $(foreach file,$(RELEASE_DBG_CLASS_PATH),$(wildcard $(file)$$*)) + RELEASE_DBG_FILES := $(patsubst %,%.class,$(RELEASE_DBG_CLASS_PATH)) $(RELEASE_DBG_NESTED) +endif + +# Substitute \$ for $ so the shell doesn't choke +ifdef BUILD_OPT +release_classes: + $(INSTALL) -m 444 $(subst $$,\$$,$(RELEASE_FILES)) $(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_CLASSES_DIR)/$(PACKAGE) +else +release_classes: + $(INSTALL) -m 444 $(subst $$,\$$,$(RELEASE_DBG_FILES)) $(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_CLASSES_DBG_DIR)/$(PACKAGE) +endif + +endif + +release_policy: $(DIRS) ifndef NO_MD_RELEASE ifdef LIBRARY @@ -114,10 +231,6 @@ alltags: find . -name dist -prune -o \( -name '*.[hc]' -o -name '*.cp' -o -name '*.cpp' \) -print | xargs etags -a find . -name dist -prune -o \( -name '*.[hc]' -o -name '*.cp' -o -name '*.cpp' \) -print | xargs ctags -a -.SECONDEXPANSION: -%/d: - @$(MAKE_OBJDIR) - define PROGRAM_template ifndef $(1)_OBJS @@ -132,7 +245,8 @@ ifndef $(1)_OBJS endif endif -$(1): $$($(1)_OBJS) $$(EXTRA_LIBS) | $$$$(@D)/d +$(1): $$($(1)_OBJS) $$(EXTRA_LIBS) + @$$(MAKE_OBJDIR) rm -f $$@ ifeq (,$$(filter-out _WIN%,$$(NS_USE_GCC)_$$(OS_TARGET))) $$(MKPROG) $$($(1)_OBJS) -Fe$$@ -link $$(LDFLAGS) $$(XLDFLAGS) $$(EXTRA_LIBS) $$(EXTRA_SHARED_LIBS) $$(OS_LIBS) @@ -158,7 +272,8 @@ endif get_objs: @echo $(OBJS) -$(LIBRARY): $(OBJS) | $$(@D)/d +$(LIBRARY): $(OBJS) + @$(MAKE_OBJDIR) rm -f $@ ifeq (,$(filter-out _WIN%,$(NS_USE_GCC)_$(OS_TARGET))) $(AR) $(subst /,\\,$(OBJS)) @@ -186,7 +301,8 @@ SUB_SHLOBJS = $(foreach dir,$(SHARED_LIBRARY_DIRS),$(addprefix $(dir)/,$(shell $ endif endif -$(SHARED_LIBRARY): $(OBJS) $(RES) $(MAPFILE) $(SUB_SHLOBJS) | $$(@D)/d +$(SHARED_LIBRARY): $(OBJS) $(RES) $(MAPFILE) $(SUB_SHLOBJS) + @$(MAKE_OBJDIR) rm -f $@ ifeq ($(OS_TARGET)$(OS_RELEASE), AIX4.1) echo "#!" > $(OBJDIR)/lib$(LIBRARY_NAME)_syms @@ -216,7 +332,8 @@ endif endif ifeq (,$(filter-out WIN%,$(OS_TARGET))) -$(RES): $(RESNAME) | $$(@D)/d +$(RES): $(RESNAME) + @$(MAKE_OBJDIR) # The resource compiler does not understand the -U option. ifdef NS_USE_GCC $(RC) $(filter-out -U%,$(DEFINES)) $(INCLUDES:-I%=--include-dir %) -o $@ $< @@ -226,7 +343,8 @@ endif @echo $(RES) finished endif -$(MAPFILE): $(MAPFILE_SOURCE) | $$(@D)/d +$(MAPFILE): $(MAPFILE_SOURCE) + @$(MAKE_OBJDIR) $(PROCESS_MAP_FILE) WCCFLAGS1 := $(subst /,\\,$(CFLAGS)) @@ -269,7 +387,8 @@ endif # The quotes allow absolute paths to contain spaces. core_abspath = '$(if $(findstring :,$(1)),$(1),$(if $(filter /%,$(1)),$(1),$(PWD)/$(1)))' -$(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.c | $$(@D)/d +$(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.c + @$(MAKE_OBJDIR) ifdef USE_NT_C_SYNTAX $(CC) -Fo$@ -c $(CSTD) $(CFLAGS) $(call core_abspath,$<) else @@ -280,7 +399,7 @@ else endif endif -$(PROG_PREFIX)%$(OBJ_SUFFIX): %.c | $$(@D)/d +$(PROG_PREFIX)%$(OBJ_SUFFIX): %.c ifdef USE_NT_C_SYNTAX $(CC) -Fo$@ -c $(CSTD) $(CFLAGS) $(call core_abspath,$<) else @@ -292,17 +411,21 @@ endif endif ifneq (,$(filter-out _WIN%,$(NS_USE_GCC)_$(OS_TARGET))) -$(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.s | $$(@D)/d +$(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.s + @$(MAKE_OBJDIR) $(AS) -o $@ $(ASFLAGS) -c $< endif -$(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.asm | $$(@D)/d +$(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.asm + @$(MAKE_OBJDIR) $(AS) -Fo$@ $(ASFLAGS) -c $< -$(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.S | $$(@D)/d +$(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.S + @$(MAKE_OBJDIR) $(AS) -o $@ $(ASFLAGS) -c $< -$(OBJDIR)/$(PROG_PREFIX)%: %.cpp | $$(@D)/d +$(OBJDIR)/$(PROG_PREFIX)%: %.cpp + @$(MAKE_OBJDIR) ifdef USE_NT_C_SYNTAX $(CCC) -Fo$@ -c $(CXXSTD) $(CFLAGS) $(CXXFLAGS) $(call core_abspath,$<) else @@ -313,28 +436,44 @@ else endif endif -define compile_ccc_pattern_RULE - -$$(OBJDIR)/$$(PROG_PREFIX)%$$(OBJ_SUFFIX): %.$(1) | $$$$(@D)/d +# +# Please keep the next two rules in sync. +# +$(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.cc + $(MAKE_OBJDIR) ifdef STRICT_CPLUSPLUS_SUFFIX - echo "#line 1 \"$$<\"" | cat - $$< > $$(OBJDIR)/t_$$*.cc - $$(CCC) -o $$@ -c $$(CXXSTD) $$(CFLAGS) $$(CXXFLAGS) $$(OBJDIR)/t_$$*.cc - rm -f $$(OBJDIR)/t_$$*.cc + echo "#line 1 \"$<\"" | cat - $< > $(OBJDIR)/t_$*.cc + $(CCC) -o $@ -c $(CXXSTD) $(CFLAGS) $(CXXFLAGS) $(OBJDIR)/t_$*.cc + rm -f $(OBJDIR)/t_$*.cc else ifdef USE_NT_C_SYNTAX - $$(CCC) -Fo$$@ -c $$(CXXSTD) $$(CFLAGS) $$(CXXFLAGS) $$(call core_abspath,$$<) + $(CCC) -Fo$@ -c $(CXXSTD) $(CFLAGS) $(CXXFLAGS) $(call core_abspath,$<) else ifdef NEED_ABSOLUTE_PATH - $$(CCC) -o $$@ -c $$(CXXSTD) $$(CFLAGS) $$(CXXFLAGS) $$(call core_abspath,$$<) + $(CCC) -o $@ -c $(CXXSTD) $(CFLAGS) $(CXXFLAGS) $(call core_abspath,$<) else - $$(CCC) -o $$@ -c $$(CXXSTD) $$(CFLAGS) $$(CXXFLAGS) $$< + $(CCC) -o $@ -c $(CXXSTD) $(CFLAGS) $(CXXFLAGS) $< endif endif endif #STRICT_CPLUSPLUS_SUFFIX -endef # compile_ccc_pattern_RULE -$(eval $(call compile_ccc_pattern_RULE,cc)) -$(eval $(call compile_ccc_pattern_RULE,cpp)) +$(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.cpp + @$(MAKE_OBJDIR) +ifdef STRICT_CPLUSPLUS_SUFFIX + echo "#line 1 \"$<\"" | cat - $< > $(OBJDIR)/t_$*.cc + $(CCC) -o $@ -c $(CXXSTD) $(CFLAGS) $(CXXFLAGS) $(OBJDIR)/t_$*.cc + rm -f $(OBJDIR)/t_$*.cc +else +ifdef USE_NT_C_SYNTAX + $(CCC) -Fo$@ -c $(CXXSTD) $(CFLAGS) $(CXXFLAGS) $(call core_abspath,$<) +else +ifdef NEED_ABSOLUTE_PATH + $(CCC) -o $@ -c $(CXXSTD) $(CFLAGS) $(CXXFLAGS) $(call core_abspath,$<) +else + $(CCC) -o $@ -c $(CXXSTD) $(CFLAGS) $(CXXFLAGS) $< +endif +endif +endif #STRICT_CPLUSPLUS_SUFFIX %.i: %.cpp $(CCC) -C -E $(CFLAGS) $(CXXFLAGS) $< > $@ @@ -357,24 +496,296 @@ endif %: %.sh rm -f $@; cp $< $@; chmod +x $@ -define copy_varlist_into_dir_RULE -ifdef $(2) -ifneq (,$$(strip $$($(2)))) -$(3)/%: % - $$(INSTALL) -m 444 $$^ $(3) +################################################################################ +# Bunch of things that extend the 'export' rule (in order): +################################################################################ + +$(JAVA_DESTPATH) $(JAVA_DESTPATH)/$(PACKAGE) $(JMCSRCDIR): + @if test ! -d $@; then \ + echo Creating $@; \ + rm -rf $@; \ + $(NSINSTALL) -D $@; \ + fi + +################################################################################ +## IDL_GEN + +ifneq ($(IDL_GEN),) + +#export: +# $(IDL2JAVA) $(IDL_GEN) + +#all: export + +#clobber: +# rm -f $(IDL_GEN:.idl=.class) # XXX wrong! + +endif + +################################################################################ +### JSRCS -- for compiling java files +### +### NOTE: For backwards compatibility, if $(NETLIBDEPTH) is defined, +### replace $(CORE_DEPTH) with $(NETLIBDEPTH). +### + +ifneq ($(JSRCS),) +ifneq ($(JAVAC),) +ifdef NETLIBDEPTH + CORE_DEPTH := $(NETLIBDEPTH) +endif + +JAVA_EXPORT_SRCS=$(shell $(PERL) $(CORE_DEPTH)/coreconf/outofdate.pl $(PERLARG) -d $(JAVA_DESTPATH)/$(PACKAGE) $(JSRCS) $(PRIVATE_JSRCS)) + +export: $(JAVA_DESTPATH) $(JAVA_DESTPATH)/$(PACKAGE) +ifneq ($(JAVA_EXPORT_SRCS),) + $(JAVAC) $(JAVA_EXPORT_SRCS) +endif + +all: export + +clobber: + rm -f $(SOURCE_XP_DIR)/classes/$(PACKAGE)/*.class + +endif +endif + +# +# JDIRS -- like JSRCS, except you can give a list of directories and it will +# compile all the out-of-date java files in those directories. +# +# NOTE: recursing through these can speed things up, but they also cause +# some builds to run out of memory +# +# NOTE: For backwards compatibility, if $(NETLIBDEPTH) is defined, +# replace $(CORE_DEPTH) with $(NETLIBDEPTH). +# +ifdef JDIRS +ifneq ($(JAVAC),) +ifdef NETLIBDEPTH + CORE_DEPTH := $(NETLIBDEPTH) +endif + +# !!!!! THIS WILL CRASH SHMSDOS.EXE !!!!! +# shmsdos does not support shell variables. It will crash when it tries +# to parse the '=' character. A solution is to rewrite outofdate.pl so it +# takes the Javac command as an argument and executes the command itself, +# instead of returning a list of files. +export: $(JAVA_DESTPATH) $(JAVA_DESTPATH)/$(PACKAGE) + @echo "!!! THIS COMMAND IS BROKEN ON WINDOWS--SEE rules.mk FOR DETAILS !!!" + return -1 + @for d in $(JDIRS); do \ + if test -d $$d; then \ + set $(EXIT_ON_ERROR); \ + files=`echo $$d/*.java`; \ + list=`$(PERL) $(CORE_DEPTH)/coreconf/outofdate.pl $(PERLARG) \ + -d $(JAVA_DESTPATH)/$(PACKAGE) $$files`; \ + if test "$${list}x" != "x"; then \ + echo Building all java files in $$d; \ + echo $(JAVAC) $$list; \ + $(JAVAC) $$list; \ + fi; \ + set +e; \ + else \ + echo "Skipping non-directory $$d..."; \ + fi; \ + $(CLICK_STOPWATCH); \ + done +endif +endif + +# +# JDK_GEN -- for generating "old style" native methods +# +# Generate JDK Headers and Stubs into the '_gen' and '_stubs' directory +# +# NOTE: For backwards compatibility, if $(NETLIBDEPTH) is defined, +# replace $(CORE_DEPTH) with $(NETLIBDEPTH). +# +ifneq ($(JDK_GEN),) +ifneq ($(JAVAH),) +ifdef NSBUILDROOT + INCLUDES += -I$(JDK_GEN_DIR) -I$(SOURCE_XP_DIR) +else + INCLUDES += -I$(JDK_GEN_DIR) +endif + +ifdef NETLIBDEPTH + CORE_DEPTH := $(NETLIBDEPTH) +endif + +JDK_PACKAGE_CLASSES := $(JDK_GEN) +JDK_PATH_CLASSES := $(subst .,/,$(JDK_PACKAGE_CLASSES)) +JDK_HEADER_CLASSFILES := $(patsubst %,$(JAVA_DESTPATH)/%.class,$(JDK_PATH_CLASSES)) +JDK_STUB_CLASSFILES := $(patsubst %,$(JAVA_DESTPATH)/%.class,$(JDK_PATH_CLASSES)) +JDK_HEADER_CFILES := $(patsubst %,$(JDK_GEN_DIR)/%.h,$(JDK_GEN)) +JDK_STUB_CFILES := $(patsubst %,$(JDK_STUB_DIR)/%.c,$(JDK_GEN)) -$(1): $$(addprefix $(3)/,$$($(2))) | $(3)/d +$(JDK_HEADER_CFILES): $(JDK_HEADER_CLASSFILES) +$(JDK_STUB_CFILES): $(JDK_STUB_CLASSFILES) + +export: + @echo Generating/Updating JDK headers + $(JAVAH) -d $(JDK_GEN_DIR) $(JDK_PACKAGE_CLASSES) + @echo Generating/Updating JDK stubs + $(JAVAH) -stubs -d $(JDK_STUB_DIR) $(JDK_PACKAGE_CLASSES) +ifndef NO_MAC_JAVA_SHIT + @if test ! -d $(CORE_DEPTH)/lib/mac/Java/; then \ + echo "!!! You need to have a ns/lib/mac/Java directory checked out."; \ + echo "!!! This allows us to automatically update generated files for the mac."; \ + echo "!!! If you see any modified files there, please check them in."; \ + fi + @echo Generating/Updating JDK headers for the Mac + $(JAVAH) -mac -d $(CORE_DEPTH)/lib/mac/Java/_gen $(JDK_PACKAGE_CLASSES) + @echo Generating/Updating JDK stubs for the Mac + $(JAVAH) -mac -stubs -d $(CORE_DEPTH)/lib/mac/Java/_stubs $(JDK_PACKAGE_CLASSES) endif +endif +endif + +# +# JRI_GEN -- for generating "old style" JRI native methods +# +# Generate JRI Headers and Stubs into the 'jri' directory +# +# NOTE: For backwards compatibility, if $(NETLIBDEPTH) is defined, +# replace $(CORE_DEPTH) with $(NETLIBDEPTH). +# +ifneq ($(JRI_GEN),) +ifneq ($(JAVAH),) +ifdef NSBUILDROOT + INCLUDES += -I$(JRI_GEN_DIR) -I$(SOURCE_XP_DIR) else -$(1): + INCLUDES += -I$(JRI_GEN_DIR) +endif + +ifdef NETLIBDEPTH + CORE_DEPTH := $(NETLIBDEPTH) +endif + +JRI_PACKAGE_CLASSES := $(JRI_GEN) +JRI_PATH_CLASSES := $(subst .,/,$(JRI_PACKAGE_CLASSES)) +JRI_HEADER_CLASSFILES := $(patsubst %,$(JAVA_DESTPATH)/%.class,$(JRI_PATH_CLASSES)) +JRI_STUB_CLASSFILES := $(patsubst %,$(JAVA_DESTPATH)/%.class,$(JRI_PATH_CLASSES)) +JRI_HEADER_CFILES := $(patsubst %,$(JRI_GEN_DIR)/%.h,$(JRI_GEN)) +JRI_STUB_CFILES := $(patsubst %,$(JRI_GEN_DIR)/%.c,$(JRI_GEN)) + +$(JRI_HEADER_CFILES): $(JRI_HEADER_CLASSFILES) +$(JRI_STUB_CFILES): $(JRI_STUB_CLASSFILES) + +export: + @echo Generating/Updating JRI headers + $(JAVAH) -jri -d $(JRI_GEN_DIR) $(JRI_PACKAGE_CLASSES) + @echo Generating/Updating JRI stubs + $(JAVAH) -jri -stubs -d $(JRI_GEN_DIR) $(JRI_PACKAGE_CLASSES) +ifndef NO_MAC_JAVA_SHIT + @if test ! -d $(CORE_DEPTH)/lib/mac/Java/; then \ + echo "!!! You need to have a ns/lib/mac/Java directory checked out."; \ + echo "!!! This allows us to automatically update generated files for the mac."; \ + echo "!!! If you see any modified files there, please check them in."; \ + fi + @echo Generating/Updating JRI headers for the Mac + $(JAVAH) -jri -mac -d $(CORE_DEPTH)/lib/mac/Java/_jri $(JRI_PACKAGE_CLASSES) + @echo Generating/Updating JRI stubs for the Mac + $(JAVAH) -jri -mac -stubs -d $(CORE_DEPTH)/lib/mac/Java/_jri $(JRI_PACKAGE_CLASSES) +endif +endif +endif + +# +# JNI_GEN -- for generating JNI native methods +# +# Generate JNI Headers into the 'jni' directory +# +ifneq ($(JNI_GEN),) +ifneq ($(JAVAH),) +JNI_HEADERS := $(patsubst %,$(JNI_GEN_DIR)/%.h,$(JNI_GEN)) + +export: + @if test ! -d $(JNI_GEN_DIR); then \ + echo $(JAVAH) -jni -d $(JNI_GEN_DIR) $(JNI_GEN); \ + $(JAVAH) -jni -d $(JNI_GEN_DIR) $(JNI_GEN); \ + else \ + echo "Checking for out of date header files" ; \ + $(PERL) $(CORE_DEPTH)/coreconf/jniregen.pl $(PERLARG) \ + -d $(JAVA_DESTPATH) -j "$(JAVAH) -jni -d $(JNI_GEN_DIR)" $(JNI_GEN);\ + fi +endif endif -endef # copy_varlist_into_dir_RULE -# export rule -$(eval $(call copy_varlist_into_dir_RULE,export,EXPORTS,$(SOURCE_XPHEADERS_DIR))) +# +# JMC_EXPORT -- for declaring which java classes are to be exported for jmc +# +ifneq ($(JMC_EXPORT),) +JMC_EXPORT_PATHS := $(subst .,/,$(JMC_EXPORT)) +JMC_EXPORT_FILES := $(patsubst %,$(JAVA_DESTPATH)/$(PACKAGE)/%.class,$(JMC_EXPORT_PATHS)) -# private_export rule -$(eval $(call copy_varlist_into_dir_RULE,private_export,PRIVATE_EXPORTS,$(SOURCE_XPPRIVATE_DIR))) +# +# We're doing NSINSTALL -t here (copy mode) because calling INSTALL will pick up +# your NSDISTMODE and make links relative to the current directory. This is a +# problem because the source isn't in the current directory: +# +export: $(JMC_EXPORT_FILES) $(JMCSRCDIR) + $(NSINSTALL) -t -m 444 $(JMC_EXPORT_FILES) $(JMCSRCDIR) +endif + +# +# JMC_GEN -- for generating java modules +# +# Provide default export & install rules when using JMC_GEN +# +ifneq ($(JMC_GEN),) +ifneq ($(JMC),) + INCLUDES += -I$(JMC_GEN_DIR) -I. + JMC_HEADERS := $(patsubst %,$(JMC_GEN_DIR)/%.h,$(JMC_GEN)) + JMC_STUBS := $(patsubst %,$(JMC_GEN_DIR)/%.c,$(JMC_GEN)) + JMC_OBJS := $(patsubst %,$(OBJDIR)/%$(OBJ_SUFFIX),$(JMC_GEN)) + +$(JMC_GEN_DIR)/M%.h: $(JMCSRCDIR)/%.class + $(JMC) -d $(JMC_GEN_DIR) -interface $(JMC_GEN_FLAGS) $(?F:.class=) + +$(JMC_GEN_DIR)/M%.c: $(JMCSRCDIR)/%.class + $(JMC) -d $(JMC_GEN_DIR) -module $(JMC_GEN_FLAGS) $(?F:.class=) + +$(OBJDIR)/M%$(OBJ_SUFFIX): $(JMC_GEN_DIR)/M%.c $(JMC_GEN_DIR)/M%.h + @$(MAKE_OBJDIR) + $(CC) -o $@ -c $(CFLAGS) $< + +export: $(JMC_HEADERS) $(JMC_STUBS) +endif +endif + +# +# Copy each element of EXPORTS to $(SOURCE_XP_DIR)/public/$(MODULE)/ +# +PUBLIC_EXPORT_DIR = $(SOURCE_XP_DIR)/public/$(MODULE) + +ifneq ($(EXPORTS),) +$(PUBLIC_EXPORT_DIR)/d: + @$(MAKE_OBJDIR) + +$(PUBLIC_EXPORT_DIR)/%: % + $(INSTALL) -m 444 $^ $(PUBLIC_EXPORT_DIR) + +export: $(addprefix $(PUBLIC_EXPORT_DIR)/,$(EXPORTS)) | $(PUBLIC_EXPORT_DIR)/d +endif + +# Duplicate export rule for private exports, with different directories + +PRIVATE_EXPORT_DIR = $(SOURCE_XP_DIR)/private/$(MODULE) + +ifneq ($(PRIVATE_EXPORTS),) +$(PRIVATE_EXPORT_DIR)/d: + @$(MAKE_OBJDIR) + +$(PRIVATE_EXPORT_DIR)/%: % + $(INSTALL) -m 444 $^ $(PRIVATE_EXPORT_DIR) + +private_export: $(addprefix $(PRIVATE_EXPORT_DIR)/,$(PRIVATE_EXPORTS)) | $(PRIVATE_EXPORT_DIR)/d +else +private_export: + @echo "There are no private exports." +endif ########################################################################## ### RULES FOR RUNNING REGRESSION SUITE TESTS @@ -390,9 +801,16 @@ ifneq ($(BUILD_OPT),) REGDATE = $(subst \ ,, $(shell $(PERL) $(CORE_DEPTH)/$(MODULE)/scripts/now)) endif -check: $(REGRESSION_SPEC) | $(TESTS_DIR)/d +$(TESTS_DIR)/d: + @$(MAKE_OBJDIR) + +check: $(REGRESSION_SPEC) cd $(PLATFORM); \ - ../$(SOURCE_MD_DIR)/bin/regress$(PROG_SUFFIX) specfile=../$(REGRESSION_SPEC) progress $(EXTRA_REGRESS_OPTIONS) + ../$(SOURCE_MD_DIR)/bin/regress$(PROG_SUFFIX) specfile=../$(REGRESSION_SPEC) progress $(EXTRA_REGRESS_OPTIONS); \ + if test ! -d $(TESTS_DIR); then \ + echo Creating $(TESTS_DIR); \ + $(NSINSTALL) -D $(TESTS_DIR); \ + fi ifneq ($(BUILD_OPT),) $(NSINSTALL) -m 664 $(PLATFORM)/$(REGDATE).sum $(TESTS_DIR); \ $(NSINSTALL) -m 664 $(PLATFORM)/$(REGDATE).htm $(TESTS_DIR); \ @@ -404,8 +822,23 @@ check: @echo "Error: you didn't specify REGRESSION_SPEC in your manifest.mn file!" endif -# release_export rule -$(eval $(call copy_varlist_into_dir_RULE,release_export,EXPORTS,$(SOURCE_RELEASE_XP_DIR)/include)) + +# Duplicate export rule for releases, with different directories + +ifneq ($(EXPORTS),) +$(SOURCE_RELEASE_XP_DIR)/include: + @if test ! -d $@; then \ + echo Creating $@; \ + $(NSINSTALL) -D $@; \ + fi + +release_export: $(SOURCE_RELEASE_XP_DIR)/include + +release_export: $(EXPORTS) + $(INSTALL) -m 444 $^ $(SOURCE_RELEASE_XP_DIR)/include +endif + + # # HACK ALERT @@ -439,7 +872,12 @@ $(filter $(OBJDIR)/%$(OBJ_SUFFIX),$(OBJS)): $(OBJDIR)/%$(OBJ_SUFFIX): $(DUMMY_DE # hundreds of built-in suffix rules for stuff we don't need. # .SUFFIXES: -.SUFFIXES: .out .a .ln .o .obj .c .cc .C .cpp .y .l .s .S .h .sh .i .pl .html .asm .dep +.SUFFIXES: .out .a .ln .o .obj .c .cc .C .cpp .y .l .s .S .h .sh .i .pl .class .java .html .asm .dep + +# +# Don't delete these files if we get killed. +# +.PRECIOUS: .java $(JDK_HEADERS) $(JDK_STUBS) $(JRI_HEADERS) $(JRI_STUBS) $(JMC_HEADERS) $(JMC_STUBS) $(JNI_HEADERS) # # Fake targets. Always run these rules, even if a file/directory with that diff --git a/security/nss/coreconf/ruleset.mk b/security/nss/coreconf/ruleset.mk index 01207cdcd4..43ea718e41 100644 --- a/security/nss/coreconf/ruleset.mk +++ b/security/nss/coreconf/ruleset.mk @@ -22,6 +22,29 @@ # e) # # LIBRARY -- the target library name to create from $OBJS # # ($OBJDIR automatically prepended to it) # +# f) # +# JSRCS -- java source files to compile into class files # +# (if you don't specify this it will default # +# to *.java) # +# g) # +# PACKAGE -- the package to put the .class files into # +# (e.g. netscape/applet) # +# (NOTE: the default definition for this may be # +# overridden if "jdk.mk" is included) # +# h) # +# JMC_EXPORT -- java files to be exported for use by JMC_GEN # +# (this is a list of Class names) # +# i) # +# JRI_GEN -- files to run through javah to generate headers # +# and stubs # +# (output goes into the _jri sub-dir) # +# j) # +# JMC_GEN -- files to run through jmc to generate headers # +# and stubs # +# (output goes into the _jmc sub-dir) # +# k) # +# JNI_GEN -- files to run through javah to generate headers # +# (output goes into the _jni sub-dir) # # # ####################################################################### @@ -56,54 +79,20 @@ endif # - (3) IMPORT_LIBRARY: an import library, defined in $(OS_TARGET).mk # - (4) PROGRAM: an executable binary # -# A library is build by specifying the LIBRARY_NAME variable. -# If you want to build only a static library, set SHARED_LIBRARY = $(NULL) -# If you want to build only a shared library, set LIBRARY = $(NULL) -# You can specify the shared library major version via LIBRARY_VERSION. +# 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 # -# Normally you want to link to the shared library. In this case you must -# provide an export script, like: -# MAPFILE = $(OBJDIR)/$(LIBRARY_NAME).def. -# Unfortunatly this variable is needed by the ARCH setup, so you have to set -# it explicitly in the manifest.mn. -# -# Per default, it's assumed the shared library provides resource specification -# in the file RES. You can set it to $(NULL), if that is not true. -# -# If you have an unversioned SHARED_LIBRARY, you must explicitly change or -# disable the static LIBRARY, as these normally clash on Windows. ifdef LIBRARY_NAME ifndef LIBRARY - LIBRARY := $(OBJDIR)/$(LIB_PREFIX)$(LIBRARY_NAME).$(LIB_SUFFIX) + LIBRARY = $(OBJDIR)/$(LIB_PREFIX)$(LIBRARY_NAME).$(LIB_SUFFIX) endif ifndef SHARED_LIBRARY - SHARED_LIBRARY := $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX) - endif - - ifneq ($(SHARED_LIBRARY),) - - ifdef IMPORT_LIB_SUFFIX - ifdef MAPFILE - ifndef IMPORT_LIBRARY - IMPORT_LIBRARY := $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX) - endif + SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(JDK_DEBUG_SUFFIX).$(DLL_SUFFIX) endif - endif - ifndef MAPFILE_SOURCE - MAPFILE_SOURCE := $(LIBRARY_NAME).def - endif - - ifeq (,$(filter-out WIN%,$(OS_TARGET))) - ifndef RES - RES := $(OBJDIR)/$(LIBRARY_NAME).res - endif - ifndef RESNAME - RESNAME := $(LIBRARY_NAME).rc - endif - endif - + MAPFILE_SOURCE = $(LIBRARY_NAME).def endif endif @@ -112,11 +101,11 @@ endif # ifdef PROGRAM - PROGRAM := $(addprefix $(OBJDIR)/, $(PROGRAM)$(PROG_SUFFIX)) + PROGRAM := $(addprefix $(OBJDIR)/, $(PROGRAM)$(JDK_DEBUG_SUFFIX)$(PROG_SUFFIX)) endif ifdef PROGRAMS - PROGRAMS := $(addprefix $(OBJDIR)/, $(PROGRAMS:%=%$(PROG_SUFFIX))) + PROGRAMS := $(addprefix $(OBJDIR)/, $(PROGRAMS:%=%$(JDK_DEBUG_SUFFIX)$(PROG_SUFFIX))) endif ifndef TARGETS @@ -128,7 +117,8 @@ CPPSRCS1 = $(CPPSRCS:.cpp=$(OBJ_SUFFIX)) CPPSRCS2 = $(CPPSRCS1:.cc=$(OBJ_SUFFIX)) ifndef OBJS - SIMPLE_OBJS = \ + SIMPLE_OBJS = $(JRI_STUB_CFILES) \ + $(addsuffix $(OBJ_SUFFIX), $(JMC_GEN)) \ $(CSRCS:.c=$(OBJ_SUFFIX)) \ $(CPPSRCS2) \ $(ASFILES:$(ASM_SUFFIX)=$(OBJ_SUFFIX)) \ @@ -149,9 +139,46 @@ if test ! -d $(@D); then $(NSINSTALL) -D $(@D); fi endef endif +ifndef PACKAGE + PACKAGE = . +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 +else + JDK_GEN_DIR = _gen + JMC_GEN_DIR = _jmc + JNI_GEN_DIR = _jni + JRI_GEN_DIR = _jri + JDK_STUB_DIR = _stubs +endif + ALL_TRASH = $(TARGETS) $(OBJS) $(OBJDIR) LOGS TAGS $(GARBAGE) \ so_locations $(BUILT_SRCS) $(NOSUCHFILE) +ifdef NS_USE_JDK + ALL_TRASH += $(JDK_HEADER_CFILES) $(JDK_STUB_CFILES) \ + $(JMC_HEADERS) $(JMC_STUBS) $(JMC_EXPORT_FILES) \ + $(JNI_HEADERS) \ + $(JRI_HEADER_CFILES) $(JRI_STUB_CFILES) \ + $(JDK_GEN_DIR) $(JMC_GEN_DIR) $(JNI_GEN_DIR) \ + $(JRI_GEN_DIR) $(JDK_STUB_DIR) + +ifdef JAVA_DESTPATH + ALL_TRASH += $(wildcard $(JAVA_DESTPATH)/$(PACKAGE)/*.class) +ifdef JDIRS + ALL_TRASH += $(addprefix $(JAVA_DESTPATH)/,$(JDIRS)) +endif +else # !JAVA_DESTPATH + ALL_TRASH += $(wildcard $(PACKAGE)/*.class) $(JDIRS) +endif + +endif #NS_USE_JDK + ifdef NSS_BUILD_CONTINUE_ON_ERROR # Try to build everything. I.e., don't exit on errors. EXIT_ON_ERROR = +e diff --git a/security/nss/coreconf/source.mk b/security/nss/coreconf/source.mk index 94c383e4c1..14bb510238 100644 --- a/security/nss/coreconf/source.mk +++ b/security/nss/coreconf/source.mk @@ -31,9 +31,17 @@ endif # <user_source_tree> cross-platform (xp) import/export directories # +SOURCE_CLASSES_DIR = $(SOURCE_XP_DIR)/classes +SOURCE_CLASSES_DBG_DIR = $(SOURCE_XP_DIR)/classes_DBG 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) +else + IMPORT_XPCLASS_DIR = $(SOURCE_CLASSES_DBG_DIR) +endif + # # <user_source_tree> machine-dependent (md) master import/export directory # @@ -102,9 +110,27 @@ SOURCE_RELEASE_XP_DIR = $(SOURCE_RELEASE_PREFIX) # <user_source_tree> cross-platform (xp) source-side release directories # +SOURCE_RELEASE_CLASSES_DIR = classes +SOURCE_RELEASE_CLASSES_DBG_DIR = classes_DBG SOURCE_RELEASE_XPHEADERS_DIR = include # +# <user_source_tree> cross-platform (xp) JAR source-side release files +# + +XPCLASS_JAR = xpclass.jar +XPCLASS_DBG_JAR = xpclass_dbg.jar +XPHEADER_JAR = xpheader.jar + +ifdef BUILD_OPT + SOURCE_RELEASE_XP_CLASSES_DIR = $(SOURCE_RELEASE_CLASSES_DIR) + IMPORT_XPCLASS_JAR = $(XPCLASS_JAR) +else + SOURCE_RELEASE_XP_CLASSES_DIR = $(SOURCE_RELEASE_CLASSES_DBG_DIR) + IMPORT_XPCLASS_JAR = $(XPCLASS_DBG_JAR) +endif + +# # <user_source_tree> machine-dependent (md) source-side master release directory # @@ -119,6 +145,14 @@ SOURCE_RELEASE_LIB_DIR = $(PLATFORM)/lib SOURCE_RELEASE_MDHEADERS_DIR = $(PLATFORM)/include SOURCE_RELEASE_SPEC_DIR = $(SOURCE_RELEASE_MD_DIR) +# +# <user_source_tree> machine-dependent (md) JAR/tar source-side release files +# + +MDBINARY_JAR = mdbinary.jar +MDHEADER_JAR = mdheader.jar + + # Where to put the results ifneq ($(RESULTS_DIR),) diff --git a/security/nss/coreconf/suffix.mk b/security/nss/coreconf/suffix.mk index 8050e4ac52..584bdf55de 100644 --- a/security/nss/coreconf/suffix.mk +++ b/security/nss/coreconf/suffix.mk @@ -40,6 +40,11 @@ ifndef DYNAMIC_LIB_SUFFIX DYNAMIC_LIB_SUFFIX = .$(DLL_SUFFIX) endif +# WIN% overridese this +ifndef IMPORT_LIB_SUFFIX + IMPORT_LIB_SUFFIX = +endif + ifndef STATIC_LIB_SUFFIX_FOR_LINKING STATIC_LIB_SUFFIX_FOR_LINKING = $(STATIC_LIB_SUFFIX) diff --git a/security/nss/coreconf/version.mk b/security/nss/coreconf/version.mk index 5e2964e390..c3e559cdc6 100644 --- a/security/nss/coreconf/version.mk +++ b/security/nss/coreconf/version.mk @@ -54,6 +54,10 @@ endif # Set <component>-specific versions for compiliation and linkage. # +ifndef JAVA_VERSION + JAVA_VERSION = $(CURRENT_VERSION_SYMLINK) +endif + ifndef NETLIB_VERSION NETLIB_VERSION = $(CURRENT_VERSION_SYMLINK) endif diff --git a/security/nss/cpputil/Makefile b/security/nss/cpputil/Makefile index 28e0f61605..7adfc61179 100644 --- a/security/nss/cpputil/Makefile +++ b/security/nss/cpputil/Makefile @@ -30,6 +30,8 @@ endif # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### +include config.mk + ####################################################################### # (5) Execute "global" rules. (OPTIONAL) # ####################################################################### diff --git a/security/nss/cpputil/config.mk b/security/nss/cpputil/config.mk new file mode 100644 index 0000000000..b8c03de796 --- /dev/null +++ b/security/nss/cpputil/config.mk @@ -0,0 +1,15 @@ +# +# 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/. + +# +# Override TARGETS variable so that only static libraries +# are specifed as dependencies within rules.mk. +# + +TARGETS = $(LIBRARY) +SHARED_LIBRARY = +IMPORT_LIBRARY = +PROGRAM = + diff --git a/security/nss/cpputil/manifest.mn b/security/nss/cpputil/manifest.mn index 9bd68e0d88..caa859bf73 100644 --- a/security/nss/cpputil/manifest.mn +++ b/security/nss/cpputil/manifest.mn @@ -6,9 +6,7 @@ CORE_DEPTH = .. DEPTH = .. MODULE = nss - LIBRARY_NAME = cpputil -SHARED_LIBRARY = $(NULL) ifeq ($(NSS_BUILD_UTIL_ONLY),1) CPPSRCS = \ diff --git a/security/nss/gtests/common/Makefile b/security/nss/gtests/common/Makefile index 59c5194097..1476e45df0 100644 --- a/security/nss/gtests/common/Makefile +++ b/security/nss/gtests/common/Makefile @@ -20,6 +20,8 @@ include $(CORE_DEPTH)/coreconf/config.mk # (3) Include "component" configuration information. (OPTIONAL) # ####################################################################### +SHARED_LIBRARY = $(NULL) +IMPORT_LIBRARY = $(NULL) ####################################################################### # (4) Include "local" platform-dependent assignments (OPTIONAL). # diff --git a/security/nss/gtests/common/manifest.mn b/security/nss/gtests/common/manifest.mn index 2514c9fbf5..5d36c269f5 100644 --- a/security/nss/gtests/common/manifest.mn +++ b/security/nss/gtests/common/manifest.mn @@ -7,7 +7,6 @@ DEPTH = ../.. MODULE = nss LIBRARY_NAME = gtestutil -SHARED_LIBRARY = $(NULL) ifeq ($(NSS_BUILD_UTIL_ONLY),1) CPPSRCS = gtests-util.cc diff --git a/security/nss/gtests/google_test/Makefile b/security/nss/gtests/google_test/Makefile index 0d547e0803..f801ba1d45 100644 --- a/security/nss/gtests/google_test/Makefile +++ b/security/nss/gtests/google_test/Makefile @@ -20,6 +20,8 @@ include $(CORE_DEPTH)/coreconf/config.mk # (3) Include "component" configuration information. (OPTIONAL) # ####################################################################### +SHARED_LIBRARY = $(NULL) +IMPORT_LIBRARY = $(NULL) ####################################################################### # (4) Include "local" platform-dependent assignments (OPTIONAL). # diff --git a/security/nss/gtests/google_test/manifest.mn b/security/nss/gtests/google_test/manifest.mn index 7c60f11e59..2858dc72d3 100644 --- a/security/nss/gtests/google_test/manifest.mn +++ b/security/nss/gtests/google_test/manifest.mn @@ -8,7 +8,6 @@ DEPTH = ../.. MODULE = gtest LIBRARY_NAME = gtest -SHARED_LIBRARY = $(NULL) INCLUDES += -Igtest/include/ -Igtest diff --git a/security/nss/gtests/pkcs11testmodule/Makefile b/security/nss/gtests/pkcs11testmodule/Makefile index 77d2482f36..a052055f3a 100644 --- a/security/nss/gtests/pkcs11testmodule/Makefile +++ b/security/nss/gtests/pkcs11testmodule/Makefile @@ -20,11 +20,14 @@ include $(CORE_DEPTH)/coreconf/config.mk # (3) Include "component" configuration information. (OPTIONAL) # ####################################################################### +LIBRARY = $(NULL) +IMPORT_LIBRARY = $(NULL) ####################################################################### # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### +include config.mk ####################################################################### # (5) Execute "global" rules. (OPTIONAL) # diff --git a/security/nss/gtests/pkcs11testmodule/config.mk b/security/nss/gtests/pkcs11testmodule/config.mk new file mode 100644 index 0000000000..a1e2df79db --- /dev/null +++ b/security/nss/gtests/pkcs11testmodule/config.mk @@ -0,0 +1,16 @@ +# +# 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/. + +# 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)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX) +IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX) + +RES = $(OBJDIR)/$(LIBRARY_NAME).res +RESNAME = $(LIBRARY_NAME).rc + +endif diff --git a/security/nss/gtests/pkcs11testmodule/manifest.mn b/security/nss/gtests/pkcs11testmodule/manifest.mn index 1561c041e8..3c0e40778b 100644 --- a/security/nss/gtests/pkcs11testmodule/manifest.mn +++ b/security/nss/gtests/pkcs11testmodule/manifest.mn @@ -14,10 +14,9 @@ INCLUDES += -I$(CORE_DEPTH)/cpputil REQUIRES = cpputil +MAPFILE = $(OBJDIR)/pkcs11testmodule.def + LIBRARY_NAME = pkcs11testmodule -MAPFILE = $(OBJDIR)/$(LIBRARY_NAME).def -LIBRARY = $(NULL) -IMPORT_LIBRARY = $(NULL) EXTRA_LIBS = $(DIST)/lib/$(LIB_PREFIX)cpputil.$(LIB_SUFFIX) \ $(NULL) diff --git a/security/nss/lib/base/Makefile b/security/nss/lib/base/Makefile index 3f49eaa45d..ca709f6c0d 100644 --- a/security/nss/lib/base/Makefile +++ b/security/nss/lib/base/Makefile @@ -4,11 +4,7 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. include manifest.mn - include $(CORE_DEPTH)/coreconf/config.mk - -ifdef BUILD_IDG -DEFINES += -DNSSDEBUG -endif - +include config.mk include $(CORE_DEPTH)/coreconf/rules.mk + diff --git a/security/nss/lib/base/config.mk b/security/nss/lib/base/config.mk new file mode 100644 index 0000000000..2676cd5370 --- /dev/null +++ b/security/nss/lib/base/config.mk @@ -0,0 +1,19 @@ +# +# 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/. + +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 = + diff --git a/security/nss/lib/base/manifest.mn b/security/nss/lib/base/manifest.mn index 6c4b2db98a..da3a0f3364 100644 --- a/security/nss/lib/base/manifest.mn +++ b/security/nss/lib/base/manifest.mn @@ -33,7 +33,6 @@ CSRCS = \ REQUIRES = nspr LIBRARY_NAME = nssb -SHARED_LIBRARY = $(NULL) # This part of the code, including all sub-dirs, can be optimized for size export ALLOW_OPT_CODE_SIZE = 1 diff --git a/security/nss/lib/certdb/Makefile b/security/nss/lib/certdb/Makefile index bb88772853..c3cb5ef8be 100644 --- a/security/nss/lib/certdb/Makefile +++ b/security/nss/lib/certdb/Makefile @@ -26,6 +26,8 @@ include $(CORE_DEPTH)/coreconf/config.mk # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### +include config.mk + ####################################################################### # (5) Execute "global" rules. (OPTIONAL) # ####################################################################### diff --git a/security/nss/lib/certdb/config.mk b/security/nss/lib/certdb/config.mk new file mode 100644 index 0000000000..b8c03de796 --- /dev/null +++ b/security/nss/lib/certdb/config.mk @@ -0,0 +1,15 @@ +# +# 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/. + +# +# Override TARGETS variable so that only static libraries +# are specifed as dependencies within rules.mk. +# + +TARGETS = $(LIBRARY) +SHARED_LIBRARY = +IMPORT_LIBRARY = +PROGRAM = + diff --git a/security/nss/lib/certdb/manifest.mn b/security/nss/lib/certdb/manifest.mn index 4a8c5c40ad..28548f4671 100644 --- a/security/nss/lib/certdb/manifest.mn +++ b/security/nss/lib/certdb/manifest.mn @@ -35,7 +35,6 @@ CSRCS = \ $(NULL) LIBRARY_NAME = certdb -SHARED_LIBRARY = $(NULL) # This part of the code, including all sub-dirs, can be optimized for size export ALLOW_OPT_CODE_SIZE = 1 diff --git a/security/nss/lib/certhigh/Makefile b/security/nss/lib/certhigh/Makefile index bb88772853..0f71b1a4b6 100644 --- a/security/nss/lib/certhigh/Makefile +++ b/security/nss/lib/certhigh/Makefile @@ -26,6 +26,8 @@ include $(CORE_DEPTH)/coreconf/config.mk # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### +-include config.mk + ####################################################################### # (5) Execute "global" rules. (OPTIONAL) # ####################################################################### diff --git a/security/nss/lib/certhigh/config.mk b/security/nss/lib/certhigh/config.mk new file mode 100644 index 0000000000..b8c03de796 --- /dev/null +++ b/security/nss/lib/certhigh/config.mk @@ -0,0 +1,15 @@ +# +# 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/. + +# +# Override TARGETS variable so that only static libraries +# are specifed as dependencies within rules.mk. +# + +TARGETS = $(LIBRARY) +SHARED_LIBRARY = +IMPORT_LIBRARY = +PROGRAM = + diff --git a/security/nss/lib/certhigh/manifest.mn b/security/nss/lib/certhigh/manifest.mn index b843e06869..ed9b9108a4 100644 --- a/security/nss/lib/certhigh/manifest.mn +++ b/security/nss/lib/certhigh/manifest.mn @@ -29,7 +29,6 @@ CSRCS = \ $(NULL) LIBRARY_NAME = certhi -SHARED_LIBRARY = $(NULL) # This part of the code, including all sub-dirs, can be optimized for size export ALLOW_OPT_CODE_SIZE = 1 diff --git a/security/nss/lib/ckfw/Makefile b/security/nss/lib/ckfw/Makefile index effa9abceb..82c9b8bd20 100644 --- a/security/nss/lib/ckfw/Makefile +++ b/security/nss/lib/ckfw/Makefile @@ -4,12 +4,8 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. include manifest.mn - include $(CORE_DEPTH)/coreconf/config.mk - -ifdef BUILD_IDG -DEFINES += -DNSSDEBUG -endif +include config.mk ifdef NOTDEF # was ifdef MOZILLA_CLIENT NSS_BUILD_CAPI = 1 diff --git a/security/nss/lib/ckfw/builtins/Makefile b/security/nss/lib/ckfw/builtins/Makefile index 2a633d2892..22726e286e 100644 --- a/security/nss/lib/ckfw/builtins/Makefile +++ b/security/nss/lib/ckfw/builtins/Makefile @@ -5,24 +5,7 @@ include manifest.mn include $(CORE_DEPTH)/coreconf/config.mk - -ifdef BUILD_IDG -DEFINES += -DNSSDEBUG -endif - -# Needed for compilation of $(OBJDIR)/certdata.c -INCLUDES += -I. - -# -# To create a loadable module on Darwin, we must use -bundle. -# -ifeq ($(OS_TARGET),Darwin) -DSO_LDOPTS = -bundle -endif - -ifdef USE_GCOV -DSO_LDOPTS += --coverage -endif +include config.mk EXTRA_LIBS = \ $(DIST)/lib/$(LIB_PREFIX)nssckfw.$(LIB_SUFFIX) \ @@ -66,5 +49,6 @@ ifndef NSS_CERTDATA_TXT NSS_CERTDATA_TXT = certdata.txt endif -$(OBJDIR)/certdata.c: $(NSS_CERTDATA_TXT) certdata.perl | $$(@D)/d +$(OBJDIR)/certdata.c: $(NSS_CERTDATA_TXT) certdata.perl + @$(MAKE_OBJDIR) $(PERL) certdata.perl $(NSS_CERTDATA_TXT) $@ diff --git a/security/nss/lib/ckfw/builtins/config.mk b/security/nss/lib/ckfw/builtins/config.mk new file mode 100644 index 0000000000..6bd62f1558 --- /dev/null +++ b/security/nss/lib/ckfw/builtins/config.mk @@ -0,0 +1,38 @@ +# +# 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/. + +# +# Override TARGETS variable so that only shared libraries +# are specifed as dependencies within rules.mk. +# + +TARGETS = $(SHARED_LIBRARY) +LIBRARY = +IMPORT_LIBRARY = +PROGRAM = + +ifeq (,$(filter-out WIN%,$(OS_TARGET))) + SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX) + RES = $(OBJDIR)/$(LIBRARY_NAME).res + RESNAME = $(LIBRARY_NAME).rc +endif + +ifdef BUILD_IDG + DEFINES += -DNSSDEBUG +endif + +# Needed for compilation of $(OBJDIR)/certdata.c +INCLUDES += -I. + +# +# To create a loadable module on Darwin, we must use -bundle. +# +ifeq ($(OS_TARGET),Darwin) +DSO_LDOPTS = -bundle +endif + +ifdef USE_GCOV +DSO_LDOPTS += --coverage +endif diff --git a/security/nss/lib/ckfw/builtins/manifest.mn b/security/nss/lib/ckfw/builtins/manifest.mn index 88e5237ce8..5e6740f893 100644 --- a/security/nss/lib/ckfw/builtins/manifest.mn +++ b/security/nss/lib/ckfw/builtins/manifest.mn @@ -8,6 +8,7 @@ CORE_DEPTH = ../../.. DIRS = testlib MODULE = nss +MAPFILE = $(OBJDIR)/nssckbi.def EXPORTS = \ nssckbi.h \ @@ -29,6 +30,3 @@ CSRCS = \ REQUIRES = nspr LIBRARY_NAME = nssckbi -MAPFILE = $(OBJDIR)/$(LIBRARY_NAME).def -LIBRARY = $(NULL) -IMPORT_LIBRARY = $(NULL) diff --git a/security/nss/lib/ckfw/builtins/testlib/Makefile b/security/nss/lib/ckfw/builtins/testlib/Makefile index 9eb29ddfa4..0f3d6c4498 100644 --- a/security/nss/lib/ckfw/builtins/testlib/Makefile +++ b/security/nss/lib/ckfw/builtins/testlib/Makefile @@ -4,26 +4,8 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. include manifest.mn - include $(CORE_DEPTH)/coreconf/config.mk - -ifdef BUILD_IDG -DEFINES += -DNSSDEBUG -endif - -# Needed for compilation of $(OBJDIR)/certdata.c -INCLUDES += -I. - -# -# To create a loadable module on Darwin, we must use -bundle. -# -ifeq ($(OS_TARGET),Darwin) -DSO_LDOPTS = -bundle -endif - -ifdef USE_GCOV -DSO_LDOPTS += --coverage -endif +include config.mk EXTRA_LIBS = \ $(DIST)/lib/$(LIB_PREFIX)nssckfw.$(LIB_SUFFIX) \ @@ -70,6 +52,7 @@ ifndef NSS_CERTDATA-TESTLIB_TXT NSS_CERTDATA-TESTLIB_TXT = certdata-testlib.txt endif -$(OBJDIR)/certdata-testlib.c: $(NSS_CERTDATA-TESTLIB_TXT) | $$(@D)/d +$(OBJDIR)/certdata-testlib.c: $(NSS_CERTDATA-TESTLIB_TXT) + @$(MAKE_OBJDIR) $(PERL) ../certdata.perl $(NSS_CERTDATA-TESTLIB_TXT) $@ diff --git a/security/nss/lib/ckfw/builtins/testlib/config.mk b/security/nss/lib/ckfw/builtins/testlib/config.mk new file mode 100644 index 0000000000..39a39dae9b --- /dev/null +++ b/security/nss/lib/ckfw/builtins/testlib/config.mk @@ -0,0 +1,38 @@ +# +# 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/. + +# +# Override TARGETS variable so that only shared libraries +# are specifed as dependencies within rules.mk. +# + +TARGETS = $(SHARED_LIBRARY) +LIBRARY = +IMPORT_LIBRARY = +PROGRAM = + +ifeq (,$(filter-out WIN%,$(OS_TARGET))) + SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX) + RES = $(OBJDIR)/$(LIBRARY_NAME).res + RESNAME = $(LIBRARY_NAME).rc +endif + +ifdef BUILD_IDG + DEFINES += -DNSSDEBUG +endif + +# Needed for compilation of $(OBJDIR)/certdata.c +INCLUDES += -I. + +# +# To create a loadable module on Darwin, we must use -bundle. +# +ifeq ($(OS_TARGET),Darwin) +DSO_LDOPTS = -bundle +endif + +ifdef USE_GCOV +DSO_LDOPTS += --coverage +endif diff --git a/security/nss/lib/ckfw/builtins/testlib/manifest.mn b/security/nss/lib/ckfw/builtins/testlib/manifest.mn index e840a88699..4500a903eb 100644 --- a/security/nss/lib/ckfw/builtins/testlib/manifest.mn +++ b/security/nss/lib/ckfw/builtins/testlib/manifest.mn @@ -23,4 +23,3 @@ CSRCS = \ REQUIRES = nspr LIBRARY_NAME = nssckbi-testlib -LIBRARY = $(NULL) diff --git a/security/nss/lib/ckfw/capi/Makefile b/security/nss/lib/ckfw/capi/Makefile index 3949d18e29..81780d2f37 100644 --- a/security/nss/lib/ckfw/capi/Makefile +++ b/security/nss/lib/ckfw/capi/Makefile @@ -5,17 +5,7 @@ include manifest.mn include $(CORE_DEPTH)/coreconf/config.mk - -ifdef BUILD_IDG -DEFINES += -DNSSDEBUG -endif - -# -# To create a loadable module on Darwin, we must use -bundle. -# -ifeq ($(OS_TARGET),Darwin) -DSO_LDOPTS = -bundle -endif +include config.mk EXTRA_LIBS = \ $(DIST)/lib/$(LIB_PREFIX)nssckfw.$(LIB_SUFFIX) \ @@ -70,7 +60,8 @@ DSO_LDOPTS = -bM:SRE -bh:4 -bnoentry EXTRA_DSO_LDOPTS = -lc MKSHLIB = xlC $(DSO_LDOPTS) -$(SHARED_LIBRARY): $(OBJS) | $$(@D)/d +$(SHARED_LIBRARY): $(OBJS) + @$(MAKE_OBJDIR) rm -f $@ $(MKSHLIB) -o $@ $(OBJS) $(EXTRA_LIBS) $(EXTRA_DSO_LDOPTS) chmod +x $@ @@ -80,3 +71,5 @@ endif ifeq ($(OS_TARGET)$(OS_RELEASE), AIX4.2) LD += -G endif + + diff --git a/security/nss/lib/ckfw/capi/config.mk b/security/nss/lib/ckfw/capi/config.mk new file mode 100644 index 0000000000..ec0a86271c --- /dev/null +++ b/security/nss/lib/ckfw/capi/config.mk @@ -0,0 +1,31 @@ +# +# 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/. + +# +# Override TARGETS variable so that only shared libraries +# are specifed as dependencies within rules.mk. +# + +TARGETS = $(SHARED_LIBRARY) +LIBRARY = +IMPORT_LIBRARY = +PROGRAM = + +ifeq (,$(filter-out WIN%,$(OS_TARGET))) + SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX) + RES = $(OBJDIR)/$(LIBRARY_NAME).res + RESNAME = $(LIBRARY_NAME).rc +endif + +ifdef BUILD_IDG + DEFINES += -DNSSDEBUG +endif + +# +# To create a loadable module on Darwin, we must use -bundle. +# +ifeq ($(OS_TARGET),Darwin) +DSO_LDOPTS = -bundle +endif diff --git a/security/nss/lib/ckfw/capi/manifest.mn b/security/nss/lib/ckfw/capi/manifest.mn index c1003d00e0..38effd7591 100644 --- a/security/nss/lib/ckfw/capi/manifest.mn +++ b/security/nss/lib/ckfw/capi/manifest.mn @@ -6,6 +6,7 @@ CORE_DEPTH = ../../../.. MODULE = nss +MAPFILE = $(OBJDIR)/nsscapi.def EXPORTS = \ nsscapi.h \ @@ -28,8 +29,5 @@ CSRCS = \ REQUIRES = nspr LIBRARY_NAME = nsscapi -MAPFILE = $(OBJDIR)/$(LIBRARY_NAME).def -LIBRARY = $(NULL) -IMPORT_LIBRARY = $(NULL) #EXTRA_SHARED_LIBS = -L$(DIST)/lib -lnssckfw -lnssb -lplc4 -lplds4 diff --git a/security/nss/lib/ckfw/config.mk b/security/nss/lib/ckfw/config.mk new file mode 100644 index 0000000000..a3ed5aed21 --- /dev/null +++ b/security/nss/lib/ckfw/config.mk @@ -0,0 +1,25 @@ +# +# 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/. + +ifdef BUILD_IDG +DEFINES += -DNSSDEBUG +endif + +# +# Hack to see if everything still builds +# + + +# +# Override TARGETS variable so that only static libraries +# are specifed as dependencies within rules.mk. +# + +TARGETS = $(LIBRARY) +SHARED_LIBRARY = +IMPORT_LIBRARY = +PROGRAM = + + diff --git a/security/nss/lib/ckfw/dbm/Makefile b/security/nss/lib/ckfw/dbm/Makefile index 3c4ab7e7a7..07ae9676aa 100644 --- a/security/nss/lib/ckfw/dbm/Makefile +++ b/security/nss/lib/ckfw/dbm/Makefile @@ -4,10 +4,6 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. include manifest.mn +include config.mk include $(CORE_DEPTH)/coreconf/config.mk - -ifdef BUILD_IDG -DEFINES += -DNSSDEBUG -endif - include $(CORE_DEPTH)/coreconf/rules.mk diff --git a/security/nss/lib/ckfw/dbm/config.mk b/security/nss/lib/ckfw/dbm/config.mk new file mode 100644 index 0000000000..a1991e5f4d --- /dev/null +++ b/security/nss/lib/ckfw/dbm/config.mk @@ -0,0 +1,8 @@ +# +# 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/. + +ifdef BUILD_IDG +DEFINES += -DNSSDEBUG +endif diff --git a/security/nss/lib/ckfw/dbm/manifest.mn b/security/nss/lib/ckfw/dbm/manifest.mn index ec773755dd..1f87f4353c 100644 --- a/security/nss/lib/ckfw/dbm/manifest.mn +++ b/security/nss/lib/ckfw/dbm/manifest.mn @@ -21,6 +21,5 @@ CSRCS = \ REQUIRES = dbm nspr LIBRARY_NAME = nssckdbm -LIBRARY = $(NULL) EXTRA_SHARED_LIBS = -L$(DIST)/lib -lnssckfw -lnssb -ldbm -lnspr4 -lplc4 -lplds4 diff --git a/security/nss/lib/ckfw/manifest.mn b/security/nss/lib/ckfw/manifest.mn index 8991495e4a..4f798ad61b 100644 --- a/security/nss/lib/ckfw/manifest.mn +++ b/security/nss/lib/ckfw/manifest.mn @@ -48,7 +48,6 @@ CSRCS = \ REQUIRES = nspr LIBRARY_NAME = nssckfw -SHARED_LIBRARY = $(NULL) # This part of the code, including all sub-dirs, can be optimized for size export ALLOW_OPT_CODE_SIZE = 1 diff --git a/security/nss/lib/crmf/Makefile b/security/nss/lib/crmf/Makefile index 609d4adefe..142bacf822 100644 --- a/security/nss/lib/crmf/Makefile +++ b/security/nss/lib/crmf/Makefile @@ -27,6 +27,8 @@ include $(CORE_DEPTH)/coreconf/config.mk # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### +include config.mk + ####################################################################### # (5) Execute "global" rules. (OPTIONAL) # ####################################################################### diff --git a/security/nss/lib/crmf/config.mk b/security/nss/lib/crmf/config.mk new file mode 100644 index 0000000000..dc39ee4d6a --- /dev/null +++ b/security/nss/lib/crmf/config.mk @@ -0,0 +1,16 @@ +# +# 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/. + + +# +# Override TARGETS variable so that only static libraries +# are specifed as dependencies within rules.mk. +# + +TARGETS = $(LIBRARY) +SHARED_LIBRARY = +IMPORT_LIBRARY = +PROGRAM = + diff --git a/security/nss/lib/crmf/manifest.mn b/security/nss/lib/crmf/manifest.mn index 8c687ea243..9f177b9ca0 100644 --- a/security/nss/lib/crmf/manifest.mn +++ b/security/nss/lib/crmf/manifest.mn @@ -41,7 +41,6 @@ CSRCS = crmfenc.c \ $(NULL) LIBRARY_NAME = crmf -SHARED_LIBRARY = $(NULL) # This part of the code, including all sub-dirs, can be optimized for size export ALLOW_OPT_CODE_SIZE = 1 diff --git a/security/nss/lib/cryptohi/Makefile b/security/nss/lib/cryptohi/Makefile index aae54b1e0f..c3bb95f00d 100644 --- a/security/nss/lib/cryptohi/Makefile +++ b/security/nss/lib/cryptohi/Makefile @@ -26,6 +26,8 @@ include $(CORE_DEPTH)/coreconf/config.mk # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### +-include config.mk + ####################################################################### # (5) Execute "global" rules. (OPTIONAL) # ####################################################################### diff --git a/security/nss/lib/cryptohi/config.mk b/security/nss/lib/cryptohi/config.mk new file mode 100644 index 0000000000..b8c03de796 --- /dev/null +++ b/security/nss/lib/cryptohi/config.mk @@ -0,0 +1,15 @@ +# +# 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/. + +# +# Override TARGETS variable so that only static libraries +# are specifed as dependencies within rules.mk. +# + +TARGETS = $(LIBRARY) +SHARED_LIBRARY = +IMPORT_LIBRARY = +PROGRAM = + diff --git a/security/nss/lib/cryptohi/manifest.mn b/security/nss/lib/cryptohi/manifest.mn index 6b1a546dd3..896c7ad125 100644 --- a/security/nss/lib/cryptohi/manifest.mn +++ b/security/nss/lib/cryptohi/manifest.mn @@ -9,7 +9,6 @@ MODULE = nss REQUIRES = nssutil LIBRARY_NAME = cryptohi -SHARED_LIBRARY = $(NULL) EXPORTS = \ cryptohi.h \ diff --git a/security/nss/lib/dbm/src/config.mk b/security/nss/lib/dbm/src/config.mk index 7ce86f8c57..eab1805408 100644 --- a/security/nss/lib/dbm/src/config.mk +++ b/security/nss/lib/dbm/src/config.mk @@ -11,6 +11,12 @@ DEFINES += -DMEMMOVE -D__DBINTERFACE_PRIVATE # are specifed as dependencies within rules.mk. # +TARGETS = $(LIBRARY) +SHARED_LIBRARY = +IMPORT_LIBRARY = +PURE_LIBRARY = +PROGRAM = + ifdef SHARED_LIBRARY ifeq (,$(filter-out WIN%,$(OS_TARGET))) DLLBASE=/BASE:0x30000000 diff --git a/security/nss/lib/dbm/src/manifest.mn b/security/nss/lib/dbm/src/manifest.mn index 8b1ad694a5..119044407e 100644 --- a/security/nss/lib/dbm/src/manifest.mn +++ b/security/nss/lib/dbm/src/manifest.mn @@ -26,4 +26,3 @@ CSRCS = db.c \ $(NULL) LIBRARY_NAME = dbm -SHARED_LIBRARY = $(NULL) diff --git a/security/nss/lib/dev/Makefile b/security/nss/lib/dev/Makefile index f41333402c..b5951dc1d4 100644 --- a/security/nss/lib/dev/Makefile +++ b/security/nss/lib/dev/Makefile @@ -4,13 +4,8 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. include manifest.mn - include $(CORE_DEPTH)/coreconf/config.mk - -ifdef BUILD_IDG -DEFINES += -DNSSDEBUG -endif - +include config.mk include $(CORE_DEPTH)/coreconf/rules.mk # On AIX 4.3, IBM xlC_r compiler (version 3.6.6) cannot compile @@ -19,7 +14,8 @@ include $(CORE_DEPTH)/coreconf/rules.mk ifeq ($(OS_TARGET)$(OS_RELEASE),AIX4.3) ifeq ($(USE_64),1) ifndef BUILD_OPT -$(OBJDIR)/ckhelper.o: ckhelper.c | $$(@D)/d +$(OBJDIR)/ckhelper.o: ckhelper.c + @$(MAKE_OBJDIR) $(CC) -o $@ -c -O2 $(CFLAGS) $< endif endif diff --git a/security/nss/lib/dev/config.mk b/security/nss/lib/dev/config.mk new file mode 100644 index 0000000000..2676cd5370 --- /dev/null +++ b/security/nss/lib/dev/config.mk @@ -0,0 +1,19 @@ +# +# 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/. + +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 = + diff --git a/security/nss/lib/dev/manifest.mn b/security/nss/lib/dev/manifest.mn index 449ae58e3c..4a5b812dc8 100644 --- a/security/nss/lib/dev/manifest.mn +++ b/security/nss/lib/dev/manifest.mn @@ -27,7 +27,6 @@ CSRCS = \ REQUIRES = nspr LIBRARY_NAME = nssdev -SHARED_LIBRARY = $(NULL) # This part of the code, including all sub-dirs, can be optimized for size export ALLOW_OPT_CODE_SIZE = 1 diff --git a/security/nss/lib/freebl/Makefile b/security/nss/lib/freebl/Makefile index 2851474b95..aa6960fe37 100644 --- a/security/nss/lib/freebl/Makefile +++ b/security/nss/lib/freebl/Makefile @@ -649,10 +649,12 @@ $(OBJDIR)/ldvector$(OBJ_SUFFIX) $(OBJDIR)/loader$(OBJ_SUFFIX) : loader.h ifeq ($(SYSV_SPARC),1) -$(OBJDIR)/mpv_sparcv8.o $(OBJDIR)/mpv_sparcv8x.o $(OBJDIR)/montmulfv8.o : $(OBJDIR)/%.o : %.s | $$(@D)/d +$(OBJDIR)/mpv_sparcv8.o $(OBJDIR)/mpv_sparcv8x.o $(OBJDIR)/montmulfv8.o : $(OBJDIR)/%.o : %.s + @$(MAKE_OBJDIR) $(SOLARIS_AS) -o $@ $(SOLARIS_AS_FLAGS) $< -$(OBJDIR)/mpv_sparcv9.o $(OBJDIR)/montmulfv9.o : $(OBJDIR)/%.o : %.s | $$(@D)/d +$(OBJDIR)/mpv_sparcv9.o $(OBJDIR)/montmulfv9.o : $(OBJDIR)/%.o : %.s + @$(MAKE_OBJDIR) $(SOLARIS_AS) -o $@ $(SOLARIS_AS_FLAGS) $< $(OBJDIR)/mpmontg.o: mpmontg.c montmulf.h @@ -663,35 +665,117 @@ ifndef FREEBL_CHILD_BUILD # Parent build. This is where we decide which shared libraries to build -# too suppress the SINGLE_SHLIB override warning -FREEBL_OBJDIRS := +ifdef FREEBL_BUILD_SINGLE_SHLIB -define target_freebl_SHLIB -ifdef $(2) -$(1)_DIR = $$(OBJDIR)/$$(OS_TARGET)_$(1) -ALL_TRASH += $$($(1)_DIR) +################### Single shared lib stuff ######################### +SINGLE_SHLIB_DIR = $(OBJDIR)/$(OS_TARGET)_SINGLE_SHLIB +ALL_TRASH += $(SINGLE_SHLIB_DIR) -ifeq (,$$(filter $$($(1)_DIR)/d,$$(FREEBL_OBJDIRS))) -FREEBL_OBJDIRS += $$($(1)_DIR)/d +$(SINGLE_SHLIB_DIR): + -mkdir -p $(SINGLE_SHLIB_DIR) + +release_md:: freebl_single_shlib +libs: freebl_single_shlib +freebl_single_shlib: | $(SINGLE_SHLIB_DIR) + $(MAKE) FREEBL_CHILD_BUILD=1 \ + OBJDIR=$(SINGLE_SHLIB_DIR) libs +######################## common stuff ######################### + +endif + +ifdef NEED_STUB_BUILD +SINGLE_SHLIB_DIR = $(OBJDIR)/$(OS_TARGET)_SINGLE_SHLIB +ALL_TRASH += $(SINGLE_SHLIB_DIR) +$(SINGLE_SHLIB_DIR): + -mkdir $(SINGLE_SHLIB_DIR) + +release_md:: freebl_stub_build +libs: freebl_stub_build +freebl_stub_build: | $(SINGLE_SHLIB_DIR) + $(MAKE) FREEBL_CHILD_BUILD=1 USE_STUB_BUILD=1 \ + OBJDIR=$(SINGLE_SHLIB_DIR) libs +endif + +# multiple shared libraries + +######################## ABI32_FPU stuff ######################### +ifdef HAVE_ABI32_FPU +ABI32_FPU_DIR = $(OBJDIR)/$(OS_TARGET)_ABI32_FPU +ALL_TRASH += $(ABI32_FPU_DIR) + +$(ABI32_FPU_DIR): + -mkdir $(ABI32_FPU_DIR) + +release_md:: freebl_ABI32_FPU +libs: freebl_ABI32_FPU +freebl_ABI32_FPU: | $(ABI32_FPU_DIR) + $(MAKE) FREEBL_CHILD_BUILD=1 USE_ABI32_FPU=1 \ + OBJDIR=$(ABI32_FPU_DIR) libs endif -release_md:: freebl_$(2) -libs: freebl_$(2) -freebl_$(2): | $$($(1)_DIR)/d - $$(MAKE) FREEBL_CHILD_BUILD=1 $(3)=1 OBJDIR=$$($(1)_DIR) libs +######################## ABI32_INT32 stuff ######################### +ifdef HAVE_ABI32_INT32 +ABI32_INT32_DIR = $(OBJDIR)/$(OS_TARGET)_ABI32_INT32 +ALL_TRASH += $(ABI32_INT32_DIR) + +$(ABI32_INT32_DIR): + -mkdir $(ABI32_INT32_DIR) + +release_md:: freebl_ABI32_INT32 +libs: freebl_ABI32_INT32 +freebl_ABI32_INT32: | $(ABI32_INT32_DIR) + $(MAKE) FREEBL_CHILD_BUILD=1 USE_ABI32_INT32=1 \ + OBJDIR=$(ABI32_INT32_DIR) libs endif -endef # target_freebl_SHLIB -target_freebl_ABI = $(call target_freebl_SHLIB,$(1),HAVE_$(1),USE_$(1)) +######################## ABI32_INT64 stuff ######################### +ifdef HAVE_ABI32_INT64 +ABI32_INT64_DIR = $(OBJDIR)/$(OS_TARGET)_ABI32_INT64 +ALL_TRASH += $(ABI32_INT64_DIR) -$(eval $(call target_freebl_SHLIB,SINGLE_SHLIB,FREEBL_BUILD_SINGLE_SHLIB,NEEDED_DUMMY)) -$(eval $(call target_freebl_SHLIB,SINGLE_SHLIB,NEED_STUB_BUILD,USE_STUB_BUILD)) +$(ABI32_INT64_DIR): + -mkdir $(ABI32_INT64_DIR) -$(eval $(call target_freebl_ABI,ABI32_FPU)) -$(eval $(call target_freebl_ABI,ABI32_INT32)) -$(eval $(call target_freebl_ABI,ABI32_INT64)) -$(eval $(call target_freebl_ABI,ABI64_FPU)) -$(eval $(call target_freebl_ABI,ABI64_INT)) +release_md:: freebl_ABI32_INT64 +libs: freebl_ABI32_INT64 +freebl_ABI32_INT64: | $(ABI32_INT64_DIR) + $(MAKE) FREEBL_CHILD_BUILD=1 USE_ABI32_INT64=1\ + OBJDIR=$(ABI32_INT64_DIR) libs +endif + +######################## END of 32-bit stuff ######################### + +# above is 32-bit builds, below is 64-bit builds + +######################## ABI64_FPU stuff ######################### +ifdef HAVE_ABI64_FPU +ABI64_FPU_DIR = $(OBJDIR)/$(OS_TARGET)_ABI64_FPU +ALL_TRASH += $(ABI64_FPU_DIR) + +$(ABI64_FPU_DIR): + -mkdir $(ABI64_FPU_DIR) + +release_md:: freebl_ABI64_FPU +libs: freebl_ABI64_FPU +freebl_ABI64_FPU: | $(ABI64_FPU_DIR) + $(MAKE) FREEBL_CHILD_BUILD=1 USE_ABI64_FPU=1 \ + OBJDIR=$(ABI64_FPU_DIR) libs +endif + +######################## ABI64_INT stuff ######################### +ifdef HAVE_ABI64_INT +ABI64_INT_DIR = $(OBJDIR)/$(OS_TARGET)_ABI64_INT +ALL_TRASH += $(ABI64_INT_DIR) + +$(ABI64_INT_DIR): + -mkdir $(ABI64_INT_DIR) + +release_md:: freebl_ABI64_INT +libs: freebl_ABI64_INT +freebl_ABI64_INT: | $(ABI64_INT_DIR) + $(MAKE) FREEBL_CHILD_BUILD=1 USE_ABI64_INT=1 \ + OBJDIR=$(ABI64_INT_DIR) libs +endif endif # FREEBL_CHILD_BUILD @@ -700,7 +784,8 @@ endif # FREEBL_CHILD_BUILD # ANSI C's strict aliasing rules. ifeq ($(OS_TARGET),Linux) ifneq ($(CPU_ARCH),x86) -$(OBJDIR)/$(PROG_PREFIX)desblapi$(OBJ_SUFFIX): desblapi.c | $$(@D)/d +$(OBJDIR)/$(PROG_PREFIX)desblapi$(OBJ_SUFFIX): desblapi.c + @$(MAKE_OBJDIR) ifdef NEED_ABSOLUTE_PATH $(CC) -o $@ -c $(CFLAGS) -fno-strict-aliasing $(call core_abspath,$<) else diff --git a/security/nss/lib/freebl/config.mk b/security/nss/lib/freebl/config.mk index a4182a4186..918a66363f 100644 --- a/security/nss/lib/freebl/config.mk +++ b/security/nss/lib/freebl/config.mk @@ -47,6 +47,10 @@ endif ifeq (,$(filter-out WIN%,$(OS_TARGET))) +# don't want the 32 in the shared library name +SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX) + +RES = $(OBJDIR)/$(LIBRARY_NAME).res RESNAME = freebl.rc ifdef NS_USE_GCC diff --git a/security/nss/lib/jar/Makefile b/security/nss/lib/jar/Makefile index 650c2ae861..245c127a47 100644 --- a/security/nss/lib/jar/Makefile +++ b/security/nss/lib/jar/Makefile @@ -5,19 +5,7 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. include manifest.mn - include $(CORE_DEPTH)/coreconf/config.mk - -# NSS_X86 means the target is a 32-bits x86 CPU architecture -# NSS_X64 means the target is a 64-bits x64 CPU architecture -# NSS_X86_OR_X64 means the target is either x86 or x64 -ifeq (,$(filter-out i386 x386 x86 x86_64,$(CPU_ARCH))) - DEFINES += -DNSS_X86_OR_X64 -ifdef USE_64 - DEFINES += -DNSS_X64 -else - DEFINES += -DNSS_X86 -endif -endif - +include config.mk include $(CORE_DEPTH)/coreconf/rules.mk + diff --git a/security/nss/lib/jar/config.mk b/security/nss/lib/jar/config.mk new file mode 100644 index 0000000000..1412dcc594 --- /dev/null +++ b/security/nss/lib/jar/config.mk @@ -0,0 +1,26 @@ +# +# 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/. + +# +# Override TARGETS variable so that only static libraries +# are specifed as dependencies within rules.mk. +# + +TARGETS = $(LIBRARY) +SHARED_LIBRARY = +IMPORT_LIBRARY = +PROGRAM = + +# NSS_X86 means the target is a 32-bits x86 CPU architecture +# NSS_X64 means the target is a 64-bits x64 CPU architecture +# NSS_X86_OR_X64 means the target is either x86 or x64 +ifeq (,$(filter-out i386 x386 x86 x86_64,$(CPU_ARCH))) + DEFINES += -DNSS_X86_OR_X64 +ifdef USE_64 + DEFINES += -DNSS_X64 +else + DEFINES += -DNSS_X86 +endif +endif diff --git a/security/nss/lib/jar/manifest.mn b/security/nss/lib/jar/manifest.mn index bcfff578dc..5b516886a9 100644 --- a/security/nss/lib/jar/manifest.mn +++ b/security/nss/lib/jar/manifest.mn @@ -5,7 +5,6 @@ MODULE = nss LIBRARY_NAME = jar -SHARED_LIBRARY = $(NULL) CORE_DEPTH = ../.. diff --git a/security/nss/lib/libpkix/Makefile b/security/nss/lib/libpkix/Makefile index bb88772853..c3cb5ef8be 100755 --- a/security/nss/lib/libpkix/Makefile +++ b/security/nss/lib/libpkix/Makefile @@ -26,6 +26,8 @@ include $(CORE_DEPTH)/coreconf/config.mk # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### +include config.mk + ####################################################################### # (5) Execute "global" rules. (OPTIONAL) # ####################################################################### diff --git a/security/nss/lib/libpkix/config.mk b/security/nss/lib/libpkix/config.mk new file mode 100644 index 0000000000..5d75e1c043 --- /dev/null +++ b/security/nss/lib/libpkix/config.mk @@ -0,0 +1,16 @@ +# +# 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/. + +# +# Override TARGETS variable so that only static libraries +# are specifed as dependencies within rules.mk. +# +# DEFINES+=-DPKIX_LISTDEBUG Can be used to turn on debug compilation + +TARGETS = $(LIBRARY) +SHARED_LIBRARY = +IMPORT_LIBRARY = +PROGRAM = + diff --git a/security/nss/lib/libpkix/include/Makefile b/security/nss/lib/libpkix/include/Makefile index d714361be7..c3cb5ef8be 100755 --- a/security/nss/lib/libpkix/include/Makefile +++ b/security/nss/lib/libpkix/include/Makefile @@ -26,6 +26,7 @@ include $(CORE_DEPTH)/coreconf/config.mk # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### +include config.mk ####################################################################### # (5) Execute "global" rules. (OPTIONAL) # diff --git a/security/nss/lib/libpkix/include/config.mk b/security/nss/lib/libpkix/include/config.mk new file mode 100644 index 0000000000..b8c03de796 --- /dev/null +++ b/security/nss/lib/libpkix/include/config.mk @@ -0,0 +1,15 @@ +# +# 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/. + +# +# Override TARGETS variable so that only static libraries +# are specifed as dependencies within rules.mk. +# + +TARGETS = $(LIBRARY) +SHARED_LIBRARY = +IMPORT_LIBRARY = +PROGRAM = + diff --git a/security/nss/lib/libpkix/pkix/Makefile b/security/nss/lib/libpkix/pkix/Makefile index d714361be7..c3cb5ef8be 100755 --- a/security/nss/lib/libpkix/pkix/Makefile +++ b/security/nss/lib/libpkix/pkix/Makefile @@ -26,6 +26,7 @@ include $(CORE_DEPTH)/coreconf/config.mk # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### +include config.mk ####################################################################### # (5) Execute "global" rules. (OPTIONAL) # diff --git a/security/nss/lib/libpkix/pkix/certsel/Makefile b/security/nss/lib/libpkix/pkix/certsel/Makefile index d714361be7..c3cb5ef8be 100755 --- a/security/nss/lib/libpkix/pkix/certsel/Makefile +++ b/security/nss/lib/libpkix/pkix/certsel/Makefile @@ -26,6 +26,7 @@ include $(CORE_DEPTH)/coreconf/config.mk # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### +include config.mk ####################################################################### # (5) Execute "global" rules. (OPTIONAL) # diff --git a/security/nss/lib/libpkix/pkix/certsel/config.mk b/security/nss/lib/libpkix/pkix/certsel/config.mk new file mode 100644 index 0000000000..b8c03de796 --- /dev/null +++ b/security/nss/lib/libpkix/pkix/certsel/config.mk @@ -0,0 +1,15 @@ +# +# 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/. + +# +# Override TARGETS variable so that only static libraries +# are specifed as dependencies within rules.mk. +# + +TARGETS = $(LIBRARY) +SHARED_LIBRARY = +IMPORT_LIBRARY = +PROGRAM = + diff --git a/security/nss/lib/libpkix/pkix/certsel/manifest.mn b/security/nss/lib/libpkix/pkix/certsel/manifest.mn index eb434bd531..8e28df5857 100755 --- a/security/nss/lib/libpkix/pkix/certsel/manifest.mn +++ b/security/nss/lib/libpkix/pkix/certsel/manifest.mn @@ -17,4 +17,4 @@ CSRCS = \ $(NULL) LIBRARY_NAME = pkixcertsel -SHARED_LIBRARY = $(NULL) + diff --git a/security/nss/lib/libpkix/pkix/checker/Makefile b/security/nss/lib/libpkix/pkix/checker/Makefile index d714361be7..c3cb5ef8be 100755 --- a/security/nss/lib/libpkix/pkix/checker/Makefile +++ b/security/nss/lib/libpkix/pkix/checker/Makefile @@ -26,6 +26,7 @@ include $(CORE_DEPTH)/coreconf/config.mk # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### +include config.mk ####################################################################### # (5) Execute "global" rules. (OPTIONAL) # diff --git a/security/nss/lib/libpkix/pkix/checker/config.mk b/security/nss/lib/libpkix/pkix/checker/config.mk new file mode 100644 index 0000000000..b8c03de796 --- /dev/null +++ b/security/nss/lib/libpkix/pkix/checker/config.mk @@ -0,0 +1,15 @@ +# +# 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/. + +# +# Override TARGETS variable so that only static libraries +# are specifed as dependencies within rules.mk. +# + +TARGETS = $(LIBRARY) +SHARED_LIBRARY = +IMPORT_LIBRARY = +PROGRAM = + diff --git a/security/nss/lib/libpkix/pkix/checker/manifest.mn b/security/nss/lib/libpkix/pkix/checker/manifest.mn index 84a372cea9..da99416fa3 100755 --- a/security/nss/lib/libpkix/pkix/checker/manifest.mn +++ b/security/nss/lib/libpkix/pkix/checker/manifest.mn @@ -39,4 +39,4 @@ CSRCS = \ $(NULL) LIBRARY_NAME = pkixchecker -SHARED_LIBRARY = $(NULL) + diff --git a/security/nss/lib/libpkix/pkix/config.mk b/security/nss/lib/libpkix/pkix/config.mk new file mode 100644 index 0000000000..b8c03de796 --- /dev/null +++ b/security/nss/lib/libpkix/pkix/config.mk @@ -0,0 +1,15 @@ +# +# 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/. + +# +# Override TARGETS variable so that only static libraries +# are specifed as dependencies within rules.mk. +# + +TARGETS = $(LIBRARY) +SHARED_LIBRARY = +IMPORT_LIBRARY = +PROGRAM = + diff --git a/security/nss/lib/libpkix/pkix/crlsel/Makefile b/security/nss/lib/libpkix/pkix/crlsel/Makefile index d714361be7..c3cb5ef8be 100755 --- a/security/nss/lib/libpkix/pkix/crlsel/Makefile +++ b/security/nss/lib/libpkix/pkix/crlsel/Makefile @@ -26,6 +26,7 @@ include $(CORE_DEPTH)/coreconf/config.mk # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### +include config.mk ####################################################################### # (5) Execute "global" rules. (OPTIONAL) # diff --git a/security/nss/lib/libpkix/pkix/crlsel/config.mk b/security/nss/lib/libpkix/pkix/crlsel/config.mk new file mode 100644 index 0000000000..b8c03de796 --- /dev/null +++ b/security/nss/lib/libpkix/pkix/crlsel/config.mk @@ -0,0 +1,15 @@ +# +# 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/. + +# +# Override TARGETS variable so that only static libraries +# are specifed as dependencies within rules.mk. +# + +TARGETS = $(LIBRARY) +SHARED_LIBRARY = +IMPORT_LIBRARY = +PROGRAM = + diff --git a/security/nss/lib/libpkix/pkix/crlsel/manifest.mn b/security/nss/lib/libpkix/pkix/crlsel/manifest.mn index fe84a2d62f..0ad81055e6 100755 --- a/security/nss/lib/libpkix/pkix/crlsel/manifest.mn +++ b/security/nss/lib/libpkix/pkix/crlsel/manifest.mn @@ -17,4 +17,4 @@ CSRCS = \ $(NULL) LIBRARY_NAME = pkixcrlsel -SHARED_LIBRARY = $(NULL) + diff --git a/security/nss/lib/libpkix/pkix/params/Makefile b/security/nss/lib/libpkix/pkix/params/Makefile index d714361be7..c3cb5ef8be 100755 --- a/security/nss/lib/libpkix/pkix/params/Makefile +++ b/security/nss/lib/libpkix/pkix/params/Makefile @@ -26,6 +26,7 @@ include $(CORE_DEPTH)/coreconf/config.mk # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### +include config.mk ####################################################################### # (5) Execute "global" rules. (OPTIONAL) # diff --git a/security/nss/lib/libpkix/pkix/params/config.mk b/security/nss/lib/libpkix/pkix/params/config.mk new file mode 100644 index 0000000000..b8c03de796 --- /dev/null +++ b/security/nss/lib/libpkix/pkix/params/config.mk @@ -0,0 +1,15 @@ +# +# 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/. + +# +# Override TARGETS variable so that only static libraries +# are specifed as dependencies within rules.mk. +# + +TARGETS = $(LIBRARY) +SHARED_LIBRARY = +IMPORT_LIBRARY = +PROGRAM = + diff --git a/security/nss/lib/libpkix/pkix/params/manifest.mn b/security/nss/lib/libpkix/pkix/params/manifest.mn index 2a77bf0eea..604f21f542 100755 --- a/security/nss/lib/libpkix/pkix/params/manifest.mn +++ b/security/nss/lib/libpkix/pkix/params/manifest.mn @@ -21,4 +21,4 @@ CSRCS = \ $(NULL) LIBRARY_NAME = pkixparams -SHARED_LIBRARY = $(NULL) + diff --git a/security/nss/lib/libpkix/pkix/results/Makefile b/security/nss/lib/libpkix/pkix/results/Makefile index d714361be7..c3cb5ef8be 100755 --- a/security/nss/lib/libpkix/pkix/results/Makefile +++ b/security/nss/lib/libpkix/pkix/results/Makefile @@ -26,6 +26,7 @@ include $(CORE_DEPTH)/coreconf/config.mk # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### +include config.mk ####################################################################### # (5) Execute "global" rules. (OPTIONAL) # diff --git a/security/nss/lib/libpkix/pkix/results/config.mk b/security/nss/lib/libpkix/pkix/results/config.mk new file mode 100644 index 0000000000..b8c03de796 --- /dev/null +++ b/security/nss/lib/libpkix/pkix/results/config.mk @@ -0,0 +1,15 @@ +# +# 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/. + +# +# Override TARGETS variable so that only static libraries +# are specifed as dependencies within rules.mk. +# + +TARGETS = $(LIBRARY) +SHARED_LIBRARY = +IMPORT_LIBRARY = +PROGRAM = + diff --git a/security/nss/lib/libpkix/pkix/results/manifest.mn b/security/nss/lib/libpkix/pkix/results/manifest.mn index bec0270fb6..07bb22e5de 100755 --- a/security/nss/lib/libpkix/pkix/results/manifest.mn +++ b/security/nss/lib/libpkix/pkix/results/manifest.mn @@ -21,4 +21,4 @@ CSRCS = \ $(NULL) LIBRARY_NAME = pkixresults -SHARED_LIBRARY = $(NULL) + diff --git a/security/nss/lib/libpkix/pkix/store/Makefile b/security/nss/lib/libpkix/pkix/store/Makefile index d714361be7..c3cb5ef8be 100755 --- a/security/nss/lib/libpkix/pkix/store/Makefile +++ b/security/nss/lib/libpkix/pkix/store/Makefile @@ -26,6 +26,7 @@ include $(CORE_DEPTH)/coreconf/config.mk # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### +include config.mk ####################################################################### # (5) Execute "global" rules. (OPTIONAL) # diff --git a/security/nss/lib/libpkix/pkix/store/config.mk b/security/nss/lib/libpkix/pkix/store/config.mk new file mode 100644 index 0000000000..b8c03de796 --- /dev/null +++ b/security/nss/lib/libpkix/pkix/store/config.mk @@ -0,0 +1,15 @@ +# +# 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/. + +# +# Override TARGETS variable so that only static libraries +# are specifed as dependencies within rules.mk. +# + +TARGETS = $(LIBRARY) +SHARED_LIBRARY = +IMPORT_LIBRARY = +PROGRAM = + diff --git a/security/nss/lib/libpkix/pkix/store/manifest.mn b/security/nss/lib/libpkix/pkix/store/manifest.mn index 53a54d6cc6..cb64455f8b 100755 --- a/security/nss/lib/libpkix/pkix/store/manifest.mn +++ b/security/nss/lib/libpkix/pkix/store/manifest.mn @@ -15,4 +15,4 @@ CSRCS = \ $(NULL) LIBRARY_NAME = pkixstore -SHARED_LIBRARY = $(NULL) + diff --git a/security/nss/lib/libpkix/pkix/top/Makefile b/security/nss/lib/libpkix/pkix/top/Makefile index d714361be7..c3cb5ef8be 100755 --- a/security/nss/lib/libpkix/pkix/top/Makefile +++ b/security/nss/lib/libpkix/pkix/top/Makefile @@ -26,6 +26,7 @@ include $(CORE_DEPTH)/coreconf/config.mk # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### +include config.mk ####################################################################### # (5) Execute "global" rules. (OPTIONAL) # diff --git a/security/nss/lib/libpkix/pkix/top/config.mk b/security/nss/lib/libpkix/pkix/top/config.mk new file mode 100644 index 0000000000..b8c03de796 --- /dev/null +++ b/security/nss/lib/libpkix/pkix/top/config.mk @@ -0,0 +1,15 @@ +# +# 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/. + +# +# Override TARGETS variable so that only static libraries +# are specifed as dependencies within rules.mk. +# + +TARGETS = $(LIBRARY) +SHARED_LIBRARY = +IMPORT_LIBRARY = +PROGRAM = + diff --git a/security/nss/lib/libpkix/pkix/top/manifest.mn b/security/nss/lib/libpkix/pkix/top/manifest.mn index 5bdd3f300d..8ba169d69f 100755 --- a/security/nss/lib/libpkix/pkix/top/manifest.mn +++ b/security/nss/lib/libpkix/pkix/top/manifest.mn @@ -19,4 +19,4 @@ CSRCS = \ $(NULL) LIBRARY_NAME = pkixtop -SHARED_LIBRARY = $(NULL) + diff --git a/security/nss/lib/libpkix/pkix/util/Makefile b/security/nss/lib/libpkix/pkix/util/Makefile index 2b5492506c..1b75ee75a2 100755 --- a/security/nss/lib/libpkix/pkix/util/Makefile +++ b/security/nss/lib/libpkix/pkix/util/Makefile @@ -26,6 +26,7 @@ include $(CORE_DEPTH)/coreconf/config.mk # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### +include config.mk ####################################################################### # (5) Execute "global" rules. (OPTIONAL) # diff --git a/security/nss/lib/libpkix/pkix/util/config.mk b/security/nss/lib/libpkix/pkix/util/config.mk new file mode 100644 index 0000000000..b8c03de796 --- /dev/null +++ b/security/nss/lib/libpkix/pkix/util/config.mk @@ -0,0 +1,15 @@ +# +# 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/. + +# +# Override TARGETS variable so that only static libraries +# are specifed as dependencies within rules.mk. +# + +TARGETS = $(LIBRARY) +SHARED_LIBRARY = +IMPORT_LIBRARY = +PROGRAM = + diff --git a/security/nss/lib/libpkix/pkix/util/manifest.mn b/security/nss/lib/libpkix/pkix/util/manifest.mn index e7d9f973c7..f18d94beea 100755 --- a/security/nss/lib/libpkix/pkix/util/manifest.mn +++ b/security/nss/lib/libpkix/pkix/util/manifest.mn @@ -22,4 +22,4 @@ CSRCS = \ $(NULL) LIBRARY_NAME = pkixutil -SHARED_LIBRARY = $(NULL) + diff --git a/security/nss/lib/libpkix/pkix_pl_nss/Makefile b/security/nss/lib/libpkix/pkix_pl_nss/Makefile index 2b5492506c..1b75ee75a2 100755 --- a/security/nss/lib/libpkix/pkix_pl_nss/Makefile +++ b/security/nss/lib/libpkix/pkix_pl_nss/Makefile @@ -26,6 +26,7 @@ include $(CORE_DEPTH)/coreconf/config.mk # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### +include config.mk ####################################################################### # (5) Execute "global" rules. (OPTIONAL) # diff --git a/security/nss/lib/libpkix/pkix_pl_nss/config.mk b/security/nss/lib/libpkix/pkix_pl_nss/config.mk new file mode 100644 index 0000000000..b8c03de796 --- /dev/null +++ b/security/nss/lib/libpkix/pkix_pl_nss/config.mk @@ -0,0 +1,15 @@ +# +# 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/. + +# +# Override TARGETS variable so that only static libraries +# are specifed as dependencies within rules.mk. +# + +TARGETS = $(LIBRARY) +SHARED_LIBRARY = +IMPORT_LIBRARY = +PROGRAM = + diff --git a/security/nss/lib/libpkix/pkix_pl_nss/module/Makefile b/security/nss/lib/libpkix/pkix_pl_nss/module/Makefile index e97ad8e4de..c3cb5ef8be 100755 --- a/security/nss/lib/libpkix/pkix_pl_nss/module/Makefile +++ b/security/nss/lib/libpkix/pkix_pl_nss/module/Makefile @@ -26,26 +26,7 @@ include $(CORE_DEPTH)/coreconf/config.mk # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### -ifdef NSS_PKIX_NO_LDAP -LDAP_HEADERS = -LDAP_CSRCS = -else -LDAP_HEADERS = \ - pkix_pl_ldapt.h \ - pkix_pl_ldapcertstore.h \ - pkix_pl_ldapresponse.h \ - pkix_pl_ldaprequest.h \ - pkix_pl_ldapdefaultclient.h \ - $(NULL) - -LDAP_CSRCS = \ - pkix_pl_ldaptemplates.c \ - pkix_pl_ldapcertstore.c \ - pkix_pl_ldapresponse.c \ - pkix_pl_ldaprequest.c \ - pkix_pl_ldapdefaultclient.c \ - $(NULL) -endif +include config.mk ####################################################################### # (5) Execute "global" rules. (OPTIONAL) # diff --git a/security/nss/lib/libpkix/pkix_pl_nss/module/config.mk b/security/nss/lib/libpkix/pkix_pl_nss/module/config.mk new file mode 100644 index 0000000000..2926747a2f --- /dev/null +++ b/security/nss/lib/libpkix/pkix_pl_nss/module/config.mk @@ -0,0 +1,35 @@ +# +# 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/. + +# +# Override TARGETS variable so that only static libraries +# are specifed as dependencies within rules.mk. +# + +TARGETS = $(LIBRARY) +SHARED_LIBRARY = +IMPORT_LIBRARY = +PROGRAM = + +ifdef NSS_PKIX_NO_LDAP +LDAP_HEADERS = +LDAP_CSRCS = +else +LDAP_HEADERS = \ + pkix_pl_ldapt.h \ + pkix_pl_ldapcertstore.h \ + pkix_pl_ldapresponse.h \ + pkix_pl_ldaprequest.h \ + pkix_pl_ldapdefaultclient.h \ + $(NULL) + +LDAP_CSRCS = \ + pkix_pl_ldaptemplates.c \ + pkix_pl_ldapcertstore.c \ + pkix_pl_ldapresponse.c \ + pkix_pl_ldaprequest.c \ + pkix_pl_ldapdefaultclient.c \ + $(NULL) +endif diff --git a/security/nss/lib/libpkix/pkix_pl_nss/module/manifest.mn b/security/nss/lib/libpkix/pkix_pl_nss/module/manifest.mn index 31231e4edf..9ae4d915cc 100755 --- a/security/nss/lib/libpkix/pkix_pl_nss/module/manifest.mn +++ b/security/nss/lib/libpkix/pkix_pl_nss/module/manifest.mn @@ -31,4 +31,4 @@ CSRCS = \ $(NULL) LIBRARY_NAME = pkixmodule -SHARED_LIBRARY = $(NULL) + diff --git a/security/nss/lib/libpkix/pkix_pl_nss/pki/Makefile b/security/nss/lib/libpkix/pkix_pl_nss/pki/Makefile index 2b4b1574ab..a9cebcfecf 100755 --- a/security/nss/lib/libpkix/pkix_pl_nss/pki/Makefile +++ b/security/nss/lib/libpkix/pkix_pl_nss/pki/Makefile @@ -26,6 +26,7 @@ include $(CORE_DEPTH)/coreconf/config.mk # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### +include config.mk ####################################################################### # (5) Execute "global" rules. (OPTIONAL) # diff --git a/security/nss/lib/libpkix/pkix_pl_nss/pki/config.mk b/security/nss/lib/libpkix/pkix_pl_nss/pki/config.mk new file mode 100644 index 0000000000..b8c03de796 --- /dev/null +++ b/security/nss/lib/libpkix/pkix_pl_nss/pki/config.mk @@ -0,0 +1,15 @@ +# +# 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/. + +# +# Override TARGETS variable so that only static libraries +# are specifed as dependencies within rules.mk. +# + +TARGETS = $(LIBRARY) +SHARED_LIBRARY = +IMPORT_LIBRARY = +PROGRAM = + diff --git a/security/nss/lib/libpkix/pkix_pl_nss/pki/manifest.mn b/security/nss/lib/libpkix/pkix_pl_nss/pki/manifest.mn index aba1367e56..7e105e7b92 100755 --- a/security/nss/lib/libpkix/pkix_pl_nss/pki/manifest.mn +++ b/security/nss/lib/libpkix/pkix_pl_nss/pki/manifest.mn @@ -47,4 +47,4 @@ CSRCS = \ $(NULL) LIBRARY_NAME = pkixpki -SHARED_LIBRARY = $(NULL) + diff --git a/security/nss/lib/libpkix/pkix_pl_nss/system/Makefile b/security/nss/lib/libpkix/pkix_pl_nss/system/Makefile index 2b4b1574ab..a9cebcfecf 100755 --- a/security/nss/lib/libpkix/pkix_pl_nss/system/Makefile +++ b/security/nss/lib/libpkix/pkix_pl_nss/system/Makefile @@ -26,6 +26,7 @@ include $(CORE_DEPTH)/coreconf/config.mk # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### +include config.mk ####################################################################### # (5) Execute "global" rules. (OPTIONAL) # diff --git a/security/nss/lib/libpkix/pkix_pl_nss/system/config.mk b/security/nss/lib/libpkix/pkix_pl_nss/system/config.mk new file mode 100644 index 0000000000..b8c03de796 --- /dev/null +++ b/security/nss/lib/libpkix/pkix_pl_nss/system/config.mk @@ -0,0 +1,15 @@ +# +# 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/. + +# +# Override TARGETS variable so that only static libraries +# are specifed as dependencies within rules.mk. +# + +TARGETS = $(LIBRARY) +SHARED_LIBRARY = +IMPORT_LIBRARY = +PROGRAM = + diff --git a/security/nss/lib/libpkix/pkix_pl_nss/system/manifest.mn b/security/nss/lib/libpkix/pkix_pl_nss/system/manifest.mn index a143a03eed..16cb6d0eb7 100755 --- a/security/nss/lib/libpkix/pkix_pl_nss/system/manifest.mn +++ b/security/nss/lib/libpkix/pkix_pl_nss/system/manifest.mn @@ -40,4 +40,4 @@ CSRCS = \ $(NULL) LIBRARY_NAME = pkixsystem -SHARED_LIBRARY = $(NULL) + diff --git a/security/nss/lib/nss/config.mk b/security/nss/lib/nss/config.mk index 3716721d93..a17f3ef5ca 100644 --- a/security/nss/lib/nss/config.mk +++ b/security/nss/lib/nss/config.mk @@ -6,6 +6,13 @@ # 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)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX) +IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX) + +RES = $(OBJDIR)/$(LIBRARY_NAME).res +RESNAME = $(LIBRARY_NAME).rc + ifdef NS_USE_GCC EXTRA_SHARED_LIBS += \ -L$(DIST)/lib \ diff --git a/security/nss/lib/nss/manifest.mn b/security/nss/lib/nss/manifest.mn index 312aa53846..54bed49e63 100644 --- a/security/nss/lib/nss/manifest.mn +++ b/security/nss/lib/nss/manifest.mn @@ -22,9 +22,10 @@ CSRCS = \ utilwrap.c \ $(NULL) +MAPFILE = $(OBJDIR)/nss.def + LIBRARY_NAME = nss LIBRARY_VERSION = 3 -MAPFILE = $(OBJDIR)/$(LIBRARY_NAME).def # This part of the code, including all sub-dirs, can be optimized for size export ALLOW_OPT_CODE_SIZE = 1 diff --git a/security/nss/lib/pk11wrap/Makefile b/security/nss/lib/pk11wrap/Makefile index 9d27595ca1..4f0c5cde18 100644 --- a/security/nss/lib/pk11wrap/Makefile +++ b/security/nss/lib/pk11wrap/Makefile @@ -26,6 +26,8 @@ include $(CORE_DEPTH)/coreconf/config.mk # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### +-include config.mk + ####################################################################### # (5) Execute "global" rules. (OPTIONAL) # ####################################################################### @@ -51,7 +53,8 @@ $(OBJDIR)/pk11load$(OBJ_SUFFIX): debug_module.c ifeq ($(OS_TARGET)$(OS_RELEASE),AIX4.3) ifeq ($(USE_64),1) ifndef BUILD_OPT -$(OBJDIR)/pk11slot.o: pk11slot.c | $$(@D)/d +$(OBJDIR)/pk11slot.o: pk11slot.c + @$(MAKE_OBJDIR) $(CC) -o $@ -c -O2 $(CFLAGS) $< endif endif diff --git a/security/nss/lib/pk11wrap/config.mk b/security/nss/lib/pk11wrap/config.mk new file mode 100644 index 0000000000..b8c03de796 --- /dev/null +++ b/security/nss/lib/pk11wrap/config.mk @@ -0,0 +1,15 @@ +# +# 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/. + +# +# Override TARGETS variable so that only static libraries +# are specifed as dependencies within rules.mk. +# + +TARGETS = $(LIBRARY) +SHARED_LIBRARY = +IMPORT_LIBRARY = +PROGRAM = + diff --git a/security/nss/lib/pk11wrap/manifest.mn b/security/nss/lib/pk11wrap/manifest.mn index 8f8a387b44..f9b4a06e93 100644 --- a/security/nss/lib/pk11wrap/manifest.mn +++ b/security/nss/lib/pk11wrap/manifest.mn @@ -50,12 +50,11 @@ CSRCS = \ $(NULL) LIBRARY_NAME = pk11wrap -SHARED_LIBRARY = $(NULL) -NSS_LIBRARY_VERSION = 3 +LIBRARY_VERSION = 3 SOFTOKEN_LIBRARY_VERSION = 3 DEFINES += -DSHLIB_SUFFIX=\"$(DLL_SUFFIX)\" -DSHLIB_PREFIX=\"$(DLL_PREFIX)\" \ - -DNSS_SHLIB_VERSION=\"$(NSS_LIBRARY_VERSION)\" \ + -DSHLIB_VERSION=\"$(LIBRARY_VERSION)\" \ -DSOFTOKEN_SHLIB_VERSION=\"$(SOFTOKEN_LIBRARY_VERSION)\" # only add module debugging in opt builds if DEBUG_PKCS11 is set diff --git a/security/nss/lib/pk11wrap/pk11load.c b/security/nss/lib/pk11wrap/pk11load.c index 9e7a0a546d..9b941f963b 100644 --- a/security/nss/lib/pk11wrap/pk11load.c +++ b/security/nss/lib/pk11wrap/pk11load.c @@ -355,7 +355,7 @@ SECMOD_SetRootCerts(PK11SlotInfo *slot, SECMODModule *mod) #ifndef NSS_STATIC_SOFTOKEN static const char *my_shlib_name = - SHLIB_PREFIX "nss" NSS_SHLIB_VERSION "." SHLIB_SUFFIX; + SHLIB_PREFIX "nss" SHLIB_VERSION "." SHLIB_SUFFIX; static const char *softoken_shlib_name = SHLIB_PREFIX "softokn" SOFTOKEN_SHLIB_VERSION "." SHLIB_SUFFIX; static const PRCallOnceType pristineCallOnce; diff --git a/security/nss/lib/pk11wrap/pk11wrap.gyp b/security/nss/lib/pk11wrap/pk11wrap.gyp index eebb4ea3cb..3dc589277d 100644 --- a/security/nss/lib/pk11wrap/pk11wrap.gyp +++ b/security/nss/lib/pk11wrap/pk11wrap.gyp @@ -61,7 +61,7 @@ 'defines': [ 'SHLIB_SUFFIX=\"<(dll_suffix)\"', 'SHLIB_PREFIX=\"<(dll_prefix)\"', - 'NSS_SHLIB_VERSION=\"3\"', + 'SHLIB_VERSION=\"3\"', 'SOFTOKEN_SHLIB_VERSION=\"3\"' ] }, diff --git a/security/nss/lib/pkcs12/Makefile b/security/nss/lib/pkcs12/Makefile index 3fd2f50b12..8149184b44 100644 --- a/security/nss/lib/pkcs12/Makefile +++ b/security/nss/lib/pkcs12/Makefile @@ -27,6 +27,8 @@ include $(CORE_DEPTH)/coreconf/config.mk # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### +include config.mk + ####################################################################### # (5) Execute "global" rules. (OPTIONAL) # ####################################################################### diff --git a/security/nss/lib/pkcs12/config.mk b/security/nss/lib/pkcs12/config.mk new file mode 100644 index 0000000000..dc39ee4d6a --- /dev/null +++ b/security/nss/lib/pkcs12/config.mk @@ -0,0 +1,16 @@ +# +# 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/. + + +# +# Override TARGETS variable so that only static libraries +# are specifed as dependencies within rules.mk. +# + +TARGETS = $(LIBRARY) +SHARED_LIBRARY = +IMPORT_LIBRARY = +PROGRAM = + diff --git a/security/nss/lib/pkcs12/manifest.mn b/security/nss/lib/pkcs12/manifest.mn index ab54bec43a..26166ec32c 100644 --- a/security/nss/lib/pkcs12/manifest.mn +++ b/security/nss/lib/pkcs12/manifest.mn @@ -26,7 +26,6 @@ CSRCS = \ $(NULL) LIBRARY_NAME = pkcs12 -SHARED_LIBRARY = $(NULL) # This part of the code, including all sub-dirs, can be optimized for size export ALLOW_OPT_CODE_SIZE = 1 diff --git a/security/nss/lib/pkcs7/Makefile b/security/nss/lib/pkcs7/Makefile index aae54b1e0f..a9cebcfecf 100644 --- a/security/nss/lib/pkcs7/Makefile +++ b/security/nss/lib/pkcs7/Makefile @@ -26,6 +26,8 @@ include $(CORE_DEPTH)/coreconf/config.mk # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### +include config.mk + ####################################################################### # (5) Execute "global" rules. (OPTIONAL) # ####################################################################### diff --git a/security/nss/lib/pkcs7/config.mk b/security/nss/lib/pkcs7/config.mk new file mode 100644 index 0000000000..36f063f1dd --- /dev/null +++ b/security/nss/lib/pkcs7/config.mk @@ -0,0 +1,14 @@ +# +# 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/. + +# +# Override TARGETS variable so that only static libraries +# are specifed as dependencies within rules.mk. +# + +TARGETS = $(LIBRARY) +SHARED_LIBRARY = +IMPORT_LIBRARY = +PROGRAM = diff --git a/security/nss/lib/pkcs7/manifest.mn b/security/nss/lib/pkcs7/manifest.mn index 9ca2d4de5e..1a6cad0f7f 100644 --- a/security/nss/lib/pkcs7/manifest.mn +++ b/security/nss/lib/pkcs7/manifest.mn @@ -28,7 +28,6 @@ CSRCS = \ $(NULL) LIBRARY_NAME = pkcs7 -SHARED_LIBRARY = $(NULL) # This part of the code, including all sub-dirs, can be optimized for size export ALLOW_OPT_CODE_SIZE = 1 diff --git a/security/nss/lib/pki/Makefile b/security/nss/lib/pki/Makefile index 3f49eaa45d..ca709f6c0d 100644 --- a/security/nss/lib/pki/Makefile +++ b/security/nss/lib/pki/Makefile @@ -4,11 +4,7 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. include manifest.mn - include $(CORE_DEPTH)/coreconf/config.mk - -ifdef BUILD_IDG -DEFINES += -DNSSDEBUG -endif - +include config.mk include $(CORE_DEPTH)/coreconf/rules.mk + diff --git a/security/nss/lib/pki/config.mk b/security/nss/lib/pki/config.mk new file mode 100644 index 0000000000..2676cd5370 --- /dev/null +++ b/security/nss/lib/pki/config.mk @@ -0,0 +1,19 @@ +# +# 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/. + +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 = + diff --git a/security/nss/lib/pki/manifest.mn b/security/nss/lib/pki/manifest.mn index 98af6b8a7d..77226b179b 100644 --- a/security/nss/lib/pki/manifest.mn +++ b/security/nss/lib/pki/manifest.mn @@ -36,7 +36,7 @@ CSRCS = \ REQUIRES = nspr LIBRARY_NAME = nsspki -SHARED_LIBRARY = $(NULL) +LIBRARY_VERSION = 3 # This part of the code, including all sub-dirs, can be optimized for size export ALLOW_OPT_CODE_SIZE = 1 diff --git a/security/nss/lib/smime/config.mk b/security/nss/lib/smime/config.mk index 76aab75442..85d39e825f 100644 --- a/security/nss/lib/smime/config.mk +++ b/security/nss/lib/smime/config.mk @@ -7,6 +7,13 @@ RELEASE_LIBS = $(TARGETS) ifeq (,$(filter-out WIN%,$(OS_TARGET))) +# don't want the 32 in the shared library name +SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX) +IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX) + +RES = $(OBJDIR)/smime.res +RESNAME = smime.rc + ifdef NS_USE_GCC EXTRA_SHARED_LIBS += \ -L$(DIST)/lib \ diff --git a/security/nss/lib/smime/manifest.mn b/security/nss/lib/smime/manifest.mn index f453d25949..e049d8873a 100644 --- a/security/nss/lib/smime/manifest.mn +++ b/security/nss/lib/smime/manifest.mn @@ -17,6 +17,7 @@ PRIVATE_EXPORTS = \ $(NULL) MODULE = nss +MAPFILE = $(OBJDIR)/smime.def CSRCS = \ cmsarray.c \ @@ -45,7 +46,6 @@ CSRCS = \ LIBRARY_NAME = smime LIBRARY_VERSION = 3 -MAPFILE = $(OBJDIR)/$(LIBRARY_NAME).def # This part of the code, including all sub-dirs, can be optimized for size export ALLOW_OPT_CODE_SIZE = 1 diff --git a/security/nss/lib/softoken/Makefile b/security/nss/lib/softoken/Makefile index 68ad05753e..e5fb2d449e 100644 --- a/security/nss/lib/softoken/Makefile +++ b/security/nss/lib/softoken/Makefile @@ -66,10 +66,11 @@ $(SHARED_LIBRARY): $(CRYPTOLIB) ifeq ($(OS_TARGET)$(OS_RELEASE),AIX4.3) ifeq ($(USE_64),1) ifndef BUILD_OPT -$(OBJDIR)/pkcs11.o: pkcs11.c | $$(@D)/d +$(OBJDIR)/pkcs11.o: pkcs11.c + @$(MAKE_OBJDIR) $(CC) -o $@ -c -O2 $(CFLAGS) $< - -$(OBJDIR)/pkcs11c.o: pkcs11c.c | $$(@D)/d +$(OBJDIR)/pkcs11c.o: pkcs11c.c + @$(MAKE_OBJDIR) $(CC) -o $@ -c -O2 $(CFLAGS) $< endif endif diff --git a/security/nss/lib/softoken/config.mk b/security/nss/lib/softoken/config.mk index 14ea5d6e45..2924b24f86 100644 --- a/security/nss/lib/softoken/config.mk +++ b/security/nss/lib/softoken/config.mk @@ -13,6 +13,13 @@ EXTRA_LIBS += \ # 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)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX) +IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX) + +RES = $(OBJDIR)/$(LIBRARY_NAME).res +RESNAME = $(LIBRARY_NAME).rc + ifdef NS_USE_GCC EXTRA_SHARED_LIBS += \ -L$(SQLITE_LIB_DIR) \ diff --git a/security/nss/lib/softoken/legacydb/config.mk b/security/nss/lib/softoken/legacydb/config.mk index 54a23c3b0d..ac7240e4b4 100644 --- a/security/nss/lib/softoken/legacydb/config.mk +++ b/security/nss/lib/softoken/legacydb/config.mk @@ -14,6 +14,13 @@ EXTRA_LIBS += \ # 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)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX) +IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX) + +RES = $(OBJDIR)/$(LIBRARY_NAME).res +RESNAME = $(LIBRARY_NAME).rc + ifdef NS_USE_GCC EXTRA_SHARED_LIBS += \ -L$(DIST)/lib \ diff --git a/security/nss/lib/softoken/legacydb/manifest.mn b/security/nss/lib/softoken/legacydb/manifest.mn index caac524be0..9cce849f6c 100644 --- a/security/nss/lib/softoken/legacydb/manifest.mn +++ b/security/nss/lib/softoken/legacydb/manifest.mn @@ -10,7 +10,7 @@ REQUIRES = dbm LIBRARY_NAME = nssdbm LIBRARY_VERSION = 3 -MAPFILE = $(OBJDIR)/$(LIBRARY_NAME).def +MAPFILE = $(OBJDIR)/nssdbm.def DEFINES += -DSHLIB_SUFFIX=\"$(DLL_SUFFIX)\" -DSHLIB_PREFIX=\"$(DLL_PREFIX)\" -DLG_LIB_NAME=\"$(notdir $(SHARED_LIBRARY))\" diff --git a/security/nss/lib/softoken/manifest.mn b/security/nss/lib/softoken/manifest.mn index 34daf1c4a0..a8513800f6 100644 --- a/security/nss/lib/softoken/manifest.mn +++ b/security/nss/lib/softoken/manifest.mn @@ -11,7 +11,7 @@ endif LIBRARY_NAME = softokn LIBRARY_VERSION = 3 -MAPFILE = $(OBJDIR)/$(LIBRARY_NAME).def +MAPFILE = $(OBJDIR)/softokn.def DEFINES += -DSHLIB_SUFFIX=\"$(DLL_SUFFIX)\" -DSHLIB_PREFIX=\"$(DLL_PREFIX)\" -DSOFTOKEN_LIB_NAME=\"$(notdir $(SHARED_LIBRARY))\" -DSHLIB_VERSION=\"$(LIBRARY_VERSION)\" diff --git a/security/nss/lib/sqlite/Makefile b/security/nss/lib/sqlite/Makefile index 960482d3f6..592adb648f 100644 --- a/security/nss/lib/sqlite/Makefile +++ b/security/nss/lib/sqlite/Makefile @@ -27,7 +27,7 @@ include $(CORE_DEPTH)/coreconf/config.mk # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### -include config.mk +-include config.mk ####################################################################### # (5) Execute "global" rules. (OPTIONAL) # diff --git a/security/nss/lib/sqlite/config.mk b/security/nss/lib/sqlite/config.mk index a3b52bd4b4..b0e9390f11 100644 --- a/security/nss/lib/sqlite/config.mk +++ b/security/nss/lib/sqlite/config.mk @@ -3,6 +3,18 @@ # 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/. + +# 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)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX) +IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX) + +#RES = $(OBJDIR)/$(LIBRARY_NAME).res +#RESNAME = $(LIBRARY_NAME).rc +endif + ifeq ($(OS_TARGET),AIX) EXTRA_LIBS += -lpthreads ifdef BUILD_OPT diff --git a/security/nss/lib/sqlite/manifest.mn b/security/nss/lib/sqlite/manifest.mn index 44422affd6..be411a6dbb 100644 --- a/security/nss/lib/sqlite/manifest.mn +++ b/security/nss/lib/sqlite/manifest.mn @@ -8,9 +8,7 @@ MODULE = nss LIBRARY_NAME = sqlite LIBRARY_VERSION = 3 -MAPFILE = $(OBJDIR)/$(LIBRARY_NAME).def -RES = $(NULL) - +MAPFILE = $(OBJDIR)/sqlite.def DEFINES += -DSQLITE_THREADSAFE=1 PRIVATE_EXPORTS = \ diff --git a/security/nss/lib/ssl/config.mk b/security/nss/lib/ssl/config.mk index df4ab35e6f..d13613f78c 100644 --- a/security/nss/lib/ssl/config.mk +++ b/security/nss/lib/ssl/config.mk @@ -9,6 +9,13 @@ endif ifeq (,$(filter-out WIN%,$(OS_TARGET))) +# don't want the 32 in the shared library name +SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX) +IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX) + +RES = $(OBJDIR)/ssl.res +RESNAME = ssl.rc + ifdef NS_USE_GCC EXTRA_SHARED_LIBS += \ -L$(DIST)/lib \ diff --git a/security/nss/lib/ssl/manifest.mn b/security/nss/lib/ssl/manifest.mn index 5b3584ba98..7e286f60cf 100644 --- a/security/nss/lib/ssl/manifest.mn +++ b/security/nss/lib/ssl/manifest.mn @@ -19,6 +19,7 @@ EXPORTS = \ $(NULL) MODULE = nss +MAPFILE = $(OBJDIR)/ssl.def CSRCS = \ dtlscon.c \ @@ -66,7 +67,6 @@ CSRCS = \ LIBRARY_NAME = ssl LIBRARY_VERSION = 3 -MAPFILE = $(OBJDIR)/$(LIBRARY_NAME).def # This part of the code, including all sub-dirs, can be optimized for size export ALLOW_OPT_CODE_SIZE = 1 diff --git a/security/nss/lib/sysinit/Makefile b/security/nss/lib/sysinit/Makefile index 3803142fd6..fe59954dff 100644 --- a/security/nss/lib/sysinit/Makefile +++ b/security/nss/lib/sysinit/Makefile @@ -24,6 +24,7 @@ include $(CORE_DEPTH)/coreconf/config.mk # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### +#include ../platlibs.mk include config.mk ####################################################################### @@ -42,3 +43,6 @@ include $(CORE_DEPTH)/coreconf/rules.mk # (7) Execute "local" rules. (OPTIONAL). # ####################################################################### + +#include ../platrules.mk + diff --git a/security/nss/lib/sysinit/config.mk b/security/nss/lib/sysinit/config.mk index 33ef6e8740..037641b11a 100644 --- a/security/nss/lib/sysinit/config.mk +++ b/security/nss/lib/sysinit/config.mk @@ -11,6 +11,13 @@ # 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)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX) +IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX) + +RES = $(OBJDIR)/$(LIBRARY_NAME).res +RESNAME = $(LIBRARY_NAME).rc + ifdef NS_USE_GCC EXTRA_SHARED_LIBS += \ -L$(DIST)/lib \ diff --git a/security/nss/lib/sysinit/manifest.mn b/security/nss/lib/sysinit/manifest.mn index d188b0a51c..40a119e994 100644 --- a/security/nss/lib/sysinit/manifest.mn +++ b/security/nss/lib/sysinit/manifest.mn @@ -11,7 +11,7 @@ CSRCS = \ $(NULL) LIBRARY_NAME = nsssysinit -MAPFILE = $(OBJDIR)/$(LIBRARY_NAME).def +MAPFILE = $(OBJDIR)/nsssysinit.def # This part of the code, including all sub-dirs, can be optimized for size export ALLOW_OPT_CODE_SIZE = 1 diff --git a/security/nss/lib/util/Makefile b/security/nss/lib/util/Makefile index c3cb5ef8be..9b51d18cdf 100644 --- a/security/nss/lib/util/Makefile +++ b/security/nss/lib/util/Makefile @@ -14,6 +14,8 @@ include manifest.mn # (2) Include "global" configuration information. (OPTIONAL) # ####################################################################### +# include $(CORE_DEPTH)/coreconf/arch.mk + include $(CORE_DEPTH)/coreconf/config.mk ####################################################################### diff --git a/security/nss/lib/util/config.mk b/security/nss/lib/util/config.mk index af42a2ee9e..a3e720218e 100644 --- a/security/nss/lib/util/config.mk +++ b/security/nss/lib/util/config.mk @@ -6,6 +6,13 @@ # 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)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX) +IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX) + +RES = $(OBJDIR)/$(LIBRARY_NAME).res +RESNAME = $(LIBRARY_NAME).rc + ifdef NS_USE_GCC EXTRA_SHARED_LIBS += \ -L$(DIST)/lib \ diff --git a/security/nss/lib/util/manifest.mn b/security/nss/lib/util/manifest.mn index 43eead61c3..b33a2049d5 100644 --- a/security/nss/lib/util/manifest.mn +++ b/security/nss/lib/util/manifest.mn @@ -82,9 +82,11 @@ CSRCS = \ MODULE = nss +# don't duplicate module name in REQUIRES +MAPFILE = $(OBJDIR)/nssutil.def + LIBRARY_NAME = nssutil LIBRARY_VERSION = 3 -MAPFILE = $(OBJDIR)/$(LIBRARY_NAME).def # This part of the code, including all sub-dirs, can be optimized for size export ALLOW_OPT_CODE_SIZE = 1 diff --git a/security/nss/lib/zlib/Makefile b/security/nss/lib/zlib/Makefile index 0aa8a85aa3..812c38fce2 100644 --- a/security/nss/lib/zlib/Makefile +++ b/security/nss/lib/zlib/Makefile @@ -25,12 +25,7 @@ include $(CORE_DEPTH)/coreconf/config.mk # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### -EXTRA_LIBS = $(LIBRARY) - -ifneq ($(OS_ARCH),WINNT) -DEFINES += -DHAVE_UNISTD_H -endif -DEFINES += -DHAVE_STDARG_H +include config.mk ####################################################################### # (5) Execute "global" rules. (OPTIONAL) # diff --git a/security/nss/lib/zlib/config.mk b/security/nss/lib/zlib/config.mk new file mode 100644 index 0000000000..9e9fb31794 --- /dev/null +++ b/security/nss/lib/zlib/config.mk @@ -0,0 +1,21 @@ +# +# 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/. + +# +# Override TARGETS variable so that only static libraries +# are specifed as dependencies within rules.mk. +# + +TARGETS = $(LIBRARY) +SHARED_LIBRARY = +IMPORT_LIBRARY = +PROGRAM = + +EXTRA_LIBS = $(LIBRARY) + +ifneq ($(OS_ARCH),WINNT) +DEFINES += -DHAVE_UNISTD_H +endif +DEFINES += -DHAVE_STDARG_H diff --git a/security/nss/lib/zlib/manifest.mn b/security/nss/lib/zlib/manifest.mn index fa7cfd1204..879c9fb241 100644 --- a/security/nss/lib/zlib/manifest.mn +++ b/security/nss/lib/zlib/manifest.mn @@ -27,7 +27,8 @@ CSRCS = adler32.c \ $(NULL) LIBRARY_NAME = zlib -SHARED_LIBRARY = $(NULL) + +# REQUIRES = nss # Define verbose as -1 to turn off all zlib trace messages in # debug builds. |