]>
Commit | Line | Data |
---|---|---|
d4977ce3 AD |
1 | ## Makefile for Bison testsuite. |
2 | ||
34136e65 | 3 | ## Copyright (C) 2000-2012 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 | ||
9bfbf75b | 18 | EXTRA_DIST += $(TESTSUITE_AT) tests/testsuite |
d4977ce3 AD |
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 | |
9bfbf75b AD |
28 | $(AM_V_GEN)rm -f $@ $@.tmp |
29 | $(AM_V_at){ \ | |
d4977ce3 AD |
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 | |
9bfbf75b | 37 | $(AM_V_at)mv $@.tmp $@ |
d4977ce3 AD |
38 | |
39 | ## ------------ ## | |
40 | ## Test suite. ## | |
41 | ## ------------ ## | |
42 | ||
9bfbf75b | 43 | ## Leave testsuite.at first for the "testsuite" rule's $<. |
e9690142 | 44 | TESTSUITE_AT = \ |
9bfbf75b AD |
45 | tests/testsuite.at \ |
46 | \ | |
e9690142 JD |
47 | tests/actions.at \ |
48 | tests/c++.at \ | |
49 | tests/calc.at \ | |
50 | tests/conflicts.at \ | |
51 | tests/cxx-type.at \ | |
52 | tests/existing.at \ | |
53 | tests/glr-regression.at \ | |
54 | tests/headers.at \ | |
55 | tests/input.at \ | |
56 | tests/java.at \ | |
57 | tests/local.at \ | |
58 | tests/named-refs.at \ | |
59 | tests/output.at \ | |
9bfbf75b | 60 | tests/package.m4 \ |
e9690142 JD |
61 | tests/push.at \ |
62 | tests/reduce.at \ | |
63 | tests/regression.at \ | |
64 | tests/sets.at \ | |
65 | tests/skeletons.at \ | |
66 | tests/synclines.at \ | |
d4977ce3 AD |
67 | tests/torture.at |
68 | ||
69 | TESTSUITE = $(top_srcdir)/tests/testsuite | |
a8873669 | 70 | RUN_TESTSUITE = $(TESTSUITE) -C tests $(TESTSUITEFLAGS) |
d4977ce3 AD |
71 | |
72 | AUTOTEST = $(AUTOM4TE) --language=autotest | |
56ddee7f | 73 | AUTOTESTFLAGS = -I $(top_srcdir)/tests |
9bfbf75b AD |
74 | $(TESTSUITE): $(TESTSUITE_AT) |
75 | $(AM_V_GEN)$(AUTOTEST) $(AUTOTESTFLAGS) $< -o $@.tmp | |
76 | $(AM_V_at)mv $@.tmp $@ | |
d4977ce3 | 77 | |
d4977ce3 AD |
78 | clean-local: clean-local-tests |
79 | clean-local-tests: | |
2cd1af95 | 80 | test ! -f $(TESTSUITE) || $(TESTSUITE) -C tests --clean |
d4977ce3 AD |
81 | |
82 | check-local: tests/atconfig tests/atlocal $(TESTSUITE) | |
83 | # Move into tests/ so that testsuite.dir etc. be created there. | |
a8873669 | 84 | $(RUN_TESTSUITE) |
d4977ce3 AD |
85 | |
86 | check_SCRIPTS = tests/bison | |
87 | ||
88 | # Run the test suite on the *installed* tree. | |
89 | installcheck-local: | |
a8873669 | 90 | $(RUN_TESTSUITE) AUTOTEST_PATH="$(bindir)" |
d4977ce3 AD |
91 | |
92 | # Be real mean with it. | |
93 | .PHONY: maintainer-check-g++ | |
94 | maintainer-check-g++: $(TESTSUITE) | |
a8873669 | 95 | $(RUN_TESTSUITE) CC='$(CXX)' |
d4977ce3 AD |
96 | |
97 | .PHONY: maintainer-check-posix | |
98 | maintainer-check-posix: $(TESTSUITE) | |
a8873669 | 99 | $(RUN_TESTSUITE) POSIXLY_CORRECT=1 _POSIX2_VERSION=200112 |
d4977ce3 AD |
100 | |
101 | .PHONY: maintainer-check-valgrind | |
102 | maintainer-check-valgrind: $(TESTSUITE) | |
103 | test -z '$(VALGRIND)' || \ | |
104 | VALGRIND_OPTS='--leak-check=full --show-reachable=yes' \ | |
a8873669 | 105 | $(RUN_TESTSUITE) PREBISON='$(VALGRIND) -q' PREPARSER='$(VALGRIND) -q' |
d4977ce3 AD |
106 | |
107 | .PHONY: maintainer-check | |
108 | maintainer-check: maintainer-check-posix maintainer-check-valgrind maintainer-check-g++ | |
109 | ||
110 | .PHONY: maintainer-push-check | |
111 | maintainer-push-check: | |
112 | BISON_USE_PUSH_FOR_PULL=1 $(MAKE) $(AM_MAKEFLAGS) maintainer-check | |
113 | ||
114 | .PHONY: maintainer-xml-check | |
115 | maintainer-xml-check: | |
116 | BISON_TEST_XML=1 $(MAKE) $(AM_MAKEFLAGS) maintainer-check |