From 1f8da4ffd0887a095994392087d76f376ac006d2 Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Mon, 16 Jul 2012 19:00:31 +0000 Subject: [PATCH] now passes "make distcheck", which does important checks for the release (e.g., "make dist" produces a distribution that passes "make dist" and "make check", "make uninstall" actually uninstalls, "make distclean" actually cleans, ...) --- Makefile.am | 8 +++++++ src/Makefile.am | 28 ++++++++++++++++++++++ test/regress/regress0/decision/Makefile.am | 21 +++++++++++++++- test/system/Makefile.am | 2 ++ test/unit/Makefile.am | 20 +++++++++++++++- test/unit/expr/attribute_white.h | 2 +- 6 files changed, 78 insertions(+), 3 deletions(-) diff --git a/Makefile.am b/Makefile.am index b72c71031..b3cd37e9a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -126,3 +126,11 @@ dist-hook: distclean-local: test -z "$(DX_DOCDIR)" || rm -fr "$(DX_DOCDIR)" + +# these have .in versions +DISTCLEANFILES = \ + doc/cvc4.1 \ + doc/cvc4.5 \ + doc/libcvc4.3 \ + doc/libcvc4compat.3 \ + doc/libcvc4parser.3 diff --git a/src/Makefile.am b/src/Makefile.am index 818acfa29..e04910804 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -146,3 +146,31 @@ uninstall-local: -rmdir "$(DESTDIR)$(includedir)/cvc4/bindings" -rmdir "$(DESTDIR)$(includedir)/cvc4" -rmdir "$(DESTDIR)$(libdir)/ocaml/cvc4" + +# clean up the .fix files +mostlyclean-local: + (echo include/cvc4.h; \ + echo include/cvc4_public.h; \ + echo include/cvc4parser_public.h; \ + find * -name '*.h.fix' | \ + xargs grep -l '^# *include *' | \ + sed 's,\.fix$$,,'; \ + (cd "$(srcdir)" && find * -name '*.h' | \ + xargs grep -l '^# *include *"cvc4.*_public\.h"')) | \ + while read f; do \ + if expr "$$f" : ".*_\(template\|private\|test_utils\)\.h$$" &>/dev/null; then \ + continue; \ + fi; \ + d="$$(echo "$$f" | sed 's,^include/,,')"; \ + if [ -e "$$f" ]; then \ + path="$$f"; \ + fixpath="$$f.fix"; \ + else \ + path="$(srcdir)/$$f"; \ + fixpath="$(builddir)/$$f.fix"; \ + $(MKDIR_P) "`dirname "$$fixpath"`"; \ + fi; \ + echo rm -f "$$fixpath"; \ + rm -f "$$fixpath"; \ + done + diff --git a/test/regress/regress0/decision/Makefile.am b/test/regress/regress0/decision/Makefile.am index bcc6a28a9..fcef044dc 100644 --- a/test/regress/regress0/decision/Makefile.am +++ b/test/regress/regress0/decision/Makefile.am @@ -36,7 +36,26 @@ TESTS = \ # pp-regfile.smt \ # -EXTRA_DIST = $(TESTS) +EXTRA_DIST = $(TESTS) \ + aufbv-fuzz01.smt.expect \ + pp-regfile.delta01.smt.expect \ + uflia-error0.smt2.expect \ + bitvec0.delta01.smt.expect \ + pp-regfile.delta02.smt.expect \ + uflia-xs-09-16-3-4-1-5.delta03.smt.expect \ + bitvec0.smt.expect \ + pp-regfile.smt.expect \ + uflia-xs-09-16-3-4-1-5.smt.expect \ + bitvec5.smt.expect \ + quant-Arrays_Q1-noinfer.smt2.expect \ + wchains010ue.delta02.smt.expect \ + bug347.smt.expect \ + quant-ex1.disable_miniscope.smt2.expect \ + wchains010ue.smt.expect \ + just_sat.expect \ + quant-ex1.smt2.expect \ + just_unsat.expect \ + quant-symmetric_unsat_7.smt2.expect #if CVC4_BUILD_PROFILE_COMPETITION #else diff --git a/test/system/Makefile.am b/test/system/Makefile.am index 070f69639..fb39acc4c 100644 --- a/test/system/Makefile.am +++ b/test/system/Makefile.am @@ -43,6 +43,8 @@ EXTRA_DIST = \ $(CPLUSPLUS_TESTS:%=%.cpp) \ $(TEST_DEPS_DIST) +MOSTLYCLEANFILES = $(TESTS) + if STATIC_BINARY system_LINK = $(CXXLINK) -all-static else diff --git a/test/unit/Makefile.am b/test/unit/Makefile.am index dc53bff61..d5b6ce5bf 100644 --- a/test/unit/Makefile.am +++ b/test/unit/Makefile.am @@ -105,7 +105,25 @@ EXTRA_DIST = \ $(UNIT_TESTS:%=%.h) \ $(TEST_DEPS_DIST) -MOSTLYCLEANFILES = $(UNIT_TESTS) $(UNIT_TESTS:%=%.cpp) +MOSTLYCLEANFILES = $(UNIT_TESTS) $(UNIT_TESTS:%=%.cpp) $(UNIT_TESTS:%=%.lo) + +# the tests automake infrastructure doesn't clean up .o files :-( +# handle both .libs and _libs variants +mostlyclean-local: + @for f in $(UNIT_TESTS); do \ + dir="$$(dirname "$$f")"; fil="$$(basename "$$f")"; \ + for junk in "$$dir/.libs/$$fil.o" \ + "$$dir/_libs/$$fil.o" \ + "$$dir/.libs/lt-$$fil" \ + "$$dir/_libs/lt-$$fil" \ + "$$dir/.libs/$$fil" \ + "$$dir/_libs/$$fil"; do \ + if test -e "$$junk"; then \ + echo "rm -f \"$$junk\""; \ + rm -f "$$junk"; \ + fi; \ + done; \ + done @mk_include@ @srcdir@/Makefile.tests diff --git a/test/unit/expr/attribute_white.h b/test/unit/expr/attribute_white.h index 734e38b7b..0fe0e93f0 100644 --- a/test/unit/expr/attribute_white.h +++ b/test/unit/expr/attribute_white.h @@ -362,7 +362,7 @@ public: TS_ASSERT(unnamed.hasAttribute(TestFlag5())); // test two-arg version of hasAttribute() - bool bb CVC4_UNUSED; + bool bb = false; Debug("boolattr") << "get flag 1 on a (should be F)\n"; TS_ASSERT(a.getAttribute(TestFlag1(), bb)); TS_ASSERT(! bb); -- 2.30.2