2 # Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007 Free Software
5 # This file is part of GNU Automake.
7 # GNU Automake is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 3, or (at your option)
12 # GNU Automake is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with Automake; see the file COPYING. If not, write to
19 # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 # Boston, MA 02110-1301, USA.
22 # Test to make sure ylwrap put in right location.
23 # Report from Tim Van Holder.
24 # Also make sure depcomp does not needlessly update headers.
25 # Report from Paolo Bonzini.
27 required='gcc bison GNUmake'
32 cat > configure.in << 'END'
33 AC_INIT([yacc6], [1.0])
34 AC_CONFIG_AUX_DIR([aux1])
36 AC_CONFIG_FILES([Makefile])
40 AC_CONFIG_FILES([sub/Makefile])
44 cat > Makefile.am << 'END'
48 test `ls -1t sub/main.$(OBJEXT) z | sed 1q` = z
50 test `ls -1t sub/main.$(OBJEXT) z | sed 1q` = sub/main.$(OBJEXT)
55 cat > sub/Makefile.am << 'END'
56 bin_PROGRAMS = foo bar
58 foo_SOURCES = foo.y main.c
60 bar_SOURCES = bar.y main.c
61 BUILT_SOURCES = foo.h bar.h
64 cat > sub/foo.y << 'END'
66 int yylex () {return 0;}
67 void yyerror (char *s) {}
71 foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};
74 cp sub/foo.y sub/bar.y
76 cat >sub/main.c <<'EOF'
96 $FGREP '(top_srcdir)/aux1/ylwrap' sub/Makefile.in
99 grep '#.*line.*foo.y' sub/foo.c
100 grep '#.*line.*bar.y' sub/bar.c
107 $MAKE test-time-unchanged
109 sed s/TOKEN/TEKON/g sub/bar.y >sub/bar.yt
110 mv -f sub/bar.yt sub/bar.y
112 $MAKE test-time-changed