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