]> git.saurik.com Git - bison.git/blame_incremental - tests/Makefile.am
* configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
[bison.git] / tests / Makefile.am
... / ...
CommitLineData
1## Process this file with automake to create Makefile.in.
2
3## Makefile for Bison testsuite.
4## Copyright (C) 2000, 2001, 2002 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
21EXTRA_DIST = $(TESTSUITE_AT) testsuite package.m4
22
23DISTCLEANFILES = atconfig $(check_SCRIPTS)
24MAINTAINERCLEANFILES = 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
44TESTSUITE_AT = \
45 testsuite.at \
46 input.at \
47 output.at sets.at reduce.at \
48 synclines.at headers.at actions.at conflicts.at \
49 calc.at \
50 torture.at existing.at regression.at \
51 cxx-type.at
52
53TESTSUITE = $(srcdir)/testsuite
54
55AUTOTEST = $(AUTOM4TE) --language=autotest
56$(TESTSUITE): package.m4 $(TESTSUITE_AT)
57 $(AUTOTEST) -I $(srcdir) testsuite.at -o $@.tmp
58 mv $@.tmp $@
59
60atconfig: $(top_builddir)/config.status
61 cd $(top_builddir) && ./config.status tests/$@
62
63clean-local:
64 $(SHELL) $(TESTSUITE) --clean
65
66check-local: atconfig atlocal $(TESTSUITE)
67 $(SHELL) $(TESTSUITE)
68
69check_SCRIPTS = bison
70
71# Run the test suite on the *installed* tree.
72installcheck-local:
73 $(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin
74
75# Be real mean with it.
76.PHONY: maintainer-check-valgrind
77maintainer-check-valgrind: $(TESTSUITE)
78 if test -n "$(VALGRIND)"; then \
79 $(TESTSUITE) PREBISON='$(VALGRIND) -q' PREPARSER='$(VALGRIND) -q'; \
80 else \
81 true; \
82 fi
83
84.PHONY: maintainer-check-g++
85maintainer-check-g++: $(TESTSUITE)
86 if test -n "$(VALGRIND)"; then \
87 $(TESTSUITE) CC='$(GXX)' \
88 else \
89 true; \
90 fi
91
92.PHONY: maintainer-check
93maintainer-check: maintainer-check-valgrind maintainer-check-g++