1## $NetBSD: Makefile.am,v 1.2 2009/05/26 05:42:25 lukem Exp $
2
3TESTSUITE	= testsuite
4AUTOTEST	= $(AUTOM4TE) --language=autotest
5
6EXTRA_DIST	= \
7	package.m4 \
8	testsuite
9
10TESTSUITE_DEPS	= \
11	init.at \
12	verify.at \
13	package.m4 \
14	testsuite.at
15
16DISTCLEANFILES	= \
17	atconfig \
18	package.m4 \
19	testsuite
20
21package.m4: $(top_srcdir)/configure.ac
22	( \
23	echo '# Signature of the current package.'; \
24	echo 'm4_define([AT_PACKAGE_NAME],	[@PACKAGE_NAME@])'; \
25	echo 'm4_define([AT_PACKAGE_TARNAME],	[@PACKAGE_TARNAME@])'; \
26	echo 'm4_define([AT_PACKAGE_VERSION],	[@PACKAGE_VERSION@])'; \
27	echo 'm4_define([AT_PACKAGE_STRING],	[@PACKAGE_STRING@])'; \
28	echo 'm4_define([AT_PACKAGE_BUGREPORT],	[@PACKAGE_BUGREPORT@])'; \
29	) > $@
30
31clean-local:
32	test ! -f $(TESTSUITE) || $(SHELL) $(TESTSUITE) --clean
33
34check-local: atconfig atlocal $(TESTSUITE)
35	$(SHELL) '$(TESTSUITE)'
36
37$(TESTSUITE): $(TESTSUITE_DEPS)
38	@echo "Generating $@"
39	$(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
40	mv $@.tmp $@
41