diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2020-05-14 17:42:03 +0000 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2020-05-14 17:42:03 +0000 |
commit | 9ed6c0804e2694262a98efd06eaf206405658502 (patch) | |
tree | 03b871b331acd45d16b417f04f069264fa9a2683 | |
parent | 871c2ef40cad876c481d19cf12ad3c852a9c20a2 (diff) | |
download | nss-hg-9ed6c0804e2694262a98efd06eaf206405658502.tar.gz |
Bug 1637083 fix the lib dependencies for the split build r=jcj,rrelyea
This build can be tested by running
NSS_BUILD_MODULAR=1 nss/automation/taskcluster/scripts/build.sh
from a directory containing the nss and nspr repositories.
To make this build's make conditionals easier to handle, it also
merges the manifest.mn into the Makefile, because parts of the
conditionals depends on $(OS_ARCH) setting.
In the end, the goal is just to set the correct build $(DIRS).
This also drops the freebl dependeny of ssl, which seems not to be
needed, even if it's declared in /lib/ssl/ssl.gyp.
Differential Revision: https://phabricator.services.mozilla.com/D75074
-rw-r--r-- | automation/taskcluster/scripts/split.sh | 1 | ||||
-rw-r--r-- | lib/Makefile | 124 | ||||
-rw-r--r-- | lib/manifest.mn | 70 |
3 files changed, 68 insertions, 127 deletions
diff --git a/automation/taskcluster/scripts/split.sh b/automation/taskcluster/scripts/split.sh index fded64e1b..d4ed4cc00 100644 --- a/automation/taskcluster/scripts/split.sh +++ b/automation/taskcluster/scripts/split.sh @@ -39,7 +39,6 @@ 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/lib/Makefile b/lib/Makefile index 337b32860..6e26e3241 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -4,94 +4,106 @@ # 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/. -####################################################################### -# (1) Include initial platform-independent assignments (MANDATORY). # -####################################################################### - -include manifest.mn - -####################################################################### -# (2) Include "global" configuration information. (OPTIONAL) # -####################################################################### +CORE_DEPTH = .. +DEPTH = .. include $(CORE_DEPTH)/coreconf/config.mk -####################################################################### -# (3) Include "component" configuration information. (OPTIONAL) # -####################################################################### - - - -####################################################################### -# (4) Include "local" platform-dependent assignments (OPTIONAL). # -####################################################################### +# 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. ifndef USE_SYSTEM_ZLIB -ZLIB_SRCDIR = zlib # Add the zlib directory to DIRS. +ZLIB_SRCDIR = zlib endif ifndef MOZILLA_CLIENT ifndef NSS_USE_SYSTEM_SQLITE -SQLITE_SRCDIR = sqlite # Add the sqlite directory to DIRS. -endif +SQLITE_SRCDIR = sqlite endif -ifndef MOZILLA_CLIENT ifeq ($(OS_ARCH),Linux) -SYSINIT_SRCDIR = sysinit # Add the sysinit directory to DIRS. -endif +SYSINIT_SRCDIR = sysinit endif +endif # MOZILLA_CLIENT ifndef NSS_DISABLE_DBM -DBM_SRCDIR = dbm # Add the dbm directory to DIRS. -endif - -ifeq ($(NSS_BUILD_UTIL_ONLY),1) -SYSINIT_SRCDIR= +DBM_SRCDIR = dbm endif ifndef NSS_DISABLE_LIBPKIX -LIBPKIX_SRCDIR = libpkix # Add the libpkix directory to DIRS. +LIBPKIX_SRCDIR = libpkix endif ifeq ($(NSS_BUILD_UTIL_ONLY),1) UTIL_SRCDIR = util - FREEBL_SRCDIR = - SOFTOKEN_SRCDIR = + else ifeq ($(NSS_BUILD_SOFTOKEN_ONLY),1) - UTIL_SRCDIR = - FREEBL_SRCDIR = freebl - SOFTOKEN_SRCDIR = softoken + 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 + # 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) FREEBL_SRCDIR = freebl SOFTOKEN_SRCDIR = softoken + UTIL_SRCDIR = util endif endif -endif -####################################################################### -# (5) Execute "global" rules. (OPTIONAL) # -####################################################################### + SOFTOKEN_SRCDIRS = \ + $(DBM_SRCDIR) $(FREEBL_SRCDIR) $(SOFTOKEN_SRCDIR) \ + $(SQLITE_SRCDIR) $(NULL) -include $(CORE_DEPTH)/coreconf/rules.mk + ifneq (,$(FREEBL_SRCDIR)) + $(FREEBL_SRCDIR): $(UTIL_SRCDIR) + endif + + ifneq (,$(SOFTOKEN_SRCDIR)) + $(SOFTOKEN_SRCDIR): $(DBM_SRCDIR) $(FREEBL_SRCDIR) $(SQLITE_SRCDIR) $(UTIL_SRCDIR) + endif -####################################################################### -# (6) Execute "component" rules. (OPTIONAL) # -####################################################################### + 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) + ifneq (,$(SYSINIT_SRCDIR)) + $(SYSINIT_SRCDIR): $(UTIL_SRCDIR) + endif + nss: base certdb certhigh cryptohi dev $(LIBPKIX_SRCDIR) pk11wrap pki $(UTIL_SRCDIR) + smime: nss pkcs7 pkcs12 + ssl: nss + ckfw: nss -####################################################################### -# (7) Execute "local" 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 diff --git a/lib/manifest.mn b/lib/manifest.mn deleted file mode 100644 index 15cc2e618..000000000 --- a/lib/manifest.mn +++ /dev/null @@ -1,70 +0,0 @@ -# -# 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 |