2 # Copyright (C) 2004, 2006, 2007, 2009 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 # Verify that intermediate files are only built from Yacc and Lex
18 # sources in maintainer mode.
19 # From Derek R. Price.
26 cat >> configure.
in << 'END'
34 cat > Makefile.am
<<'END'
38 zardoz_SOURCES = zardoz.y joe.l
42 # The point of this test is that it is not dependent on a working lex or yacc.
49 # On systems which link in libraries non-lazily and whose linkers
50 # complain about unresolved symbols by default, such as Solaris, an
51 # yylex function needs to be defined to avoid an error due to an
59 int main (int argc, char **argv)
65 # Ensure a later timestamp for our Lex & Yacc sources.
77 cat >myyacc.sh
<<'END'
84 chmod +x myyacc.sh mylex.sh
87 # make maintainer-clean; ./configure; make should always work,
89 $MAKE maintainer-clean
91 YACC
="myyacc.sh" LEX
="mylex.sh" \
92 LEX_OUTPUT_ROOT
='lex.yy' $MAKE -e zardoz.c joe.c
93 grep zardoz.y zardoz.c