Add a testsuite.
[boost.m4.git] / tests / Makefile.am
blob877e819984e00f20d3dd7777cd1ee93b378558fa
1 # Copyright (C) 2007  Benoit Sigoure <tsuna@lrde.epita.fr>
3 # This program is free software: you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation, either version 3 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 EXTRA_DIST = testsuite.at $(TESTSUITE) atlocal.in package.m4
17 TESTSUITE = $(srcdir)/testsuite
19 $(srcdir)/package.m4: Makefile
20         {                                       \
21           echo '# Signature of the current package.'; \
22           echo 'm4_define([AT_PACKAGE_NAME],      [$(PACKAGE_NAME)])'; \
23           echo 'm4_define([AT_PACKAGE_TARNAME],   [$(PACKAGE_TARNAME)])'; \
24           echo 'm4_define([AT_PACKAGE_VERSION],   [$(PACKAGE_VERSION)])'; \
25           echo 'm4_define([AT_PACKAGE_STRING],    [$(PACKAGE_STRING)])'; \
26           echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])'; \
27         } >$(srcdir)/package.m4
29 check-local: atconfig atlocal $(TESTSUITE)
30         $(SHELL) $(TESTSUITE) $(TESTSUITEFLAGS)
32 # Run the test suite on the *installed* tree.
33 installcheck-local: atconfig atlocal $(TESTSUITE)
34         $(SHELL) $(TESTSUITE) AUTOTEST_PATH="$(bindir)" $(TESTSUITEFLAGS)
36 clean-local:
37         test ! -f $(TESTSUITE) || $(SHELL) $(TESTSUITE) --clean
38         rm -f -r autom4te.cache
40 AUTOTEST = $(AUTOM4TE) --language=autotest
42 $(TESTSUITE): $(srcdir)/package.m4 $(srcdir)/testsuite.at
43         $(AUTOTEST) -I '$(srcdir)' $@.at -o $@.tmp
44         mv $@.tmp $@
46 atconfig: $(top_builddir)/config.status
47         cd $(top_builddir) && $(SHELL) ./config.status tests/$@