2 # Copyright (C) 2001, 2002, 2003, 2010, 2011, 2012 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 # This test checks that dependent files are updated before including
19 # in the distribution. `parse.c' depends on `parse.y'. The later is
20 # updated so that `parse.c' should be rebuild. Then we are running
21 # `make' and `make distdir' and check whether the version of `parse.c'
22 # to be distributed is up to date.
24 # Please keep this in sync with sister test `yacc-d-vpath.test'.
29 cat >> configure.in << 'END'
35 cat > Makefile.am << 'END'
37 foo_SOURCES = parse.y foo.c
40 # Original parser, with `foobar'.
41 cat > parse.y << 'END'
43 int yylex () { return 0; }
44 void yyerror (char *s) {}
47 foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};
51 int main () { return 0; }
67 # New parser, with `fubar'.
68 cat > ../parse.y << 'END'
70 int yylex () { return 0; }
71 void yyerror (char *s) {}
74 fubar : 'f' 'o' 'o' 'b' 'a' 'r' {};
79 $FGREP fubar $distdir/parse.c
81 # Now check to make sure that `make dist' will rebuild the parser.
85 # New parser, with `maude'.
86 cat > ../parse.y << 'END'
88 int yylex () { return 0; }
89 void yyerror (char *s) {}
92 maude : 'm' 'a' 'u' 'd' 'e' {};
96 $FGREP maude $distdir/parse.c