2 # Copyright (C) 2004, 2006, 2007 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 3, 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 dependant on a working lex or yacc.
51 int main (int argc, char **argv)
57 # Ensure a later timestamp for our Lex & Yacc sources.
69 cat >myyacc.sh
<<'END'
76 chmod +x myyacc.sh mylex.sh
79 # make maintainer-clean; ./configure; make should always work,
81 $MAKE maintainer-clean
83 YACC
="myyacc.sh" LEX
="mylex.sh" \
84 LEX_OUTPUT_ROOT
='lex.yy' $MAKE -e zardoz.c joe.c
85 grep zardoz.y zardoz.c