Support more C++ file extensions for MSVC in the compile script.
[platform/upstream/automake.git] / tests / acloca18.test
1 #! /bin/sh
2 # Copyright (C) 2005, 2006, 2008, 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 for --install with #serial numbers.
18
19 . ./defs || Exit 1
20
21 set -e
22
23 cat >> configure.in << 'END'
24 AM_MACRO1
25 AM_MACRO2
26 END
27
28 mkdir 1 2 3 4
29
30 cat >1/m1.m4 <<EOF
31 #serial 1.8.1230.9
32 AC_DEFUN([AM_MACRO1], [echo macro11 >> foo])
33 AC_DEFUN([AM_MACRO2], [echo macro21 >> foo])
34 EOF
35
36 cat >2/m1.m4 <<EOF
37 #serial 1.8.1231.9
38 AC_DEFUN([AM_MACRO1], [echo macro12 >> foo])
39 EOF
40
41 cat >3/m2.m4 <<EOF
42 #serial 13
43 AC_DEFUN([AM_MACRO2], [echo macro23 >> foo])
44 EOF
45
46 cat >3/m1.m4 <<EOF
47 #serial 1.8.1230.1
48 AC_DEFUN([AM_MACRO1], [echo macro13 >> foo])
49 EOF
50
51 cat >4/mumble.m4 <<EOF
52 #serial 0
53 AC_DEFUN([AM_MACRO1], [echo macro14 >> foo])
54 EOF
55
56
57 ACLOCAL_TESTSUITE_FLAGS='-I 1 -I 2 -I 3 -I 4'
58
59 $ACLOCAL
60 $AUTOCONF
61 ./configure
62 grep macro11 foo
63 grep macro21 foo
64
65 rm -f foo
66 $ACLOCAL --install
67 $AUTOCONF
68 ./configure
69 grep macro12 foo
70 grep macro23 foo
71
72 ACLOCAL_TESTSUITE_FLAGS='-I 4 -I 1 -I 2 -I 3'
73 rm -f foo
74 $ACLOCAL --install --dry-run
75 $AUTOCONF
76 ./configure
77 grep macro12 foo
78 grep macro23 foo
79
80 rm -f foo
81 $ACLOCAL --install
82 $AUTOCONF
83 ./configure
84 grep macro14 foo
85 grep macro23 foo
86
87 ACLOCAL_TESTSUITE_FLAGS='-I 4 -I 1 -I 2'
88 rm -f foo
89 $ACLOCAL --install 2>stderr && { cat stderr >&2; Exit 1; }
90 cat stderr >&2
91 grep AM_MACRO2 stderr
92
93 ACLOCAL_TESTSUITE_FLAGS='-I 4 -I 1'
94 rm -f foo
95 $ACLOCAL --install
96 $AUTOCONF
97 ./configure
98 grep macro14 foo
99 grep macro21 foo
100
101
102 mkdir dirlist-test
103 cat >dirlist-test/m1.m4 <<EOF
104 #serial 456
105 AC_DEFUN([AM_MACRO1], [echo macro1d >> foo])
106 AC_DEFUN([AM_MACRO2], [echo macro2d >> foo])
107 EOF
108 rm -f foo
109 $ACLOCAL --diff=diff >stdout 2>stderr || {
110   cat stderr >&2
111   cat stdout
112   Exit 1
113 }
114 cat stderr >&2
115 cat stdout
116 grep '#serial 456' stdout
117 test ! -f 4/m1.m4
118 grep 'installing.*4/m1.m4' stderr