1 | #! /bin/sh
|
---|
2 | # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
|
---|
3 | #
|
---|
4 | # This file is part of GNU Automake.
|
---|
5 | #
|
---|
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 2, or (at your option)
|
---|
9 | # any later version.
|
---|
10 | #
|
---|
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.
|
---|
15 | #
|
---|
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.
|
---|
20 |
|
---|
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.)
|
---|
24 | #
|
---|
25 | # Also check for --install.
|
---|
26 |
|
---|
27 | . ./defs || exit 1
|
---|
28 |
|
---|
29 | set -e
|
---|
30 |
|
---|
31 | cat >> configure.in << 'END'
|
---|
32 | MACRO2
|
---|
33 | MACRO1
|
---|
34 | MACRO3
|
---|
35 | END
|
---|
36 |
|
---|
37 | mkdir m4_1 m4_2 dirlist-test
|
---|
38 |
|
---|
39 | cat >m4_1/somedefs.m4 <<EOF
|
---|
40 | AC_DEFUN([MACRO1], [echo macro11 >> foo])
|
---|
41 | AC_DEFUN([MACRO2], [echo macro21 > foo])
|
---|
42 | EOF
|
---|
43 |
|
---|
44 | cat >m4_2/somedefs.m4 <<EOF
|
---|
45 | AC_DEFUN([MACRO1], [echo macro12 >> foo])
|
---|
46 | EOF
|
---|
47 |
|
---|
48 | cat >dirlist-test/macro.m4 <<EOF
|
---|
49 | AC_DEFUN([MACRO3], [echo macro3 >> foo])
|
---|
50 | EOF
|
---|
51 |
|
---|
52 | $ACLOCAL -I m4_1 -I m4_2
|
---|
53 | $AUTOCONF
|
---|
54 | ./configure
|
---|
55 | grep macro11 foo
|
---|
56 | grep macro21 foo
|
---|
57 | grep macro3 foo
|
---|
58 | grep MACRO3 aclocal.m4
|
---|
59 | test ! -f m4_1/macro.m4
|
---|
60 | test ! -f m4_2/macro.m4
|
---|
61 |
|
---|
62 | $ACLOCAL -I m4_2 -I m4_1
|
---|
63 | $AUTOCONF
|
---|
64 | ./configure
|
---|
65 | grep macro12 foo
|
---|
66 | grep macro21 foo
|
---|
67 | grep macro3 foo
|
---|
68 | grep MACRO3 aclocal.m4
|
---|
69 | test ! -f m4_1/macro.m4
|
---|
70 | test ! -f m4_2/macro.m4
|
---|
71 |
|
---|
72 | ACLOCAL_TESTSUITE_FLAGS='-I m4_1 -I m4_2'
|
---|
73 | $ACLOCAL --install
|
---|
74 | $AUTOCONF
|
---|
75 | ./configure
|
---|
76 | grep macro11 foo
|
---|
77 | grep macro21 foo
|
---|
78 | grep macro3 foo
|
---|
79 | grep MACRO3 aclocal.m4 && exit 1
|
---|
80 | test -f m4_1/macro.m4
|
---|
81 | test ! -f m4_2/macro.m4
|
---|
82 | cp aclocal.m4 copy.m4
|
---|
83 |
|
---|
84 | echo '#GREPME' >>dirlist-test/macro.m4
|
---|
85 | $ACLOCAL --install
|
---|
86 | $AUTOCONF
|
---|
87 | ./configure
|
---|
88 | grep macro11 foo
|
---|
89 | grep macro21 foo
|
---|
90 | grep macro3 foo
|
---|
91 | grep MACRO3 aclocal.m4 && exit 1
|
---|
92 | grep GREPME m4_1/macro.m4 && exit 1
|
---|
93 | test -f m4_1/macro.m4
|
---|
94 | test ! -f m4_2/macro.m4
|
---|
95 | diff aclocal.m4 copy.m4
|
---|