forked from pastelnetwork/pastel
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.am
165 lines (127 loc) · 6.63 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
ACLOCAL_AMFLAGS = -I build-aux/m4
SUBDIRS = src
if ENABLE_MAN
SUBDIRS += doc/man
endif
.PHONY: deploy analyze FORCE
GZIP_ENV="-9n"
if BUILD_BITCOIN_LIBS
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libzcashconsensus.pc
endif
PASTELD_BIN=$(top_builddir)/src/$(PASTEL_DAEMON_NAME)$(EXEEXT)
PASTEL_CLI_BIN=$(top_builddir)/src/$(PASTEL_CLI_NAME)$(EXEEXT)
DIST_DOCS = $(wildcard doc/*.md) $(wildcard doc/release-notes/*.md)
BIN_CHECKS=$(top_srcdir)/contrib/devtools/symbol-check.py \
$(top_srcdir)/contrib/devtools/security-check.py
COVERAGE_INFO = baseline_filtered_combined.info baseline.info \
leveldb_baseline.info test_bitcoin_filtered.info total_coverage.info \
baseline_filtered.info \
leveldb_baseline_filtered.info test_bitcoin_coverage.info test_bitcoin.info \
pastel-gtest.info pastel-gtest_filtered.info pastel-gtest_coverage.info
dist-hook:
-$(MAKE) -C $(top_distdir)/src/leveldb clean
-$(MAKE) -C $(top_distdir)/src/secp256k1 distclean
-$(GIT) archive --format=tar HEAD -- src/clientversion.cpp | $(AMTAR) -C $(top_distdir) -xf -
distcheck-hook:
$(MKDIR_P) $(top_distdir)/_build/src/leveldb
cp -rf $(top_srcdir)/src/leveldb/* $(top_distdir)/_build/src/leveldb/
-$(MAKE) -C $(top_distdir)/_build/src/leveldb clean
distcleancheck:
@:
$(if $(findstring src/,$(MAKECMDGOALS)),$(MAKECMDGOALS), none): FORCE
$(MAKE) -C src $(patsubst src/%,%,$@)
$(PASTELD_BIN): FORCE
$(MAKE) -C src $(@F)
$(PASTEL_CLI_BIN): FORCE
$(MAKE) -C src $(@F)
if USE_LCOV
baseline.info:
$(LCOV) -c -i -d $(abs_builddir)/src -o $@
baseline_filtered.info: baseline.info
$(LCOV) -r $< "/usr/include/*" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gtest/*" \
"$(abs_builddir)/src/gtest/*" \
"$(abs_builddir)/src/test/*" \
"$(abs_builddir)/src/wallet/gtest/*" \
"$(abs_builddir)/src/wallet/test/*" \
-o $@
leveldb_baseline.info: baseline_filtered.info
$(LCOV) -c -i -d $(abs_builddir)/src/leveldb -b $(abs_builddir)/src/leveldb -o $@
leveldb_baseline_filtered.info: leveldb_baseline.info
$(LCOV) -r $< "/usr/include/*" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gtest/*" \
"$(abs_builddir)/src/gtest/*" \
"$(abs_builddir)/src/test/*" \
"$(abs_builddir)/src/wallet/gtest/*" \
"$(abs_builddir)/src/wallet/test/*" \
-o $@
baseline_filtered_combined.info: leveldb_baseline_filtered.info baseline_filtered.info
$(LCOV) -a leveldb_baseline_filtered.info -a baseline_filtered.info -o $@
test_bitcoin.info: baseline_filtered_combined.info
$(MAKE) -C src/ bitcoin_test_check
$(LCOV) -c -d $(abs_builddir)/src -t test_bitcoin -o $@
$(LCOV) -z -d $(abs_builddir)/src
$(LCOV) -z -d $(abs_builddir)/src/leveldb
test_bitcoin_filtered.info: test_bitcoin.info
$(LCOV) -r $< "/usr/include/*" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gtest/*" \
"$(abs_builddir)/src/gtest/*" \
"$(abs_builddir)/src/test/*" \
"$(abs_builddir)/src/wallet/gtest/*" \
"$(abs_builddir)/src/wallet/test/*" \
-o $@
pastel-gtest.info: baseline_filtered_combined.info
$(MAKE) -C src/ pastel-gtest_check
$(LCOV) -c -d $(abs_builddir)/src -t pastel-gtest -o $@
$(LCOV) -z -d $(abs_builddir)/src
$(LCOV) -z -d $(abs_builddir)/src/leveldb
pastel-gtest_filtered.info: pastel-gtest.info
$(LCOV) -r $< "/usr/include/*" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gtest/*" \
"$(abs_builddir)/src/gtest/*" \
"$(abs_builddir)/src/test/*" \
"$(abs_builddir)/src/wallet/gtest/*" \
"$(abs_builddir)/src/wallet/test/*" \
-o $@
test_bitcoin_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info
$(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -o $@
pastel-gtest_coverage.info: baseline_filtered_combined.info pastel-gtest_filtered.info
$(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a pastel-gtest_filtered.info -o $@
total_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info pastel-gtest_filtered.info
$(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -a pastel-gtest_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt
test_bitcoin.coverage/.dirstamp: test_bitcoin_coverage.info
$(GENHTML) -s $< -o $(@D)
@touch $@
pastel-gtest.coverage/.dirstamp: pastel-gtest_coverage.info
$(GENHTML) -s $< -o $(@D)
@touch $@
cov-pastel: pastel-gtest.coverage/.dirstamp
total.coverage/.dirstamp: total_coverage.info
$(GENHTML) -s $< -o $(@D)
@touch $@
cov: test_bitcoin.coverage/.dirstamp cov-pastel total.coverage/.dirstamp
endif
dist_bin_SCRIPTS = pcutil/fetch-params.sh
dist_noinst_SCRIPTS = autogen.sh pcutil/build-debian-package.sh build.sh
EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/rpc-tests.sh qa/pull-tester/run-pastel-cli qa/rpc-tests qa/test-suite $(DIST_DOCS) $(BIN_CHECKS)
install-exec-hook:
mv $(DESTDIR)$(bindir)/fetch-params.sh $(DESTDIR)$(bindir)/pastel-fetch-params
analyze:
./pcutil/static_code_analysis.py
.INTERMEDIATE: $(COVERAGE_INFO)
DISTCHECK_CONFIGURE_FLAGS = --enable-man
clean-local:
rm -rf test_bitcoin.coverage/ pastel-gtest.coverage/ total.coverage/