Merge branch 'msvc' into maint
[platform/upstream/automake.git] / tests / tagsub.test
1 #! /bin/sh
2 # Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003
3 #   Free Software Foundation, Inc.
4 #
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)
8 # any later version.
9 #
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.
14 #
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/>.
17
18 # Test to make sure tags and subdirs work correctly.  Bug report by
19 # François Pinard, and later by Akim Demaille.
20
21 required=etags
22 . ./defs || Exit 1
23
24 set -e
25
26 cat >> configure.in << 'END'
27 AC_CONFIG_FILES([sub/Makefile])
28 AC_OUTPUT
29 END
30
31 echo 'SUBDIRS = sub' > Makefile.am
32 mkdir sub
33 echo 'noinst_HEADERS = iguana.h' > sub/Makefile.am
34 : > sub/iguana.h
35
36 $ACLOCAL
37 $AUTOCONF
38 $AUTOMAKE
39
40 ./configure
41 $MAKE tags
42 test -f sub/TAGS
43 test -f TAGS
44 $FGREP sub/TAGS TAGS
45 $FGREP iguana.h sub/TAGS
46
47 $MAKE distclean
48 test ! -f sub/TAGS
49 test ! -f TAGS