# -*-makefile-*- include $(topdir)/builds/current builddir = $(topdir)/builds/$(CURRENT_BUILD)/$(srcdir) unittestdir = $(topdir)/builds/$(CURRENT_BUILD)/test/unit unittestprefix = $(srcdir:src/%=%) .PHONY: _default_build_ all _default_build_: all all %: @if test -e $(builddir); then \ echo cd $(builddir); \ cd $(builddir); \ echo $(MAKE) $@; \ $(MAKE) $@; \ else \ echo; \ echo 'Run configure first, or type "make" in a configured build directory.'; \ echo; \ fi .PHONY: check ifeq ($(srcdir:test/%=test),test) # under the test/ directory, additional subtargets .PHONY: regress0 regress1 regress2 regress3 check regress0 regress1 regress2 regress3: @if test -e $(builddir); then \ echo cd $(builddir); \ cd $(builddir); \ echo $(MAKE) $@; \ $(MAKE) $@; \ else \ echo; \ echo "** ERROR: could not find testing dir \`$(builddir)'"; \ echo; \ fi else check: @if test -e $(unittestdir); then \ echo cd $(unittestdir); \ cd $(unittestdir); \ echo $(MAKE) TEST_PREFIX=$(unittestprefix)/ $@; \ $(MAKE) TEST_PREFIX=$(unittestprefix)/ $@; \ else \ echo; \ echo "** ERROR: could not find unit testing dir \`$(unittestdir)'"; \ echo; \ exit 1; \ fi endif # synonyms for "check" .PHONY: regress test regress test: check