~ubuntu-branches/ubuntu/precise/automake1.11/precise-proposed

« back to all changes in this revision

Viewing changes to tests/aclocal5.test

  • Committer: Bazaar Package Importer
  • Author(s): Eric Dorland
  • Date: 2009-08-12 02:36:44 UTC
  • Revision ID: james.westby@ubuntu.com-20090812023644-f40we9eqbmx1dpbj
Tags: upstream-1.11
ImportĀ upstreamĀ versionĀ 1.11

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
 
3
#
 
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)
 
7
# any later version.
 
8
#
 
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.
 
13
#
 
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/>.
 
16
 
 
17
# Test to make sure that aclocal.m4's dependencies are honored
 
18
# in sub-directories.
 
19
 
 
20
# This test assumes that the `make' utility is able to start
 
21
# over and reload Makefiles which have been remade (a non-POSIX feature).
 
22
required='GNUmake'
 
23
. ./defs || Exit 1
 
24
 
 
25
set -e
 
26
 
 
27
cat >> configure.in << 'END'
 
28
AM_TEST([GREPME])
 
29
AC_CONFIG_FILES([sub/Makefile])
 
30
AC_OUTPUT
 
31
END
 
32
 
 
33
cat > Makefile.am << 'END'
 
34
SUBDIRS = sub
 
35
ACLOCAL_AMFLAGS = -I m4
 
36
END
 
37
 
 
38
mkdir sub
 
39
: > sub/Makefile.am
 
40
 
 
41
mkdir m4
 
42
echo 'AC_DEFUN([AM_TEST], [echo $@])' > m4/moredefs.m4
 
43
 
 
44
$ACLOCAL -I m4
 
45
$AUTOCONF
 
46
$AUTOMAKE --copy --add-missing
 
47
./configure
 
48
$MAKE
 
49
 
 
50
# Update an aclocal.m4 dependency, then make sure all Makefiles are
 
51
# updated, even from a sub-directory.  Check that AU_ALIAS is
 
52
# recognized. Change the definition of AM_TEST to check that its new
 
53
# definition is used.
 
54
echo 'AU_ALIAS([AM_TEST], [AC_SUBST])' > m4/moredefs.m4
 
55
cd sub
 
56
$MAKE
 
57
cd ..
 
58
grep GREPME Makefile
 
59
grep GREPME sub/Makefile
 
60
 
 
61
# Make sure configure dependencies are distributed.
 
62
$MAKE distdir
 
63
test -f aclocal5-1.0/m4/moredefs.m4
 
64
 
 
65
# Change the definition of AM_TEST to check that its new definition is
 
66
# used.  Check that AC_DEFUN_ONCE is caught.
 
67
echo 'AC_DEFUN_ONCE([AM_TEST], [AC_SUBST(__$1__)])' > m4/moredefs.m4
 
68
$MAKE
 
69
grep 'm4/moredefs\.m4' aclocal.m4
 
70
grep '__GREPME__' configure