1 ## Process this file with automake to create Makefile.in.
3 ## Makefile for Bison testsuite.
5 ## Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software
8 ## This program is free software; you can redistribute it and/or modify
9 ## it under the terms of the GNU General Public License as published by
10 ## the Free Software Foundation; either version 2, or (at your option)
13 ## This program is distributed in the hope that it will be useful,
14 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ## GNU General Public License for more details.
18 ## You should have received a copy of the GNU General Public License
19 ## along with this program; if not, write to the Free Software
20 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23 EXTRA_DIST = $(TESTSUITE_AT) testsuite package.m4
25 DISTCLEANFILES = atconfig $(check_SCRIPTS)
26 MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
32 $(srcdir)/package.m4: $(top_srcdir)/configure.ac
34 echo '# Signature of the current package.'; \
35 echo 'm4_define([AT_PACKAGE_NAME], [$(PACKAGE_NAME)])'; \
36 echo 'm4_define([AT_PACKAGE_TARNAME], [$(PACKAGE_TARNAME)])'; \
37 echo 'm4_define([AT_PACKAGE_VERSION], [$(PACKAGE_VERSION)])'; \
38 echo 'm4_define([AT_PACKAGE_STRING], [$(PACKAGE_STRING)])'; \
39 echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])'; \
40 } >$(srcdir)/package.m4
50 output.at sets.at reduce.at skeletons.at \
51 synclines.at headers.at actions.at conflicts.at \
53 torture.at existing.at regression.at \
56 cxx-type.at glr-regression.at \
59 TESTSUITE = $(srcdir)/testsuite
61 AUTOTEST = $(AUTOM4TE) --language=autotest
62 $(TESTSUITE): package.m4 $(TESTSUITE_AT)
63 $(AUTOTEST) -I $(srcdir) testsuite.at -o $@.tmp
66 atconfig: $(top_builddir)/config.status
67 cd $(top_builddir) && ./config.status tests/$@
70 test ! -f $(TESTSUITE) || $(SHELL) $(TESTSUITE) --clean
72 check-local: atconfig atlocal $(TESTSUITE)
73 $(SHELL) $(TESTSUITE) $(TESTSUITEFLAGS)
77 # Run the test suite on the *installed* tree.
79 $(SHELL) $(TESTSUITE) AUTOTEST_PATH="$(bindir)" $(TESTSUITEFLAGS)
81 # Be real mean with it.
82 .PHONY: maintainer-check-g++
83 maintainer-check-g++: $(TESTSUITE)
84 $(TESTSUITE) CC='$(CXX)'
86 .PHONY: maintainer-check-posix
87 maintainer-check-posix: $(TESTSUITE)
88 $(TESTSUITE) POSIXLY_CORRECT=1 _POSIX2_VERSION=200112
90 .PHONY: maintainer-check-valgrind
91 maintainer-check-valgrind: $(TESTSUITE)
92 test -z '$(VALGRIND)' || \
93 VALGRIND_OPTS='--leak-check=full --show-reachable=yes' \
94 $(TESTSUITE) PREBISON='$(VALGRIND) -q' PREPARSER='$(VALGRIND) -q'
96 .PHONY: maintainer-check
97 maintainer-check: maintainer-check-posix maintainer-check-valgrind maintainer-check-g++
99 .PHONY: maintainer-push-check
100 maintainer-push-check:
101 BISON_USE_PUSH_FOR_PULL=1 $(MAKE) $(AM_MAKEFLAGS) maintainer-check