3 # This makefile is included from source directories in order to
4 # trigger a build in the corresponding build directory.
6 # See src/Makefile for an example.
8 include $(topdir)/builds/current
9 builddir = $(topdir)/builds/$(CURRENT_BUILD)/$(srcdir)
10 unittestdir = $(topdir)/builds/$(CURRENT_BUILD)/test/unit
11 unittestprefix = $(srcdir:src/%=%)
15 @if test -e $(builddir); then \
16 echo cd $(builddir); \
22 echo 'Run configure first, or type "make" in a configured build directory.'; \
27 ifeq ($(srcdir:test/%=test),test)
28 # under the test/ directory, additional subtargets
29 .PHONY: systemtests regress regress0 regress1 regress2 regress3
30 check units systemtests regress regress0 regress1 regress2 regress3:
31 @if test -e $(builddir); then \
32 echo cd $(builddir); \
38 echo "** ERROR: could not find testing dir \`$(builddir)'"; \
43 @if test -e $(unittestdir); then \
44 echo cd $(unittestdir); \
46 echo $(MAKE) TEST_PREFIX=$(unittestprefix)/ $@; \
47 $(MAKE) TEST_PREFIX=$(unittestprefix)/ $@; \
50 echo "** ERROR: could not find unit testing dir \`$(unittestdir)'"; \
56 # synonyms for "check"