* Add virtual destructors to CnfStream, Theory, OutputChannel, and
[cvc5.git] / Makefile.subdir
1 # -*-makefile-*-
2 include $(topdir)/builds/current
3 builddir = $(topdir)/builds/$(CURRENT_BUILD)/$(srcdir)
4 unittestdir = $(topdir)/builds/$(CURRENT_BUILD)/test/unit
5 unittestprefix = $(srcdir:src/%=%)
6
7 .PHONY: _default_build_ all
8 _default_build_: all
9 all %:
10 @if test -e $(builddir); then \
11 echo cd $(builddir); \
12 cd $(builddir); \
13 echo $(MAKE) $@; \
14 $(MAKE) $@; \
15 else \
16 echo; \
17 echo 'Run configure first, or type "make" in a configured build directory.'; \
18 echo; \
19 fi
20
21 .PHONY: check
22 ifeq ($(srcdir:test/%=test),test)
23 # under the test/ directory, additional subtargets
24 .PHONY: regress0 regress1 regress2 regress3
25 check regress0 regress1 regress2 regress3:
26 @if test -e $(builddir); then \
27 echo cd $(builddir); \
28 cd $(builddir); \
29 echo $(MAKE) $@; \
30 $(MAKE) $@; \
31 else \
32 echo; \
33 echo "** ERROR: could not find testing dir \`$(builddir)'"; \
34 echo; \
35 fi
36 else
37 check:
38 @if test -e $(unittestdir); then \
39 echo cd $(unittestdir); \
40 cd $(unittestdir); \
41 echo $(MAKE) TEST_PREFIX=$(unittestprefix)/ $@; \
42 $(MAKE) TEST_PREFIX=$(unittestprefix)/ $@; \
43 else \
44 echo; \
45 echo "** ERROR: could not find unit testing dir \`$(unittestdir)'"; \
46 echo; \
47 exit 1; \
48 fi
49 endif
50
51 # synonyms for "check"
52 .PHONY: regress test
53 regress test: check