2 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
4 # This file is part of GNU Automake.
6 # GNU Automake is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3, or (at your option)
11 # GNU Automake is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with Automake; see the file COPYING. If not, write to
18 # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 # Boston, MA 02110-1301, USA.
21 # Make sure aclocal define macros in the same order as -I's.
22 # This is the same as aclocal9.test, with the macro calls reversed.
23 # (It did make a difference.)
25 # Also check for --install.
31 cat >> configure.
in << 'END'
37 mkdir m4_1 m4_2 dirlist-test
39 cat >m4_
1/somedefs.
m4 <<EOF
40 AC_DEFUN([MACRO1], [echo macro11 >> foo])
41 AC_DEFUN([MACRO2], [echo macro21 > foo])
44 cat >m4_
2/somedefs.
m4 <<EOF
45 AC_DEFUN([MACRO1], [echo macro12 >> foo])
48 cat >dirlist-test
/macro.
m4 <<EOF
49 AC_DEFUN([MACRO3], [echo macro3 >> foo])
52 $ACLOCAL -I m4_1
-I m4_2
58 grep MACRO3 aclocal.
m4
59 test ! -f m4_
1/macro.
m4
60 test ! -f m4_
2/macro.
m4
62 $ACLOCAL -I m4_2
-I m4_1
68 grep MACRO3 aclocal.
m4
69 test ! -f m4_
1/macro.
m4
70 test ! -f m4_
2/macro.
m4
72 ACLOCAL_TESTSUITE_FLAGS
='-I m4_1 -I m4_2'
79 grep MACRO3 aclocal.
m4 && exit 1
81 test ! -f m4_
2/macro.
m4
84 echo '#GREPME' >>dirlist-test
/macro.
m4
91 grep MACRO3 aclocal.
m4 && exit 1
92 grep GREPME m4_
1/macro.
m4 && exit 1
94 test ! -f m4_
2/macro.
m4
95 diff aclocal.
m4 copy.
m4