2 # Copyright (C) 2005, 2006, 2008, 2010 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 2, or (at your option)
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.
23 cat >> configure.in << 'END'
32 AC_DEFUN([AM_MACRO1], [echo macro11 >> foo])
33 AC_DEFUN([AM_MACRO2], [echo macro21 >> foo])
38 AC_DEFUN([AM_MACRO1], [echo macro12 >> foo])
43 AC_DEFUN([AM_MACRO2], [echo macro23 >> foo])
48 AC_DEFUN([AM_MACRO1], [echo macro13 >> foo])
51 cat >4/mumble.m4 <<EOF
53 AC_DEFUN([AM_MACRO1], [echo macro14 >> foo])
56 cat >5/ill-formed.m4 <<EOF
60 AC_DEFUN([AM_MACRO1], [echo macro15 >> foo])
63 cat >6/after-def.m4 <<EOF
64 AC_DEFUN([AM_MACRO1], [echo macro16 >> foo])
68 ACLOCAL_TESTSUITE_FLAGS='-I 1 -I 2 -I 3 -I 4'
83 ACLOCAL_TESTSUITE_FLAGS='-I 4 -I 1 -I 2 -I 3'
85 $ACLOCAL --install --dry-run
98 ACLOCAL_TESTSUITE_FLAGS='-I 4 -I 1 -I 2'
100 $ACLOCAL --install 2>stderr && { cat stderr >&2; Exit 1; }
102 grep 'macro.*AM_MACRO2.*not found' stderr
104 ACLOCAL_TESTSUITE_FLAGS='-I 4 -I 1'
114 cat >dirlist-test/m1.m4 <<EOF
116 AC_DEFUN([AM_MACRO1], [echo macro1d >> foo])
117 AC_DEFUN([AM_MACRO2], [echo macro2d >> foo])
120 $ACLOCAL --diff=diff >stdout 2>stderr || {
127 grep '#serial 456' stdout
129 grep 'installing.*4/m1\.m4' stderr
131 $ACLOCAL -I 5 2>stderr && { cat stderr >&2; Exit 1; }
133 test `grep -c 'ill-formed serial' stderr` -eq 3
135 $ACLOCAL -I 6 2>stderr && { cat stderr >&2; Exit 1; }
137 grep 'serial.*before any macro definition' stderr