diff options
author | Moonchild <moonchild@palemoon.org> | 2020-12-09 21:22:53 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-12-09 21:22:53 +0000 |
commit | 2e9bdf61802c939008e3ad0582ed7b0124eb9415 (patch) | |
tree | d2c600f52d1d7115867ff90bd62528b37c99d044 | |
parent | 91cc4c32e86242556f8acbf775852b32ee6cda16 (diff) | |
download | uxp-2e9bdf61802c939008e3ad0582ed7b0124eb9415.tar.gz |
Revert 1637083
-rw-r--r-- | security/nss/automation/taskcluster/scripts/split.sh | 1 | ||||
-rw-r--r-- | security/nss/coreconf/rules.mk | 15 | ||||
-rw-r--r-- | security/nss/lib/Makefile | 124 | ||||
-rw-r--r-- | security/nss/lib/ckfw/builtins/manifest.mn | 4 | ||||
-rw-r--r-- | security/nss/lib/ckfw/manifest.mn | 4 | ||||
-rw-r--r-- | security/nss/lib/manifest.mn | 70 | ||||
-rw-r--r-- | security/nss/manifest.mn | 6 |
7 files changed, 136 insertions, 88 deletions
diff --git a/security/nss/automation/taskcluster/scripts/split.sh b/security/nss/automation/taskcluster/scripts/split.sh index d4ed4cc007..fded64e1b2 100644 --- a/security/nss/automation/taskcluster/scripts/split.sh +++ b/security/nss/automation/taskcluster/scripts/split.sh @@ -39,6 +39,7 @@ split_util() { # Copy some files at the top and the util subdirectory recursively. mkdir $dstdir/lib cp $nssdir/lib/Makefile $dstdir/lib + cp $nssdir/lib/manifest.mn $dstdir/lib cp -R $nssdir/lib/util $dstdir/lib/util } diff --git a/security/nss/coreconf/rules.mk b/security/nss/coreconf/rules.mk index dc72e9cef6..1bdf08145a 100644 --- a/security/nss/coreconf/rules.mk +++ b/security/nss/coreconf/rules.mk @@ -31,21 +31,10 @@ ifeq (,$(filter-out _WIN%,$(NS_USE_GCC)_$(OS_TARGET))) USE_NT_C_SYNTAX=1 endif -# For whatever reason, "." can't be handled using make conditionals. -# Based on automake's SUBDIRS "." handling. ifdef DIRS ifndef IGNORE_DIRS -ifneq (,$(filter .,$(DIRS))) -TARGETS = $(NULL) -ALL_TRASH = $(NULL) -endif - $(DIRS): - $(IGNORE_ERROR)@if [ "$@" != "." ]; then \ - $(MAKE) -C $@ $(MAKECMDGOALS) ; \ - else \ - IGNORE_DIRS=1 $(MAKE) -C $@ $(MAKECMDGOALS) ; \ - fi + $(IGNORE_ERROR)@$(MAKE) -C $@ $(MAKECMDGOALS) @$(CLICK_STOPWATCH) endif endif @@ -84,9 +73,7 @@ endif check: $(DIRS) clean clobber: $(DIRS) -ifneq (,$(ALL_TRASH)) rm -rf $(ALL_TRASH) -endif realclean clobber_all: $(DIRS) rm -rf $(wildcard *.OBJ) dist $(ALL_TRASH) diff --git a/security/nss/lib/Makefile b/security/nss/lib/Makefile index 6e26e32410..337b328607 100644 --- a/security/nss/lib/Makefile +++ b/security/nss/lib/Makefile @@ -4,106 +4,94 @@ # 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/. -CORE_DEPTH = .. -DEPTH = .. +####################################################################### +# (1) Include initial platform-independent assignments (MANDATORY). # +####################################################################### + +include manifest.mn + +####################################################################### +# (2) Include "global" configuration information. (OPTIONAL) # +####################################################################### include $(CORE_DEPTH)/coreconf/config.mk -# This "jungle" of conditionals evaluates which DIRS to build! -# The main reason for it is AFAIK /automation/taskcluster/scripts/split.sh -# -# The fundamental organisation is: -# if NSS_BUILD_UTIL_ONLY -# else -# if NSS_BUILD_SOFTOKEN_ONLY -# else # build "all" the rest of NSS -# endif -# -# But there is even some build (NSS_BUILD_WITHOUT_SOFTOKEN), which -# depends on a previous partial build! -# -# FWIW, the dependencies are sorted and "compacted" instead of single -# lines for smaller patches, as these probably won't change much and -# it's easier to read this way. - -# Building softoken (and freebl) only requires that the paths -# to the locations where the util headers and libraries were -# previously installed by a prior util-only build - likely in -# in a system location that varies with the distribution. This -# cannot be addressed here and requires that downstream package -# mantainers add suitable modifications. Building full nss will -# not have that problem as everything is available. +####################################################################### +# (3) Include "component" configuration information. (OPTIONAL) # +####################################################################### + + + +####################################################################### +# (4) Include "local" platform-dependent assignments (OPTIONAL). # +####################################################################### ifndef USE_SYSTEM_ZLIB -ZLIB_SRCDIR = zlib +ZLIB_SRCDIR = zlib # Add the zlib directory to DIRS. endif ifndef MOZILLA_CLIENT ifndef NSS_USE_SYSTEM_SQLITE -SQLITE_SRCDIR = sqlite +SQLITE_SRCDIR = sqlite # Add the sqlite directory to DIRS. +endif endif +ifndef MOZILLA_CLIENT ifeq ($(OS_ARCH),Linux) -SYSINIT_SRCDIR = sysinit +SYSINIT_SRCDIR = sysinit # Add the sysinit directory to DIRS. +endif endif -endif # MOZILLA_CLIENT ifndef NSS_DISABLE_DBM -DBM_SRCDIR = dbm +DBM_SRCDIR = dbm # Add the dbm directory to DIRS. +endif + +ifeq ($(NSS_BUILD_UTIL_ONLY),1) +SYSINIT_SRCDIR= endif ifndef NSS_DISABLE_LIBPKIX -LIBPKIX_SRCDIR = libpkix +LIBPKIX_SRCDIR = libpkix # Add the libpkix directory to DIRS. endif ifeq ($(NSS_BUILD_UTIL_ONLY),1) UTIL_SRCDIR = util - + FREEBL_SRCDIR = + SOFTOKEN_SRCDIR = else ifeq ($(NSS_BUILD_SOFTOKEN_ONLY),1) - FREEBL_SRCDIR = freebl - SOFTOKEN_SRCDIR = softoken - else - # Not included when building nss without softoken - # This build type uses the build results of the prior - # NSS_BUILD_UTIL_ONLY and NSS_BUILD_SOFTOKEN_ONLY builds - ifneq ($(NSS_BUILD_WITHOUT_SOFTOKEN),1) + UTIL_SRCDIR = FREEBL_SRCDIR = freebl SOFTOKEN_SRCDIR = softoken + else + ifeq ($(NSS_BUILD_WITHOUT_SOFTOKEN),1) + # Not included when building nss without softoken + # This build type uses the build results of the prior + # NSS_BUILD_UTIL_ONLY and NSS_BUILD_SOFTOKEN_ONLY builds + UTIL_SRCDIR = + FREEBL_SRCDIR = + SOFTOKEN_SRCDIR = + else + # default is to include all UTIL_SRCDIR = util + FREEBL_SRCDIR = freebl + SOFTOKEN_SRCDIR = softoken endif endif +endif - SOFTOKEN_SRCDIRS = \ - $(DBM_SRCDIR) $(FREEBL_SRCDIR) $(SOFTOKEN_SRCDIR) \ - $(SQLITE_SRCDIR) $(NULL) - - ifneq (,$(FREEBL_SRCDIR)) - $(FREEBL_SRCDIR): $(UTIL_SRCDIR) - endif - - ifneq (,$(SOFTOKEN_SRCDIR)) - $(SOFTOKEN_SRCDIR): $(DBM_SRCDIR) $(FREEBL_SRCDIR) $(SQLITE_SRCDIR) $(UTIL_SRCDIR) - endif - - ifndef NSS_BUILD_SOFTOKEN_ONLY - NSS_SRCDIRS = \ - base certdb certhigh ckfw crmf cryptohi dev jar $(LIBPKIX_SRCDIR) \ - nss pk11wrap pkcs12 pkcs7 pki smime ssl $(SYSINIT_SRCDIR) $(ZLIB_SRCDIR) +####################################################################### +# (5) Execute "global" rules. (OPTIONAL) # +####################################################################### - ifneq (,$(SYSINIT_SRCDIR)) - $(SYSINIT_SRCDIR): $(UTIL_SRCDIR) - endif +include $(CORE_DEPTH)/coreconf/rules.mk - nss: base certdb certhigh cryptohi dev $(LIBPKIX_SRCDIR) pk11wrap pki $(UTIL_SRCDIR) - smime: nss pkcs7 pkcs12 - ssl: nss - ckfw: nss +####################################################################### +# (6) Execute "component" rules. (OPTIONAL) # +####################################################################### - endif # !NSS_BUILD_SOFTOKEN_ONLY -endif # !NSS_BUILD_UTIL_ONLY -DIRS = \ - $(NSS_SRCDIRS) $(SOFTOKEN_SRCDIRS) $(UTIL_SRCDIR) $(NULL) -include $(CORE_DEPTH)/coreconf/rules.mk +####################################################################### +# (7) Execute "local" rules. (OPTIONAL). # +####################################################################### diff --git a/security/nss/lib/ckfw/builtins/manifest.mn b/security/nss/lib/ckfw/builtins/manifest.mn index 74718dbabe..88e5237ce8 100644 --- a/security/nss/lib/ckfw/builtins/manifest.mn +++ b/security/nss/lib/ckfw/builtins/manifest.mn @@ -5,9 +5,7 @@ CORE_DEPTH = ../../.. -DIRS = . testlib - -testlib: . +DIRS = testlib MODULE = nss diff --git a/security/nss/lib/ckfw/manifest.mn b/security/nss/lib/ckfw/manifest.mn index f0395b38fd..8991495e4a 100644 --- a/security/nss/lib/ckfw/manifest.mn +++ b/security/nss/lib/ckfw/manifest.mn @@ -5,9 +5,7 @@ CORE_DEPTH = ../.. -DIRS = . builtins - -builtins: . +DIRS = builtins PRIVATE_EXPORTS = \ ck.h \ diff --git a/security/nss/lib/manifest.mn b/security/nss/lib/manifest.mn new file mode 100644 index 0000000000..15cc2e618f --- /dev/null +++ b/security/nss/lib/manifest.mn @@ -0,0 +1,70 @@ +# +# 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/. +CORE_DEPTH = .. +DEPTH = .. + +# Building softoken (and freebl) only requires that the paths +# to the locations where the util headers and libraries were +# previously installed by a prior util-only build - likely in +# in a system location that varies with the distribution. This +# cannot be addressed here and requires that downstream package +# mantainers add suitable modifications. Building full nss will +# not have that problem as everything is available. + +SOFTOKEN_SRCDIRS= +NSS_SRCDIRS= + +ifndef NSS_BUILD_UTIL_ONLY +SOFTOKEN_SRCDIRS = \ + $(FREEBL_SRCDIR) \ + $(SQLITE_SRCDIR) \ + $(DBM_SRCDIR) \ + $(SOFTOKEN_SRCDIR) \ + $(NULL) +ifndef NSS_BUILD_SOFTOKEN_ONLY +# the rest of nss +NSS_SRCDIRS = \ + base dev pki \ + $(LIBPKIX_SRCDIR) \ + certdb certhigh pk11wrap cryptohi nss \ + $(ZLIB_SRCDIR) ssl \ + pkcs7 pkcs12 smime \ + crmf jar \ + ckfw $(SYSINIT_SRCDIR) \ + $(NULL) +endif +endif + +freebl: util +sysinit: util +softoken: util dbm sqlite freebl +nss: certhigh cryptohi pk11wrap certdb pki dev base libpkix util +smime: nss pkcs12 pkcs7 +ssl: nss freebl +ckfw: nss + +# +# organized by DLL +# +# softoken and prereqs. +# stan (not a separate dll yet) +# libpkix (not a separate dll) +# nss base (traditional) +# ssl +# smime +# ckfw (builtins module) +# crmf jar (not dll's) +DIRS = \ + $(UTIL_SRCDIR) \ + $(SOFTOKEN_SRCDIRS) \ + $(NSS_SRCDIRS) \ + $(NULL) + +# fortcrypt is no longer built + +# +# these dirs are not built at the moment +# +#NOBUILD_DIRS = jar diff --git a/security/nss/manifest.mn b/security/nss/manifest.mn index fbc420a950..0d2ce675c1 100644 --- a/security/nss/manifest.mn +++ b/security/nss/manifest.mn @@ -24,6 +24,12 @@ prepare_build: # no real way to encode these in any sensible way $(MAKE) -C coreconf/nsinstall program $(MAKE) export + # pre-build child dir -> parent dir dependencies + # ckfw/builtins -> ckfw + IGNORE_DIRS=1 $(MAKE) -C lib/ckfw libs + # ckfw/builtins/testlib -> ckfw/builtins + base + $(MAKE) -C lib/base libs + IGNORE_DIRS=1 $(MAKE) -C lib/ckfw/builtins libs lib: coreconf cmd: lib |