summaryrefslogtreecommitdiff
path: root/test/unit/Makefile.am
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2010-07-04 02:00:42 +0000
committerMorgan Deters <mdeters@gmail.com>2010-07-04 02:00:42 +0000
commitcc726b5080f8926a3cb96a1b9d1098ad8725ab86 (patch)
treee27572b69cefa5cbc2addb6e19c0c5a13e402746 /test/unit/Makefile.am
parent33f1138d8ab09bf133b945647d9239befe297d5e (diff)
make dist && make distcheck functional, other fixes
Diffstat (limited to 'test/unit/Makefile.am')
-rw-r--r--test/unit/Makefile.am47
1 files changed, 43 insertions, 4 deletions
diff --git a/test/unit/Makefile.am b/test/unit/Makefile.am
index e427e3506..c96fbccb6 100644
--- a/test/unit/Makefile.am
+++ b/test/unit/Makefile.am
@@ -40,7 +40,8 @@ export VERBOSE = 1
# Things that aren't tests but that tests rely on and need to
# go into the distribution
TEST_DEPS_DIST = \
- memory.h
+ memory.h \
+ Makefile.tests
if HAVE_CXXTESTGEN
@@ -68,6 +69,8 @@ AM_LIBADD_PUBLIC = \
EXTRA_DIST = \
no_cxxtest \
+ $(UNIT_TESTS:%=%.cpp) \
+ $(UNIT_TESTS:%=%.h) \
$(TEST_DEPS_DIST)
MOSTLYCLEANFILES = $(UNIT_TESTS) $(UNIT_TESTS:%=%.cpp)
@@ -133,15 +136,19 @@ else
TESTS = no_cxxtest
EXTRA_DIST = \
- $(UNIT_TESTS:%=%.cpp) \
- $(TEST_DEPS_DIST)
+ no_cxxtest \
+ $(UNIT_TESTS:%=%.h) \
+ $(TEST_DEPS_DIST) \
+ no-cxxtest-available
endif
+$(UNIT_TESTS:%=%.cpp): $(UNIT_TESTS:%=$(abs_builddir)/%.cpp)
+
# trick automake into setting LTCXXCOMPILE, CXXLINK, etc.
if CVC4_FALSE
noinst_LTLIBRARIES = libdummy.la
-libdummy_la_SOURCES = expr/node_black.cpp
+nodist_libdummy_la_SOURCES = expr/node_black.cpp
libdummy_la_LIBADD = @abs_top_builddir@/src/libcvc4.la
endif
@@ -152,3 +159,35 @@ regress test: check
# in unit test dir, regressN are also synonyms for check
.PHONY: regress0 regress1 regress2 regress3
regress0 regress1 regress2 regress3: check
+
+if HAVE_CXXTESTGEN
+# all is fine with the world
+else
+# all is not !
+no-cxxtest-available:
+ @if test "$(I_REALLY_WANT_TO_BUILD_CVC4_DIST_WITHOUT_TESTS)" = 1; then \
+ echo; \
+ echo "WARNING:"; \
+ echo "WARNING: No CxxTest to build unit tests, but, then, you know that;"; \
+ echo "WARNING: I hope you know what you're doing."; \
+ echo "WARNING:"; \
+ echo; \
+ ( echo "CxxTest was not available at the time this distribution was built,"; \
+ echo "so the tests could not be built. You'll need CxxTest to test this"; \
+ echo "distribution." ) >no-cxxtest-available; \
+ else \
+ echo; \
+ echo "ERROR:"; \
+ echo "ERROR: You cannot make dist in this build directory, you do not have CxxTest."; \
+ echo "ERROR: The tests should be generated for the user and included in the tarball,"; \
+ echo "ERROR: otherwise they'll be required to have CxxTest just to test the standard"; \
+ echo "ERROR: distribution built correctly."; \
+ echo "ERROR: If you really want to do this, append the following to your make command."; \
+ echo "ERROR:"; \
+ echo "ERROR: I_REALLY_WANT_TO_BUILD_CVC4_DIST_WITHOUT_TESTS=1"; \
+ echo "ERROR:"; \
+ echo; \
+ exit 1; \
+ fi >&2
+endif
+
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback