2 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
4 # This file is part of GNU Automake.
6 # GNU Automake is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
11 # GNU Automake is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with Automake; see the file COPYING. If not, write to
18 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 # Boston, MA 02111-1307, USA.
21 # This test checks that dependent files are updated before including
22 # in the distribution. `parse.c' depends on `parce.y'. The later is
23 # updated so that `parse.c' should be rebuild. Then we are running
24 # `make' and `make distdir' and check whether the version of `parse.c'
25 # to be distributed is up to date.
30 cat > configure.in << 'END'
32 AC_CONFIG_AUX_DIR([.])
33 AM_INIT_AUTOMAKE(foo, 0.1)
41 cat > Makefile.am << 'END'
43 foo_SOURCES = parse.y foo.c
46 # Original parser, with `foobar'
47 cat > parse.y << 'END'
49 int yylex () {return 0;}
50 void yyerror (char *s) {}
53 foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};
57 int main () { return 0; }
73 # A delay is needed to make sure that the new parse.y is indeed newer
74 # than parse.c, i.e. the they don't have the same timestamp.
77 # New parser, with `fubar'
78 cat > ../parse.y << 'END'
80 int yylex () {return 0;}
81 void yyerror (char *s) {}
84 fubar : 'f' 'o' 'o' 'b' 'a' 'r' {};
89 grep fubar foo-0.1/parse.c
92 # Now check to make sure that `make dist' will rebuild the parser.
95 # A delay is needed to make sure that the new parse.y is indeed newer
96 # than parse.c, i.e. the they don't have the same timestamp.
99 # New parser, with `maude'
100 cat > ../parse.y << 'END'
102 int yylex () {return 0;}
103 void yyerror (char *s) {}
106 maude : 'm' 'a' 'u' 'd' 'e' {};
110 grep maude foo-0.1/parse.c