1 include $(top_srcdir)/config/doxygen.am
3 AM_CXXFLAGS = -Wall -Wno-unknown-pragmas
5 AUTOMAKE_OPTIONS = foreign
6 ACLOCAL_AMFLAGS = -I config
8 SUBDIRS_BASE = src test contrib
10 SUBDIRS = proofs/signatures $(SUBDIRS_BASE)
12 SUBDIRS = $(SUBDIRS_BASE)
14 DIST_SUBDIRS = $(SUBDIRS) examples
19 (cd examples && $(MAKE) $(AM_MAKEFLAGS))
21 .PHONY: install-examples
23 (cd examples && $(MAKE) $(AM_MAKEFLAGS) install-data)
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.
31 (cd src && $(MAKE) $(AM_MAKEFLAGS) check)
32 +(cd test && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1
40 "$(abs_top_builddir)/test/*"
45 @echo '==============================================================================='
46 @echo 'This CVC4 build was configured with:'
47 @echo ' configure $(cvc4_config_cmdline)'
48 @echo '==============================================================================='
51 .PHONY: lcov lcov-all lcov18
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
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'
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'
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
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; \
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'
107 lcov lcov-all lcov18:
109 @echo "Coverage is not enabled in this build." >&2
110 @echo "Please run configure with --enable-coverage." >&2
116 # abs_srcdir is required here to get this Makefile instead of the
117 # Makefile in the builddir (since $(srcdir) is stripped off of
127 doc/find_public_interface.sh \
128 doc/cvc4.1_template.in \
131 doc/SmtEngine.3cvc_template.in \
132 doc/options.3cvc_template.in \
133 doc/libcvc4parser.3.in \
134 doc/libcvc4compat.3.in
143 doc/libcvc4parser.3 \
146 doc/pcvc4.1: doc/cvc4.1
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".
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"
161 test -z "$(DX_DOCDIR)" || rm -fr "$(DX_DOCDIR)"
163 # these have .in versions
166 doc/cvc4.1_template \
170 doc/libcvc4compat.3 \
171 doc/libcvc4parser.3 \
173 doc/SmtEngine.3cvc_template \
175 doc/options.3cvc_template