2 # Copyright (C) 2003-2012 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 # Make sure aclocal define macros in the same order as -I's.
18 # This is the same as aclocal9.test, with the macro calls reversed.
19 # (It did make a difference.)
21 # Also check for --install.
23 # TODO: write a sister test that doesn't use a `dirlist' file, but
24 # TODO: puts third-party macros directly into `acdir'.
26 am_create_testdir
=empty
29 cat > configure.
in << 'END'
36 ACLOCAL
="$ACLOCAL --system-acdir acdir"
38 mkdir m4_1 m4_2 acdir acdir2
39 echo .
/acdir2
> acdir
/dirlist
41 cat >m4_
1/somedefs.
m4 <<EOF
42 AC_DEFUN([MACRO1], [:macro11:])
43 AC_DEFUN([MACRO2], [:macro21:])
46 cat >m4_
2/somedefs.
m4 <<EOF
47 AC_DEFUN([MACRO1], [:macro12:])
50 cat >acdir
2/macro.
m4 <<EOF
51 AC_DEFUN([MACRO3], [:macro33:])
54 $ACLOCAL -I m4_1
-I m4_2
56 $FGREP ':macro11:' configure
57 $FGREP ':macro21:' configure
58 $FGREP ':macro33:' configure
59 grep MACRO3 aclocal.
m4
60 test ! -f m4_
1/macro.
m4
61 test ! -f m4_
2/macro.
m4
65 $ACLOCAL -I m4_2
-I m4_1
67 $FGREP ':macro12:' configure
68 $FGREP ':macro21:' configure
69 $FGREP ':macro33:' configure
70 grep MACRO3 aclocal.
m4
71 test ! -f m4_
1/macro.
m4
72 test ! -f m4_
2/macro.
m4
76 $ACLOCAL -I m4_1
-I m4_2
--install
78 $FGREP ':macro11:' configure
79 $FGREP ':macro21:' configure
80 $FGREP ':macro33:' configure
81 grep MACRO3 aclocal.
m4 && Exit
1
83 test ! -f m4_
2/macro.
m4
88 echo '#GREPME' >>acdir
2/macro.
m4
89 $ACLOCAL -I m4_1
-I m4_2
--install
91 $FGREP ':macro11:' configure
92 $FGREP ':macro21:' configure
93 $FGREP ':macro33:' configure
94 grep MACRO3 aclocal.
m4 && Exit
1
95 grep GREPME m4_
1/macro.
m4 && Exit
1
97 test ! -f m4_
2/macro.
m4
98 diff aclocal.
m4 copy.
m4