Fix grammaros.
[automake/plouj.git] / tests / acloca18.test
blob3a015a985ea7774e7d68ed6adcb7624ed6eba71a
1 #! /bin/sh
2 # Copyright (C) 2005, 2006 Free Software Foundation, Inc.
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 3, or (at your option)
7 # any later version.
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.
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/>.
17 # Test for --install with #serial numbers.
19 . ./defs || exit 1
21 set -e
23 cat >> configure.in << 'END'
24 AM_MACRO1
25 AM_MACRO2
26 END
28 mkdir 1 2 3 4
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
36 cat >2/m1.m4 <<EOF
37 #serial 1.8.1231.9
38 AC_DEFUN([AM_MACRO1], [echo macro12 >> foo])
39 EOF
41 cat >3/m2.m4 <<EOF
42 #serial 13
43 AC_DEFUN([AM_MACRO2], [echo macro23 >> foo])
44 EOF
46 cat >3/m1.m4 <<EOF
47 #serial 1.8.1230.1
48 AC_DEFUN([AM_MACRO1], [echo macro13 >> foo])
49 EOF
51 cat >4/mumble.m4 <<EOF
52 #serial 0
53 AC_DEFUN([AM_MACRO1], [echo macro14 >> foo])
54 EOF
57 ACLOCAL_TESTSUITE_FLAGS='-I 1 -I 2 -I 3 -I 4'
59 $ACLOCAL
60 $AUTOCONF
61 ./configure
62 grep macro11 foo
63 grep macro21 foo
65 rm -f foo
66 $ACLOCAL --install
67 $AUTOCONF
68 ./configure
69 grep macro12 foo
70 grep macro23 foo
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
80 rm -f foo
81 $ACLOCAL --install
82 $AUTOCONF
83 ./configure
84 grep macro14 foo
85 grep macro23 foo
87 ACLOCAL_TESTSUITE_FLAGS='-I 4 -I 1 -I 2'
88 rm -f foo
89 $ACLOCAL --install 2>stderr && exit 1
90 grep AM_MACRO2 stderr
92 ACLOCAL_TESTSUITE_FLAGS='-I 4 -I 1'
93 rm -f foo
94 $ACLOCAL --install
95 $AUTOCONF
96 ./configure
97 grep macro14 foo
98 grep macro21 foo
101 mkdir dirlist-test
102 cat >dirlist-test/m1.m4 <<EOF
103 #serial 456
104 AC_DEFUN([AM_MACRO1], [echo macro1d >> foo])
105 AC_DEFUN([AM_MACRO2], [echo macro2d >> foo])
107 rm -f foo
108 $ACLOCAL --diff=diff >output 2>stderr
109 cat stderr
110 cat output
111 grep '#serial 456' output
112 test ! -f 4/m1.m4
113 grep 'installing.*4/m1.m4' stderr