Add previous concat handling for CBQI BV as heuristic for EQ. (#1528)
[cvc5.git] / Makefile.am
1 include $(top_srcdir)/config/doxygen.am
2
3 AM_CXXFLAGS = -Wall -Wno-unknown-pragmas
4
5 AUTOMAKE_OPTIONS = foreign
6 ACLOCAL_AMFLAGS = -I config
7
8 SUBDIRS_BASE = src test contrib
9 if CVC4_PROOF
10 SUBDIRS = proofs/signatures $(SUBDIRS_BASE)
11 else
12 SUBDIRS = $(SUBDIRS_BASE)
13 endif
14 DIST_SUBDIRS = $(SUBDIRS) examples
15
16
17 .PHONY: examples
18 examples: all
19 (cd examples && $(MAKE) $(AM_MAKEFLAGS))
20
21 .PHONY: install-examples
22 install-examples:
23 (cd examples && $(MAKE) $(AM_MAKEFLAGS) install-data)
24
25 .PHONY: units systemtests regress regress0 regress1 regress2 regress3 regress4
26 systemtests regress regress0 regress1 regress2 regress3 regress4: all
27 +(cd test && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1
28 # We descend into "src" with the "check" target here to ensure that
29 # the test prerequisites are all built.
30 units:
31 (cd src && $(MAKE) $(AM_MAKEFLAGS) check)
32 +(cd test && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1
33
34 LCOV = lcov
35 GENHTML = genhtml
36
37 LCOV_EXCLUDES = \
38 "$(CXXTEST)/*" \
39 "/usr/include/*" \
40 "$(abs_top_builddir)/test/*"
41
42 .PHONY: show-config
43 show-config:
44 @echo
45 @echo '==============================================================================='
46 @echo 'This CVC4 build was configured with:'
47 @echo ' configure $(cvc4_config_cmdline)'
48 @echo '==============================================================================='
49 @echo
50
51 .PHONY: lcov lcov-all lcov18
52 if COVERAGE_ENABLED
53
54 # lcov 1.7 has some bugs that we have to work around (can't do
55 # baseline measurement, merge between different test-names doesn't
56 # work...)
57 lcov: all
58 $(LCOV) -z -d .
59 (cd src && $(MAKE) $(AM_MAKEFLAGS) check)
60 +(cd test/unit && $(MAKE) $(AM_MAKEFLAGS) check)
61 $(LCOV) -c -d . -t cvc4_units -o cvc4-coverage-full.info
62 $(LCOV) -o cvc4-coverage.info -r cvc4-coverage-full.info $(LCOV_EXCLUDES)
63 mkdir -p "@top_srcdir@/html"
64 $(GENHTML) -o "@top_srcdir@/html" cvc4-coverage.info
65 @echo "De-mangling C++ symbols..."
66 @find "@top_srcdir@/html" -name '*.func.html' | \
67 xargs perl -pi -e 's#(<td class="coverFn"><a href=".*">)(.*)(</a></td>)#$$_=`c++filt "$$2"`;chomp;print "$$1<xmp>$$_</xmp>$$3\n";#e'
68
69 lcov-all: all
70 $(LCOV) -z -d .
71 (cd src && $(MAKE) $(AM_MAKEFLAGS) check)
72 +(cd test && $(MAKE) $(AM_MAKEFLAGS) check)
73 $(LCOV) -c -d . -t cvc4_units -o cvc4-coverage-full.info
74 $(LCOV) -o cvc4-coverage.info -r cvc4-coverage-full.info $(LCOV_EXCLUDES)
75 mkdir -p "@top_srcdir@/html"
76 $(GENHTML) -o "@top_srcdir@/html" cvc4-coverage.info
77 @echo "De-mangling C++ symbols..."
78 @find "@top_srcdir@/html" -name '*.func.html' | \
79 xargs perl -pi -e 's#(<td class="coverFn"><a href=".*">)(.*)(</a></td>)#$$_=`c++filt "$$2"`;chomp;print "$$1<xmp>$$_</xmp>$$3\n";#e'
80
81 # when we get a working lcov, we can do better stats for
82 # modules/test-types; unfortunately lcov 1.8 directory paths
83 # are broken(?) or at least different than 1.7
84 lcov18: all
85 +@for testtype in public black white; do \
86 echo; echo "=== Collecting coverage data from $$testtype unit tests ==="; \
87 echo $(LCOV) -z -d .; \
88 $(LCOV) -z -d . || exit 1; \
89 echo "(cd src && $(MAKE) $(AM_MAKEFLAGS) check) || exit 1"; \
90 (cd src && $(MAKE) $(AM_MAKEFLAGS) check) || exit 1; \
91 echo "(cd test/unit && $(MAKE) $(AM_MAKEFLAGS) check TEST_SUFFIX=_$$testtype) || exit 1"; \
92 (cd test/unit && $(MAKE) $(AM_MAKEFLAGS) check TEST_SUFFIX=_$$testtype) || exit 1; \
93 echo $(LCOV) -c -d . -t $$testtype -o cvc4-coverage-$$testtype-full.info || exit 1; \
94 $(LCOV) -c -d . -t $$testtype -o cvc4-coverage-$$testtype-full.info || exit 1; \
95 echo $(LCOV) -o cvc4-coverage-$$testtype.info -r cvc4-coverage-$$testtype-full.info $(LCOV_EXCLUDES); \
96 $(LCOV) -o cvc4-coverage-$$testtype.info -r cvc4-coverage-$$testtype-full.info $(LCOV_EXCLUDES) || exit 1; \
97 echo; \
98 done
99 mkdir -p "@top_srcdir@/html"
100 $(GENHTML) -o "@top_srcdir@/html" cvc4-coverage-public.info cvc4-coverage-black.info cvc4-coverage-white.info
101 @echo "De-mangling C++ symbols..."
102 @find "@top_srcdir@/html" -name '*.func.html' | \
103 xargs perl -ni -e 's,(<td class="coverFn"><a href=".*">)(.*)(</a></td>.*),$$_=`c++filt "$$2"`;chomp;print "$$1<xmp>$$_</xmp>$$3\n";,e || print'
104
105 else
106
107 lcov lcov-all lcov18:
108 @echo
109 @echo "Coverage is not enabled in this build." >&2
110 @echo "Please run configure with --enable-coverage." >&2
111 @echo
112 @false
113
114 endif
115
116 # abs_srcdir is required here to get this Makefile instead of the
117 # Makefile in the builddir (since $(srcdir) is stripped off of
118 # EXTRA_DIST files)
119 EXTRA_DIST = \
120 Makefile.builds.in \
121 Makefile.subdir \
122 library_versions \
123 RELEASE-NOTES \
124 config/build-type \
125 config/mkbuilddir \
126 config/doxygen.cfg \
127 doc/find_public_interface.sh \
128 doc/cvc4.1_template.in \
129 doc/cvc4.5.in \
130 doc/libcvc4.3_template.in \
131 doc/SmtEngine.3cvc_template.in \
132 doc/options.3cvc_template.in \
133 doc/libcvc4parser.3.in \
134 doc/libcvc4compat.3.in
135
136 man_MANS = \
137 doc/cvc4.1 \
138 doc/pcvc4.1 \
139 doc/cvc4.5 \
140 doc/libcvc4.3 \
141 doc/SmtEngine.3cvc \
142 doc/options.3cvc \
143 doc/libcvc4parser.3 \
144 doc/libcvc4compat.3
145
146 doc/pcvc4.1: doc/cvc4.1
147 rm -f doc/pcvc4.1
148 cp -p "$<" "$@"
149
150 # Can't put the first several in EXTRA_DIST because those are processed
151 # *before* recursive "make dist", and these files are generated in a
152 # subdirectory invocation of "make dist".
153 #
154 # The Makefile also can't go in EXTRA_DIST, because then automake thinks
155 # it's the one in the builddir and we want the one from the srcdir.
156 dist-hook: doc/cvc4.1 doc/libcvc4.3 doc/SmtEngine.3cvc doc/options.3cvc
157 cp -p $^ "$(distdir)/doc"
158 cp -p "$(srcdir)/Makefile" "$(distdir)/Makefile"
159
160 distclean-local:
161 test -z "$(DX_DOCDIR)" || rm -fr "$(DX_DOCDIR)"
162
163 # these have .in versions
164 DISTCLEANFILES = \
165 doc/cvc4.1 \
166 doc/cvc4.1_template \
167 doc/pcvc4.1 \
168 doc/cvc4.5 \
169 doc/libcvc4.3 \
170 doc/libcvc4.3_template \
171 doc/libcvc4compat.3 \
172 doc/libcvc4parser.3 \
173 doc/SmtEngine.3cvc \
174 doc/SmtEngine.3cvc_template \
175 doc/options.3cvc \
176 doc/options.3cvc_template