2 # Copyright (C) 2001, 2002, 2003 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 2, 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 # This test checks that dependent files are updated before including
18 # in the distribution. `parse.c' depends on `parce.y'. The later is
19 # updated so that `parse.c' should be rebuild. Then we are running
20 # `make' and `make distdir' and check whether the version of `parse.c'
21 # to be distributed is up to date.
26 cat > configure.
in << 'END'
28 AC_CONFIG_AUX_DIR
([.
])
29 AM_INIT_AUTOMAKE
(foo
, 0.1)
37 cat > Makefile.am
<< 'END'
39 foo_SOURCES
= parse.y foo.c
42 # Original parser, with `foobar'
43 cat > parse.y
<< 'END'
45 int yylex
() {return 0;}
46 void yyerror
(char
*s
) {}
49 foobar
: 'f' 'o' 'o' 'b' 'a' 'r' {};
53 int main
() { return 0; }
69 # A delay is needed to make sure that the new parse.y is indeed newer
70 # than parse.c, i.e. the they don't have the same timestamp.
73 # New parser, with `fubar'
74 cat > ..
/parse.y
<< 'END'
76 int yylex
() {return 0;}
77 void yyerror
(char
*s
) {}
80 fubar
: 'f' 'o' 'o' 'b' 'a' 'r' {};
85 grep fubar foo-0.1
/parse.c
88 # Now check to make sure that `make dist' will rebuild the parser.
91 # A delay is needed to make sure that the new parse.y is indeed newer
92 # than parse.c, i.e. the they don't have the same timestamp.
95 # New parser, with `maude'
96 cat > ..
/parse.y
<< 'END'
98 int yylex
() {return 0;}
99 void yyerror
(char
*s
) {}
102 maude
: 'm' 'a' 'u' 'd' 'e' {};
106 grep maude foo-0.1
/parse.c