* configure.in: Bump version to 1.7.2c.
[automake.git] / tests / yacc7.test
blobf57050d133b805e7cafb816fe2c9b6148dcf4f7d
1 #! /bin/sh
2 # Copyright (C) 2001, 2002 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)
9 # any later version.
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 autoconf; 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 # Test to make sure dependencies are generated correctly for .h files.
22 # Report from Richard Boulton.
24 # Also check that the sources of the generated parser are distributed.
25 # PR/47.
27 . ./defs || exit 1
29 cat >> configure.in << 'END'
30 AC_PROG_CC
31 AC_PROG_YACC
32 AC_OUTPUT
33 END
35 cat > Makefile.am << 'END'
36 bin_PROGRAMS = foo
37 foo_SOURCES = foo.y
38 AM_YFLAGS = -d
40 check-dist: distdir
41 test -f $(distdir)/foo.y
42 test -f $(distdir)/foo.c
43 test -f $(distdir)/foo.h
44 END
46 cat > foo.y << 'END'
48 WORD: "up";
50 END
52 set -e
54 $ACLOCAL
55 $AUTOMAKE -a
56 $AUTOCONF
57 ./configure
59 $MAKE foo.h
61 test -f foo.h
63 rm -f foo.h foo.c
64 $MAKE check-dist
66 # We should be able to recover if foo.h is deleted.
68 rm -f foo.h
69 $MAKE foo.h
70 test -f foo.h
72 # Make distclean must not erase foo.c nor foo.h (by GNU standards) ...
73 $MAKE foo.c
74 test -f foo.h
75 test -f foo.c
76 $MAKE distclean
77 test -f foo.h
78 test -f foo.c
79 # ... but maintainer-clean should.
80 ./configure
81 $MAKE maintainer-clean
82 test ! -f foo.h
83 test ! -f foo.c