]>
Commit | Line | Data |
---|---|---|
d4977ce3 AD |
1 | ## Makefile for Bison testsuite. |
2 | ||
575619af | 3 | ## Copyright (C) 2000-2011 Free Software Foundation, Inc. |
d4977ce3 AD |
4 | |
5 | ## This program is free software: you can redistribute it and/or modify | |
6 | ## it under the terms of the GNU General Public License as published by | |
7 | ## the Free Software Foundation, either version 3 of the License, or | |
8 | ## (at your option) any later version. | |
9 | ## | |
10 | ## This program is distributed in the hope that it will be useful, | |
11 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | ## GNU General Public License for more details. | |
14 | ## | |
15 | ## You should have received a copy of the GNU General Public License | |
16 | ## along with this program. If not, see <http://www.gnu.org/licenses/>. | |
17 | ||
18 | EXTRA_DIST += $(TESTSUITE_AT) tests/testsuite tests/package.m4 | |
19 | ||
20 | DISTCLEANFILES += tests/atconfig $(check_SCRIPTS) | |
21 | MAINTAINERCLEANFILES += $(TESTSUITE) | |
22 | ||
23 | ## ------------ ## | |
24 | ## package.m4. ## | |
25 | ## ------------ ## | |
26 | ||
27 | $(top_srcdir)/tests/package.m4: $(top_srcdir)/configure | |
28 | rm -f $@ $@.tmp | |
29 | { \ | |
30 | echo '# Signature of the current package.'; \ | |
31 | echo 'm4_define([AT_PACKAGE_NAME], [$(PACKAGE_NAME)])'; \ | |
32 | echo 'm4_define([AT_PACKAGE_TARNAME], [$(PACKAGE_TARNAME)])'; \ | |
33 | echo 'm4_define([AT_PACKAGE_VERSION], [$(PACKAGE_VERSION)])'; \ | |
34 | echo 'm4_define([AT_PACKAGE_STRING], [$(PACKAGE_STRING)])'; \ | |
35 | echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])'; \ | |
36 | } >$@.tmp | |
37 | mv $@.tmp $@ | |
38 | ||
39 | ## ------------ ## | |
40 | ## Test suite. ## | |
41 | ## ------------ ## | |
42 | ||
43 | TESTSUITE_AT = \ | |
44 | tests/actions.at \ | |
45 | tests/c++.at \ | |
46 | tests/calc.at \ | |
47 | tests/conflicts.at \ | |
48 | tests/cxx-type.at \ | |
49 | tests/existing.at \ | |
50 | tests/glr-regression.at \ | |
51 | tests/headers.at \ | |
52 | tests/input.at \ | |
53 | tests/java.at \ | |
54 | tests/local.at \ | |
c467dc42 | 55 | tests/named-refs.at \ |
d4977ce3 AD |
56 | tests/output.at \ |
57 | tests/push.at \ | |
58 | tests/reduce.at \ | |
59 | tests/regression.at \ | |
60 | tests/sets.at \ | |
61 | tests/skeletons.at \ | |
62 | tests/synclines.at \ | |
63 | tests/testsuite.at \ | |
64 | tests/torture.at | |
65 | ||
66 | TESTSUITE = $(top_srcdir)/tests/testsuite | |
a8873669 | 67 | RUN_TESTSUITE = $(TESTSUITE) -C tests $(TESTSUITEFLAGS) |
d4977ce3 AD |
68 | |
69 | AUTOTEST = $(AUTOM4TE) --language=autotest | |
56ddee7f | 70 | AUTOTESTFLAGS = -I $(top_srcdir)/tests |
b8675840 | 71 | $(TESTSUITE): $(top_srcdir)/tests/package.m4 $(TESTSUITE_AT) |
56ddee7f | 72 | $(AUTOTEST) $(AUTOTESTFLAGS) $(top_srcdir)/tests/testsuite.at -o $@.tmp |
d4977ce3 AD |
73 | mv $@.tmp $@ |
74 | ||
d4977ce3 AD |
75 | clean-local: clean-local-tests |
76 | clean-local-tests: | |
2cd1af95 | 77 | test ! -f $(TESTSUITE) || $(TESTSUITE) -C tests --clean |
d4977ce3 AD |
78 | |
79 | check-local: tests/atconfig tests/atlocal $(TESTSUITE) | |
80 | # Move into tests/ so that testsuite.dir etc. be created there. | |
a8873669 | 81 | $(RUN_TESTSUITE) |
d4977ce3 AD |
82 | |
83 | check_SCRIPTS = tests/bison | |
84 | ||
85 | # Run the test suite on the *installed* tree. | |
86 | installcheck-local: | |
a8873669 | 87 | $(RUN_TESTSUITE) AUTOTEST_PATH="$(bindir)" |
d4977ce3 AD |
88 | |
89 | # Be real mean with it. | |
90 | .PHONY: maintainer-check-g++ | |
91 | maintainer-check-g++: $(TESTSUITE) | |
a8873669 | 92 | $(RUN_TESTSUITE) CC='$(CXX)' |
d4977ce3 AD |
93 | |
94 | .PHONY: maintainer-check-posix | |
95 | maintainer-check-posix: $(TESTSUITE) | |
a8873669 | 96 | $(RUN_TESTSUITE) POSIXLY_CORRECT=1 _POSIX2_VERSION=200112 |
d4977ce3 AD |
97 | |
98 | .PHONY: maintainer-check-valgrind | |
99 | maintainer-check-valgrind: $(TESTSUITE) | |
100 | test -z '$(VALGRIND)' || \ | |
101 | VALGRIND_OPTS='--leak-check=full --show-reachable=yes' \ | |
a8873669 | 102 | $(RUN_TESTSUITE) PREBISON='$(VALGRIND) -q' PREPARSER='$(VALGRIND) -q' |
d4977ce3 AD |
103 | |
104 | .PHONY: maintainer-check | |
105 | maintainer-check: maintainer-check-posix maintainer-check-valgrind maintainer-check-g++ | |
106 | ||
107 | .PHONY: maintainer-push-check | |
108 | maintainer-push-check: | |
109 | BISON_USE_PUSH_FOR_PULL=1 $(MAKE) $(AM_MAKEFLAGS) maintainer-check | |
110 | ||
111 | .PHONY: maintainer-xml-check | |
112 | maintainer-xml-check: | |
113 | BISON_TEST_XML=1 $(MAKE) $(AM_MAKEFLAGS) maintainer-check |