2 # Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007, 2010, 2011 Free
3 # Software Foundation, Inc.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2, or (at your option)
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 # Test to make sure ylwrap put in right location.
19 # Report from Tim Van Holder.
20 # Also make sure depcomp does not needlessly update headers.
21 # Report from Paolo Bonzini.
23 required
='gcc yacc GNUmake'
26 cat > configure.
in << 'END'
27 AC_INIT
([yacc6
], [1.0])
28 # `aux' is not an acceptable file/directory name on Windows systems.
29 AC_CONFIG_AUX_DIR
([aux1
])
31 AC_CONFIG_FILES
([Makefile sub
/Makefile
])
38 cat > Makefile.am
<< 'END'
42 test `ls -1t sub/main.$(OBJEXT) z | sed 1q` = z
44 test `ls -1t sub/main.$(OBJEXT) z | sed 1q` = sub
/main.$
(OBJEXT
)
49 cat > sub
/Makefile.am
<< 'END'
50 bin_PROGRAMS
= foo bar
52 foo_SOURCES
= foo.y main.c
54 bar_SOURCES
= bar.y main.c
55 BUILT_SOURCES
= foo.h bar.h
58 cat > sub
/foo.y
<< 'END'
60 int yylex
() {return 0;}
61 void yyerror
(char
*s
) {}
65 foobar
: 'f' 'o' 'o' 'b' 'a' 'r' {};
68 cp sub
/foo.y sub
/bar.y
70 cat >sub
/main.c
<<'EOF'
90 $FGREP '$(top_srcdir)/aux1/ylwrap' sub
/Makefile.
in
93 grep '#.*line.*foo\.y' sub
/foo.c
94 grep '#.*line.*bar\.y' sub
/bar.c
101 $MAKE test-time-unchanged
103 sed s
/TOKEN
/TEKON
/g sub
/bar.y
>sub
/bar.yt
104 mv -f sub
/bar.yt sub
/bar.y
106 $MAKE test-time-changed