2 # Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007 Free Software
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 bison GNUmake'
28 cat > configure.
in << 'END'
29 AC_INIT
([yacc6
], [1.0])
30 AC_CONFIG_AUX_DIR
([aux1
])
32 AC_CONFIG_FILES
([Makefile
])
36 AC_CONFIG_FILES
([sub
/Makefile
])
40 cat > Makefile.am
<< 'END'
44 test `ls -1t sub/main.$(OBJEXT) z | sed 1q` = z
46 test `ls -1t sub/main.$(OBJEXT) z | sed 1q` = sub
/main.$
(OBJEXT
)
51 cat > sub
/Makefile.am
<< 'END'
52 bin_PROGRAMS
= foo bar
54 foo_SOURCES
= foo.y main.c
56 bar_SOURCES
= bar.y main.c
57 BUILT_SOURCES
= foo.h bar.h
60 cat > sub
/foo.y
<< 'END'
62 int yylex
() {return 0;}
63 void yyerror
(char
*s
) {}
67 foobar
: 'f' 'o' 'o' 'b' 'a' 'r' {};
70 cp sub
/foo.y sub
/bar.y
72 cat >sub
/main.c
<<'EOF'
92 $FGREP '(top_srcdir)/aux1/ylwrap' sub
/Makefile.
in
95 grep '#.*line.*foo.y' sub
/foo.c
96 grep '#.*line.*bar.y' sub
/bar.c
103 $MAKE test-time-unchanged
105 sed s
/TOKEN
/TEKON
/g sub
/bar.y
>sub
/bar.yt
106 mv -f sub
/bar.yt sub
/bar.y
108 $MAKE test-time-changed