@@ -8,11 +8,10 @@ declare -A LIBS
8
8
LIBS[cli]=" libbitcoin_cli.a"
9
9
LIBS[common]=" libbitcoin_common.a"
10
10
LIBS[consensus]=" libbitcoin_consensus.a"
11
- LIBS[crypto]=" crypto/.libs/libbitcoin_crypto_base. a crypto/.libs/ libbitcoin_crypto_x86_shani.a crypto/.libs/ libbitcoin_crypto_sse41.a crypto/.libs /libbitcoin_crypto_avx2.a"
11
+ LIBS[crypto]=" crypto/libbitcoin_crypto. a crypto/libbitcoin_crypto_x86_shani.a crypto/libbitcoin_crypto_sse41.a crypto/libbitcoin_crypto_avx2.a"
12
12
LIBS[node]=" libbitcoin_node.a"
13
- LIBS[util]=" libbitcoin_util.a"
14
- LIBS[wallet]=" libbitcoin_wallet.a"
15
- LIBS[wallet_tool]=" libbitcoin_wallet_tool.a"
13
+ LIBS[util]=" util/libbitcoin_util.a"
14
+ LIBS[wallet]=" wallet/libbitcoin_wallet.a"
16
15
17
16
# Declare allowed dependencies "X Y" where X is allowed to depend on Y. This
18
17
# list is taken from doc/design/libraries.md.
@@ -32,32 +31,28 @@ ALLOWED_DEPENDENCIES=(
32
31
" wallet common"
33
32
" wallet crypto"
34
33
" wallet util"
35
- " wallet_tool util"
36
- " wallet_tool wallet"
37
34
)
38
35
39
36
# Add minor dependencies omitted from doc/design/libraries.md to keep the
40
37
# dependency diagram simple.
41
38
ALLOWED_DEPENDENCIES+=(
42
39
" wallet consensus"
43
- " wallet_tool common"
44
- " wallet_tool crypto"
45
40
)
46
41
47
42
# Declare list of known errors that should be suppressed.
48
43
declare -A SUPPRESS
49
44
# init.cpp file currently calls Berkeley DB sanity check function on startup, so
50
45
# there is an undocumented dependency of the node library on the wallet library.
51
- SUPPRESS[" libbitcoin_node_a- init.o libbitcoin_wallet_a- bdb.o _ZN6wallet27BerkeleyDatabaseSanityCheckEv" ]=1
46
+ SUPPRESS[" init.cpp.o bdb.cpp .o _ZN6wallet27BerkeleyDatabaseSanityCheckEv" ]=1
52
47
# init/common.cpp file calls InitError and InitWarning from interface_ui which
53
48
# is currently part of the node library. interface_ui should just be part of the
54
49
# common library instead, and is moved in
55
50
# https://github.com/bitcoin/bitcoin/issues/10102
56
- SUPPRESS[" libbitcoin_common_a- common.o libbitcoin_node_a- interface_ui.o _Z11InitWarningRK13bilingual_str" ]=1
57
- SUPPRESS[" libbitcoin_common_a- common.o libbitcoin_node_a- interface_ui.o _Z9InitErrorRK13bilingual_str" ]=1
51
+ SUPPRESS[" common.cpp.o interface_ui.cpp .o _Z11InitWarningRK13bilingual_str" ]=1
52
+ SUPPRESS[" common.cpp.o interface_ui.cpp .o _Z9InitErrorRK13bilingual_str" ]=1
58
53
# rpc/external_signer.cpp adds defines node RPC methods but is built as part of the
59
54
# common library. It should be moved to the node library instead.
60
- SUPPRESS[" libbitcoin_common_a- external_signer.o libbitcoin_node_a- server.o _ZN9CRPCTable13appendCommandERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPK11CRPCCommand" ]=1
55
+ SUPPRESS[" external_signer.cpp.o server.cpp .o _ZN9CRPCTable13appendCommandERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPK11CRPCCommand" ]=1
61
56
62
57
usage () {
63
58
echo " Usage: $( basename " ${BASH_SOURCE[0]} " ) [BUILD_DIR]"
@@ -67,8 +62,10 @@ usage() {
67
62
lib_targets () {
68
63
for lib in " ${! LIBS[@]} " ; do
69
64
for lib_path in ${LIBS[$lib]} ; do
70
- # shellcheck disable=SC2001
71
- sed ' s:/.libs/\(.*\)\.a$:/\1.la:g' <<< " $lib_path"
65
+ local name=" ${lib_path##*/ } "
66
+ name=" ${name# lib} "
67
+ name=" ${name% .a} "
68
+ echo " $name "
72
69
done
73
70
done
74
71
}
@@ -175,7 +172,7 @@ check_not_suppressed() {
175
172
176
173
# Check arguments.
177
174
if [ " $# " = 0 ]; then
178
- BUILD_DIR=" $( dirname " ${BASH_SOURCE[0]} " ) /../../src "
175
+ BUILD_DIR=" $( dirname " ${BASH_SOURCE[0]} " ) /../../build "
179
176
elif [ " $# " = 1 ]; then
180
177
BUILD_DIR=" $1 "
181
178
else
@@ -194,6 +191,7 @@ cd "$BUILD_DIR"
194
191
# shellcheck disable=SC2046
195
192
make -j" $( nproc) " $( lib_targets)
196
193
TEMP_DIR=" $( mktemp -d) "
194
+ cd src
197
195
extract_symbols " $TEMP_DIR "
198
196
if check_libraries " $TEMP_DIR " ; then
199
197
echo " Success! No unexpected dependencies were detected."
0 commit comments