summaryrefslogtreecommitdiff
path: root/Makefile.subdir
blob: 5b151441eb57308e59f597c741657417469a6e58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# -*-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
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

# synonyms for "check"
.PHONY: regress test
regress test: check
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback