Support more C++ file extensions for MSVC in the compile script.
[platform/upstream/automake.git] / tests / depcomp.test
1 #! /bin/sh
2 # Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
3 #
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)
7 # any later version.
8 #
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.
13 #
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/>.
16
17 # Test to make sure depcomp is installed and found properly
18 # when required for multiple directories
19
20 . ./defs || Exit 1
21
22 set -e
23
24 cat > configure.in << END
25 AC_INIT([$me], [1.0])
26 AM_INIT_AUTOMAKE
27 AC_CONFIG_FILES([subdir/Makefile subdir2/Makefile])
28 AC_PROG_CC
29 AC_OUTPUT
30 END
31
32 rm -f depcomp
33 mkdir subdir
34 mkdir subdir2
35
36 cat > subdir/Makefile.am << 'END'
37 noinst_PROGRAMS = foo
38 foo_SOURCES = foo.c
39 END
40
41 cp subdir/Makefile.am subdir2/Makefile.am
42
43 : > subdir/foo.c
44 : > subdir2/foo.c
45
46 $ACLOCAL
47 $AUTOMAKE --add-missing
48
49 # There used to be a bug where this was created in the first subdir with C
50 # sources in it instead of in $top_srcdir or $ac_auxdir
51 test -f depcomp