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