source: trunk/essentials/sys-devel/automake-1.10/tests/acloca10.test

Last change on this file was 3147, checked in by bird, 18 years ago

automake 1.10

File size: 2.2 KB
Line 
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
29set -e
30
31cat >> configure.in << 'END'
32MACRO2
33MACRO1
34MACRO3
35END
36
37mkdir m4_1 m4_2 dirlist-test
38
39cat >m4_1/somedefs.m4 <<EOF
40AC_DEFUN([MACRO1], [echo macro11 >> foo])
41AC_DEFUN([MACRO2], [echo macro21 > foo])
42EOF
43
44cat >m4_2/somedefs.m4 <<EOF
45AC_DEFUN([MACRO1], [echo macro12 >> foo])
46EOF
47
48cat >dirlist-test/macro.m4 <<EOF
49AC_DEFUN([MACRO3], [echo macro3 >> foo])
50EOF
51
52$ACLOCAL -I m4_1 -I m4_2
53$AUTOCONF
54./configure
55grep macro11 foo
56grep macro21 foo
57grep macro3 foo
58grep MACRO3 aclocal.m4
59test ! -f m4_1/macro.m4
60test ! -f m4_2/macro.m4
61
62$ACLOCAL -I m4_2 -I m4_1
63$AUTOCONF
64./configure
65grep macro12 foo
66grep macro21 foo
67grep macro3 foo
68grep MACRO3 aclocal.m4
69test ! -f m4_1/macro.m4
70test ! -f m4_2/macro.m4
71
72ACLOCAL_TESTSUITE_FLAGS='-I m4_1 -I m4_2'
73$ACLOCAL --install
74$AUTOCONF
75./configure
76grep macro11 foo
77grep macro21 foo
78grep macro3 foo
79grep MACRO3 aclocal.m4 && exit 1
80test -f m4_1/macro.m4
81test ! -f m4_2/macro.m4
82cp aclocal.m4 copy.m4
83
84echo '#GREPME' >>dirlist-test/macro.m4
85$ACLOCAL --install
86$AUTOCONF
87./configure
88grep macro11 foo
89grep macro21 foo
90grep macro3 foo
91grep MACRO3 aclocal.m4 && exit 1
92grep GREPME m4_1/macro.m4 && exit 1
93test -f m4_1/macro.m4
94test ! -f m4_2/macro.m4
95diff aclocal.m4 copy.m4
Note: See TracBrowser for help on using the repository browser.