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