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