automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] aclocal: handle ACLOCAL_PATH environment variable


From: Stefano Lattarini
Subject: Re: [PATCH] aclocal: handle ACLOCAL_PATH environment variable
Date: Sat, 24 Sep 2011 16:06:07 +0200
User-agent: KMail/1.13.7 (Linux/2.6.30-2-686; KDE/4.6.5; i686; ; )

[dropping bug-automake]

On Tuesday 20 September 2011, Stefano Lattarini wrote:
> On Tuesday 20 September 2011, Paolo Bonzini wrote:
> > On 09/20/2011 02:09 PM, Stefano Lattarini wrote:
> > >> Yeah, I think the problem is that in the normal search path (from
> > >> `aclocal -I /foo -I /bar'):
> > >>
> > >>     1. `/foo'
> > >>
> > >>     2. `/bar'
> > >>
> > >>     3. ACDIR-APIVERSION
> > >>
> > >>     4. ACDIR
> > >>
> > >> The directories from dirlist and ACLOCAL_PATH should go after (3),
> > >> rather than after (4).
> > >
> > > But this is what they currently do (see test 
> > > `aclocal-path-precedence.test').
> > 
> > Interesting, that's not what is in (automake.info)Macro Search Path.
> >
> OK, you're right; stuff from `dirlist' goes after that in ACDIR, but stuff
> from ACLOCAL_PATH goes before it (as it should IMHO).
> 
> We definitely want to clean this all up in 1.12 -- code, documentation and
> testsuite as well.
>  
The attached patch (for master) is the first step of the testsuite
reorganization.  I'd like to apply it to a new public branch
`aclocal-search-path' (to be merged into master eventually).  The
patch will soonish be followed by another one extending and
reorganizing tests on the `--install' option and serial number in
`.m4' files.  Then will come the code and documentation changes.

I will push in a couple of days if there is no objection.

Regards,
  Stefano
From fe3dcc8a681e08ee4fb117113d14e1307a78e35c Mon Sep 17 00:00:00 2001
Message-Id: <address@hidden>
From: Stefano Lattarini <address@hidden>
Date: Thu, 22 Sep 2011 16:33:26 +0200
Subject: [PATCH] tests: reorganize and extend tests on aclocal search path 
extension

* tests/aclocal-search-path.test: New test, supersedes and
subsumes ...
* tests/aclocal9.test, tests/acloca11.test, tests/acloca12.test,
tests/aclocal-acdir.test, tests/aclocal-path-nonexistent.test,
tests/aclocal-path-precedence.test, tests/aclocal-path.test,
tests/dirlist.test, tests/dirlist2.test: ... these ones, which
have accordingly been removed.
* tests/Makefile.am (TESTS): Update.
---
 ChangeLog                           |   12 +
 tests/Makefile.am                   |   10 +-
 tests/Makefile.in                   |   10 +-
 tests/acloca11.test                 |   42 --
 tests/acloca12.test                 |   43 --
 tests/aclocal-acdir.test            |   97 -----
 tests/aclocal-path-nonexistent.test |   36 --
 tests/aclocal-path-precedence.test  |   93 -----
 tests/aclocal-path.test             |   58 ---
 tests/aclocal-search-path.test      |  774 +++++++++++++++++++++++++++++++++++
 tests/aclocal9.test                 |   49 ---
 tests/dirlist.test                  |   57 ---
 tests/dirlist2.test                 |   56 ---
 13 files changed, 788 insertions(+), 549 deletions(-)
 delete mode 100755 tests/acloca11.test
 delete mode 100755 tests/acloca12.test
 delete mode 100755 tests/aclocal-acdir.test
 delete mode 100755 tests/aclocal-path-nonexistent.test
 delete mode 100755 tests/aclocal-path-precedence.test
 delete mode 100755 tests/aclocal-path.test
 create mode 100644 tests/aclocal-search-path.test
 delete mode 100755 tests/aclocal9.test
 delete mode 100755 tests/dirlist.test
 delete mode 100755 tests/dirlist2.test

diff --git a/ChangeLog b/ChangeLog
index a670886..ac44a30 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2011-09-24  Stefano Lattarini  <address@hidden>
+
+       tests: reorganize and extend tests on aclocal search path extension
+       * tests/aclocal-search-path.test: New test, supersedes and
+       subsumes ...
+       * tests/aclocal9.test, tests/acloca11.test, tests/acloca12.test,
+       tests/aclocal-acdir.test, tests/aclocal-path-nonexistent.test,
+       tests/aclocal-path-precedence.test, tests/aclocal-path.test,
+       tests/dirlist.test, tests/dirlist2.test: ... these ones, which
+       have accordingly been removed.
+       * tests/Makefile.am (TESTS): Update.
+
 2011-09-22  Stefano Lattarini  <address@hidden>
 
        tests: fix tests on aclocal search path precedences
diff --git a/tests/Makefile.am b/tests/Makefile.am
index dd2acde..642f4c6 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -117,10 +117,7 @@ aclocal5.test \
 aclocal6.test \
 aclocal7.test \
 aclocal8.test \
-aclocal9.test \
 acloca10.test \
-acloca11.test \
-acloca12.test \
 acloca13.test \
 acloca14.test \
 acloca15.test \
@@ -132,13 +129,10 @@ acloca20.test \
 acloca21.test \
 acloca22.test \
 acloca23.test \
-aclocal-acdir.test \
 aclocal-print-acdir.test \
-aclocal-path.test \
 aclocal-path-install.test \
 aclocal-path-install-serial.test \
-aclocal-path-nonexistent.test \
-aclocal-path-precedence.test \
+aclocal-search-path.test \
 acoutnoq.test \
 acoutpt.test \
 acoutpt2.test \
@@ -396,8 +390,6 @@ depend5.test \
 depend6.test \
 deprecated-acinit.test \
 destdir.test \
-dirlist.test \
-dirlist2.test \
 discover.test \
 dist-included-parent-dir.test \
 distcleancheck.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index d151705..7cff8b5 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -388,10 +388,7 @@ aclocal5.test \
 aclocal6.test \
 aclocal7.test \
 aclocal8.test \
-aclocal9.test \
 acloca10.test \
-acloca11.test \
-acloca12.test \
 acloca13.test \
 acloca14.test \
 acloca15.test \
@@ -403,13 +400,10 @@ acloca20.test \
 acloca21.test \
 acloca22.test \
 acloca23.test \
-aclocal-acdir.test \
 aclocal-print-acdir.test \
-aclocal-path.test \
 aclocal-path-install.test \
 aclocal-path-install-serial.test \
-aclocal-path-nonexistent.test \
-aclocal-path-precedence.test \
+aclocal-search-path.test \
 acoutnoq.test \
 acoutpt.test \
 acoutpt2.test \
@@ -667,8 +661,6 @@ depend5.test \
 depend6.test \
 deprecated-acinit.test \
 destdir.test \
-dirlist.test \
-dirlist2.test \
 discover.test \
 dist-included-parent-dir.test \
 distcleancheck.test \
diff --git a/tests/acloca11.test b/tests/acloca11.test
deleted file mode 100755
index 25e7a50..0000000
--- a/tests/acloca11.test
+++ /dev/null
@@ -1,42 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2003, 2011 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Make sure that when two files define the same macro in the same
-# directory, the macro from the lexically greatest file is used.
-
-. ./defs || Exit 1
-
-cat >> configure.in << 'END'
-MACRO2
-MACRO1
-END
-
-mkdir m4
-
-cat >m4/version1.m4 <<EOF
-AC_DEFUN([MACRO1], [echo macro11 >> foo])
-AC_DEFUN([MACRO2], [echo macro21 > foo])
-EOF
-
-cat >m4/version2.m4 <<EOF
-AC_DEFUN([MACRO1], [echo macro12 >> foo])
-EOF
-
-$ACLOCAL -I m4
-$AUTOCONF
-./configure
-grep macro12 foo
-grep macro21 foo
diff --git a/tests/acloca12.test b/tests/acloca12.test
deleted file mode 100755
index 2fb57e9..0000000
--- a/tests/acloca12.test
+++ /dev/null
@@ -1,43 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2003, 2011 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Make sure that when two files define the same macro in the same
-# directory, the macro from the lexically greatest file is used.
-# Same as acloca11.test, but without calling MACRO2.
-
-. ./defs || Exit 1
-
-cat >> configure.in << 'END'
-MACRO1
-END
-
-mkdir m4
-
-cat >m4/version1.m4 <<EOF
-AC_DEFUN([MACRO1], [echo macro11 >> foo])
-AC_DEFUN([MACRO2], [echo macro21 > foo])
-EOF
-
-cat >m4/version2.m4 <<EOF
-AC_DEFUN([MACRO1], [echo macro12 >> foo])
-EOF
-
-$ACLOCAL --verbose -I m4
-$AUTOCONF
-./configure
-grep macro11 foo && Exit 1
-grep macro21 foo && Exit 1
-grep macro12 foo
diff --git a/tests/aclocal-acdir.test b/tests/aclocal-acdir.test
deleted file mode 100755
index e02db30..0000000
--- a/tests/aclocal-acdir.test
+++ /dev/null
@@ -1,97 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2011 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Test aclocal's `--acdir', `--automake-acdir' and `--system-acdir'
-# options.  Also check that stuff in the automake acdir takes precedence
-# over stuff in the system acdir.
-
-. ./defs || Exit 1
-
-set -e
-
-mkdir am sys
-
-cat >> configure.in <<'END'
-MY_MACRO
-END
-
-cat > am/foo.m4 <<'END'
-AC_DEFUN([AM_INIT_AUTOMAKE], [fake--init--automake])
-END
-
-cat > sys/foo.m4 <<'END'
-AC_DEFUN([MY_MACRO], [my--macro])
-END
-
-$ACLOCAL --automake-acdir am
-$AUTOCONF --force
-$FGREP 'fake--init--automake' configure
-$FGREP 'MY_MACRO' configure
-
-rm -rf autom4te*.cache
-
-$ACLOCAL --system-acdir sys
-$AUTOCONF --force
-$FGREP 'am__api_version' configure
-$FGREP 'my--macro' configure
-
-rm -rf autom4te*.cache
-
-$ACLOCAL --automake-acdir am --system-acdir sys
-$AUTOCONF --force
-$FGREP 'fake--init--automake' configure
-$FGREP 'my--macro' configure
-
-rm -rf autom4te*.cache
-
-$ACLOCAL --system-acdir sys --automake-acdir am
-$AUTOCONF --force
-$FGREP 'fake--init--automake' configure
-$FGREP 'my--macro' configure
-
-rm -rf autom4te*.cache
-
-# Stuff in automake acdir takes precedence over stuff in system acdir.
-cat > am/bar.m4 <<'END'
-AC_DEFUN([MY_MACRO], [am--macro])
-END
-$ACLOCAL --automake-acdir am --system-acdir sys
-$AUTOCONF --force
-$FGREP 'fake--init--automake' configure
-$FGREP 'am--macro' configure
-$FGREP 'my--macro' configure && Exit 1 # Just to be sure.
-
-rm -rf autom4te*.cache
-
-# Obsolescent `--acdir' option.
-$ACLOCAL -Wobsolete --acdir am 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep '.*--acdir.*deprecated' stderr
-
-rm -rf autom4te*.cache
-
-$ACLOCAL -Wno-obsolete --acdir am
-$AUTOCONF --force
-$FGREP 'fake--init--automake' configure
-$FGREP 'am--macro' configure
-
-rm -rf autom4te*.cache
-
-$ACLOCAL -Wno-obsolete --acdir sys 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep 'macro .*AM_INIT_AUTOMAKE.* not found' stderr
-
-:
diff --git a/tests/aclocal-path-nonexistent.test 
b/tests/aclocal-path-nonexistent.test
deleted file mode 100755
index e1157a1..0000000
--- a/tests/aclocal-path-nonexistent.test
+++ /dev/null
@@ -1,36 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2011 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Non-existent directories in ACLOCAL_PATH are ok.
-
-am_create_testdir=empty
-. ./defs || Exit 1
-
-set -e
-
-cat > configure.in << 'END'
-AC_INIT
-AM_FOO
-END
-
-mkdir mdir
-echo 'AC_DEFUN([AM_FOO], [am--foo])' > mdir/foo.m4
-
-ACLOCAL_PATH=./nonesuch:./mdir:`pwd`/nonesuch2:nonesuch3 $ACLOCAL
-$AUTOCONF
-$FGREP 'am--foo' configure
-
-:
diff --git a/tests/aclocal-path-precedence.test 
b/tests/aclocal-path-precedence.test
deleted file mode 100755
index b170dd5..0000000
--- a/tests/aclocal-path-precedence.test
+++ /dev/null
@@ -1,93 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2011 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Check precedence rules for ACLOCAL_PATH.
-
-am_create_testdir=empty
-. ./defs || Exit 1
-
-set -e
-
-cat >> configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE([parallel-tests])
-FOO_MACRO
-BAR_MACRO
-AC_PROG_LIBTOOL
-AM_GNU_GETTEXT
-END
-
-mkdir mdir1 mdir2 mdir3 sysdir extradir
-
-cat > mdir1/foo1.m4 << 'END'
-AC_DEFUN([FOO_MACRO], [::pass-foo::])
-END
-
-cat > mdir2/foo2.m4 << 'END'
-AC_DEFUN([FOO_MACRO], [::fail-foo::])
-END
-
-cat > mdir1/baz.m4 << 'END'
-AC_DEFUN([BAR_MACRO], [::fail-bar::])
-END
-
-cat > mdir3/bar.m4 << 'END'
-AC_DEFUN([BAR_MACRO], [::pass-bar::])
-END
-
-cat > mdir2/quux.m4 << 'END'
-AC_DEFUN([AM_INIT_AUTOMAKE], [::fail-init::])
-AC_DEFUN([AC_PROG_LIBTOOL],  [::pass-libtool::])
-AC_DEFUN([AM_GNU_GETTEXT],   [::pass-gettext::])
-END
-
-cat > sysdir/libtool.m4 << 'END'
-AC_DEFUN([AC_PROG_LIBTOOL], [::fail-libtool::])
-END
-
-cat > extradir/gettext.m4 << 'END'
-AC_DEFUN([AM_GNU_GETTEXT], [::fail-gettext::])
-END
-
-echo ./extradir > sysdir/dirlist
-
-ACLOCAL_PATH=mdir1:mdir2 $ACLOCAL -I mdir3 --system-acdir sysdir
-$AUTOCONF
-
-$FGREP '::' configure # For debugging.
-
-# Directories coming first in ACLOCAL_PATH should take precedence
-# over those coming later.
-$FGREP '::pass-foo::' configure
-
-# Directories from `-I' options should take precedence over directories
-# in ACLOCAL_PATH.
-$FGREP '::pass-bar::' configure
-
-# Directories in ACLOCAL_PATH should take precedence over system acdir
-# (typically `${prefix}/share/aclocal'), and any directory added through
-# the `dirlist' special file.
-$FGREP '::pass-gettext::' configure
-$FGREP '::pass-libtool::' configure
-
-# Directories in ACLOCAL_PATH shouldn't take precedence over the internal
-# automake acdir (typically `${prefix}/share/aclocal-${APIVERSION}').
-$FGREP 'am__api_version' configure
-
-# A final sanity check.
-$FGREP '::fail' configure && Exit 1
-
-:
diff --git a/tests/aclocal-path.test b/tests/aclocal-path.test
deleted file mode 100755
index 16fd3f9..0000000
--- a/tests/aclocal-path.test
+++ /dev/null
@@ -1,58 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2011 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Check basic ACLOCAL_PATH support.
-
-am_create_testdir=empty
-. ./defs || Exit 1
-
-set -e
-
-cat > configure.in << 'END'
-AC_INIT
-AM_FOO_MACRO
-AM_BAR_MACRO
-AM_BAZ_MACRO
-END
-
-mkdir mdir1 mdir2 mdir3
-
-cat > mdir1/foo.m4 << 'END'
-AC_DEFUN([AM_FOO_MACRO], [am--foo])
-END
-
-cat > mdir2/bar.m4 << 'END'
-AC_DEFUN([AM_BAR_MACRO], [am--bar])
-END
-
-cat > mdir3/baz.m4 << 'END'
-AC_DEFUN([AM_BAZ_MACRO], [am--baz])
-END
-
-ACLOCAL_PATH=mdir1:./mdir2:`pwd`/mdir3 $ACLOCAL
-$AUTOCONF
-
-# there should be no m4_include in aclocal.m4, even though ACLOCAL_PATH
-# contains `mdir1' and `./mdir2' as relative directories.  Only -I
-# directories should be subject to file inclusion.
-$FGREP m4_include aclocal.m4 && Exit 1
-
-$EGREP 'AM_(FOO|BAR|BAZ)_MACRO' configure && Exit 1
-$FGREP 'am--foo' configure
-$FGREP 'am--bar' configure
-$FGREP 'am--baz' configure
-
-:
diff --git a/tests/aclocal-search-path.test b/tests/aclocal-search-path.test
new file mode 100644
index 0000000..3dbb048
--- /dev/null
+++ b/tests/aclocal-search-path.test
@@ -0,0 +1,774 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check the various ways to extend/influence aclocal search path, and
+# the interactions and precedences among them.
+# This test does not cover the `--install' option.
+# FIXME: add proper reference to the test(s) covering it.
+
+am_create_testdir=empty
+. ./defs || Exit 1
+
+# TODO: this test is written in a peculiar way, to make it easier to
+# convert it to the use of TAP once it's merged into testsuite-work.
+
+result_ () { case $1 in ok) ;; not\ ok) Exit 1;; *) Exit 99;; esac; }
+command_ok_ () { shift; "$@" || Exit 1; }
+not () { if "$@"; then return 1; else return 0; fi; }
+
+
+## ----------------------------------------------- ##
+##  Shared initialization and common subroutines.  ##
+## ----------------------------------------------- ##
+
+unset ACLOCAL_PATH
+
+ocwd=`pwd` || fatal_ "cannot get current working directory"
+
+start_testgroup ()
+{
+  cd "$ocwd" \
+    || fatal_ "failed to chdir back to $ocwd"
+  mkdir "$1.d" && cd "$1.d" \
+    || framework_failure_ "setting up directory $1.d"
+}
+
+end_testgroup ()
+{
+  cd "$ocwd" || fatal_ "failed to chdir back to $ocwd"
+}
+
+# Usage: check_expanded --description TEXT [--output LIST-OF-STRINGS]
+#                       [--not-output LIST-OF-STRINGS] [--] ACLOCAL-CMD
+check_expanded ()
+{
+  # `ce__' prefix to avoid conflicts with global or other subroutine's
+  # variables; this has already happened in practice.
+  ce__description=
+  ce__output=
+  ce__no_output=
+  ce__r=ok
+  while test $# -gt 0; do
+    case $1 in
+      --output) ce__output="$ce__output $2"; shift;;
+      --no-output) ce__no_output="$ce__no_output $2"; shift;;
+      --desc*) ce__description=$2; shift;;
+      --) shift; break;;
+      -*) fatal_ "check_expanded: invalid option \`$1'";;
+       *) break;;
+    esac
+    shift
+  done
+  if "$@" && test -f aclocal.m4 && $AUTOCONF; then
+    for str in $ce__output; do
+      $FGREP "$str" configure || ce__r='not ok'
+    done
+    for str in $ce__no_output; do
+      $FGREP "$str" configure && ce__r='not ok'
+    done
+  else
+    ce__r='not ok'
+  fi
+  result_ "$ce__r" "$ce__description"
+}
+
+
+## -------------------------------------------------------------------- ##
+##  Setup H0: for options used to override system and automake acdirs.  ##
+## -------------------------------------------------------------------- ##
+
+mkdir H0 H0/am H0/sys
+
+cat > H0/configure.in <<'END'
+AC_INIT([foo], [1.0])
+AM_INIT_AUTOMAKE
+MY_MACRO
+END
+
+cat > H0/am/foo.m4 <<'END'
+AC_DEFUN([AM_INIT_AUTOMAKE], [fake--init--automake])
+END
+
+cat > H0/sys/foo.m4 <<'END'
+AC_DEFUN([MY_MACRO], [my--macro])
+END
+
+## -------------------------- ##
+##  Option --automake-acdir.  ##
+## -------------------------- ##
+
+start_testgroup automake-acdir
+cp ../H0/configure.in .
+command_ok_ "option --automake-acdir" eval '
+  $ACLOCAL --automake-acdir "$ocwd"/H0/am \
+    && $AUTOCONF \
+    && $FGREP "fake--init--automake" configure \
+    && $FGREP "MY_MACRO" configure'
+end_testgroup
+
+## ------------------------ ##
+##  Option --system-acdir.  ##
+## ------------------------ ##
+
+start_testgroup system-acdir
+cp ../H0/configure.in .
+command_ok_ "option --system-acdir" eval '
+  $ACLOCAL --system-acdir "$ocwd"/H0/sys \
+    && $AUTOCONF \
+    && $FGREP "am__api_version" configure \
+    && $FGREP "my--macro" configure'
+end_testgroup
+
+## ------------------------------------------------------------------- ##
+##  Options --automake-acdir and --system-acdir can be used together.  ##
+## ------------------------------------------------------------------- ##
+
+start_testgroup both-system-automake-acdir
+cp -fR ../H0/* .
+command_ok_ "options --system-acdir and --automake-acdir together" eval '
+  $ACLOCAL --automake-acdir am --system-acdir sys \
+    && $AUTOCONF \
+    && $FGREP "fake--init--automake" configure \
+    && $FGREP "my--macro" configure'
+end_testgroup
+
+## ------------------------------------------------------------------ ##
+##  Option --acdir option is diagnosed as obsolete, but still works.  ##
+## ------------------------------------------------------------------ ##
+
+start_testgroup obsolete-acdir
+cp ../H0/configure.in .
+st=0; $ACLOCAL -Wobsolete --acdir ../H0/am 2>stderr || st=$?
+cat stderr >&2
+command_ok_ "option --acdir is diagnosed as obsolete" \
+            eval 'test $st -gt 0 && grep ".*--acdir.*deprecated" stderr'
+end_testgroup
+
+start_testgroup option-acdir-1
+cp -fR ../H0/* .
+echo 'AC_DEFUN([MY_MACRO], [am--macro])' > am/bar.m4
+command_ok_ "option --acdir works (1)" eval '
+  $ACLOCAL -Wno-obsolete --acdir am \
+    && $AUTOCONF \
+    && $FGREP "fake--init--automake" configure \
+    && $FGREP "am--macro" configure'
+end_testgroup
+
+start_testgroup option-acdir-2
+cp -fR ../H0/* .
+command_ok_ "option --acdir works (2)" eval '
+  not $ACLOCAL -Wno-obsolete --acdir sys 2>stderr \
+    && cat stderr >&2 \
+    && grep "macro .*AM_INIT_AUTOMAKE.* not found" stderr'
+end_testgroup
+
+
+## --------------------------------------------------------------------- ##
+##  Setup H1: for tests on basic ACLOCAL_PATH, dirlist, and `-I' usage.  ##
+## --------------------------------------------------------------------- ##
+
+mkdir H1 H1/foodir H1/bardir H1/bazdir
+
+cat > H1/foodir/a.m4 <<END
+AC_DEFUN([AM_FOO], [am--foo])
+END
+
+cat > H1/bardir/b.m4 <<END
+AC_DEFUN([AM_BAR], [am--bar])
+END
+
+cat > H1/bazdir/c.m4 <<END
+AC_DEFUN([AM_BAZ], [am--baz])
+END
+
+cat > H1/configure.in <<END
+AC_INIT
+AM_FOO
+AM_BAR
+AM_BAZ
+END
+
+check_no_m4_include ()
+{
+  # There should be no m4_include in aclocal.m4, even though dirlist and/or
+  # ACLOCAL_PATH contains relative directories.  Only -I directories are
+  # subject to file inclusion.
+  command_ok_ "no m4_include in aclocal.m4"${1+" ($*)"} \
+              not $FGREP m4_include aclocal.m4
+}
+
+## ------------------- ##
+##  Basic -I support.  ##
+## ------------------- ##
+
+start_testgroup localdir-basic
+
+cp -fR ../H1/* .
+
+check_expanded \
+  --description 'basic -I usage' \
+  --output 'am--foo am--bar am--baz' \
+  $ACLOCAL -I foodir -I ./bardir -I "`pwd`/bazdir"
+
+$EGREP -i '(foo|bar|baz)' aclocal.m4 || : # For debugging
+
+r=ok
+$FGREP 'm4_include([foodir/a.m4])' aclocal.m4 || r='not ok'
+$EGREP 'm4_include\(\[(./)?bardir/b\.m4\]\)' aclocal.m4 || r='not ok'
+result_ "$r" "files in local -I dirs are m4_included"
+
+r=ok
+grep 'm4_include.*bazdir/.*\.m4' aclocal.m4 && r='not ok'
+$FGREP 'am--baz' aclocal.m4 || r='not ok'
+result_ "$r" "files in absolute -I dirs are copied"
+
+end_testgroup
+
+## ------------------------ ##
+##  Basic dirlist support.  ##
+## ------------------------ ##
+
+start_testgroup dirlist-basic
+
+mkdir acdir
+cat > acdir/dirlist <<END
+foodir
+./bardir
+`pwd`/bazdir
+END
+
+cp -fR ../H1/* .
+
+check_expanded \
+  --description 'basic dirlist usage' \
+  --output 'am--foo am--bar am--baz' \
+  $ACLOCAL --system-acdir ./acdir
+
+check_no_m4_include "dirlist"
+
+end_testgroup
+
+## ----------------------------- ##
+##  Basic ACLOCAL_PATH support.  ##
+## ----------------------------- ##
+
+start_testgroup aclocal-path-basic
+
+cp -fR ../H1/* .
+
+check_expanded \
+  --description 'basic ACLOCAL_PATH usage' \
+  --output 'am--foo am--bar am--baz' \
+  env ACLOCAL_PATH="foodir:./bardir:`pwd`/bazdir" $ACLOCAL
+
+check_no_m4_include "ACLOCAL_PATH"
+
+end_testgroup
+
+## ----------------------- ##
+##  Wildcards in dirlist.  ##
+## ----------------------- ##
+
+start_testgroup dirlist-wildcard-basic
+
+mkdir acdir
+cat > acdir/dirlist <<END
+`pwd`/food*
+*a[rz]dir
+END
+
+cp -fR ../H1/* .
+
+check_expanded \
+  --description 'wildcards in dirlist' \
+  --output 'am--foo am--bar am--baz' \
+  $ACLOCAL --system-acdir ./acdir
+
+check_no_m4_include "dirlist with wildcards"
+
+end_testgroup
+
+
+## -------------------------------------------------------------------- ##
+##  Setup H2: for tests non-existent dirs in ACLOCAL_PATH and dirlist.  ##
+## -------------------------------------------------------------------- ##
+
+mkdir H2 H2/foodir
+
+cat > H2/foodir/blah.m4 <<END
+AC_DEFUN([AM_FOO], [am--foo])
+END
+
+cat > H2/configure.in <<END
+AC_INIT
+AM_FOO
+END
+
+## --------------------------------------------------------- ##
+##  Non-existent directories with `-I' option cause errors.  ##
+## --------------------------------------------------------- ##
+
+check_nosuchdir_err ()
+{
+  dirpath=$1 dirname=${2-$1}
+  echo AC_INIT > configure.in
+  st=0; $ACLOCAL -Wnone -Wno-error -I "$dirpath" 2>stderr || st=$?
+  cat stderr >&2
+  r=ok
+  test $st -eq 1 \
+    && test ! -f aclocal.m4 \
+    && grep "open.*directory.*$dirpath" stderr \
+    || r='not ok'
+  result_ "$r" "aclocal complains if -I $dirname is non-existent"
+}
+
+start_testgroup I-nonexistent
+check_nosuchdir_err nonesuch
+end_testgroup
+
+start_testgroup I-nonexistent-abspath
+check_nosuchdir_err "`pwd`/nonesuch"
+end_testgroup
+
+## --------------------------------------------- ##
+##  Non-existent directories in dirlist are OK.  ##
+## --------------------------------------------- ##
+
+start_testgroup dirlist-nonexistent
+
+mkdir acdir
+cat > acdir/dirlist <<END
+nonesuch
+./nonesuch2
+foodir
+`pwd`/nonesuch3
+END
+
+cp -fR ../H2/* .
+
+check_expanded \
+  --description 'non-existent directories in dirlist' \
+  --output 'am--foo' \
+  $ACLOCAL --system-acdir ./acdir
+
+end_testgroup
+
+## -------------------------------------------------- ##
+##  Non-existent directories in ACLOCAL_PATH are OK.  ##
+## -------------------------------------------------- ##
+
+start_testgroup aclocal-path-nonexistent
+
+cp -fR ../H2/* .
+
+check_expanded \
+  --description 'non-existent directories in ACLOCAL_PATH' \
+  --output 'am--foo' \
+  env ACLOCAL_PATH="nonesuch:foodir:`pwd`/nonesuch2:./nonesuch3" $ACLOCAL
+
+end_testgroup
+
+
+## -------------------------------------------------------------------- ##
+##  Setup H3: for simple tests on precedence in ACLOCAL_PATH, dirlist,  ##
+##  and `-I' options.                                                   ##
+## -------------------------------------------------------------------- ##
+
+mkdir H3 H3/dir1 H3/dir2
+
+cat > H3/dir1/foo.m4 <<'END'
+AC_DEFUN([AM_FOO], [::foo-1::])
+END
+
+cat > H3/dir2/bar.m4 <<'END'
+AC_DEFUN([AM_FOO], [::foo-2::])
+END
+
+cat > H3/configure.in << 'END'
+AC_INIT
+AM_FOO
+END
+
+# Usage: check_precedence DESC WINNER-NUMBER ACLOCAL-COMMAND [ARGS..]
+check_precedence ()
+{
+  desc=$1 winnum=$2; shift; shift;
+  cp -fR "$ocwd"/H3/* .
+  check_expanded \
+    --description "earlier $desc take precedence (simple usage, $winnum)" \
+    --output "::foo-$winnum::" "$@"
+}
+
+## ----------------------------------- ##
+##  Precedences between several `-I'.  ##
+## ----------------------------------- ##
+
+start_testgroup precedence-basic-local
+
+mkdir a && cd a || Exit 99
+check_precedence "-I dirs" 1 $ACLOCAL -I dir1 -I dir2
+cd ..
+
+mkdir b && cd b || Exit 99
+check_precedence "-I dirs" 2 $ACLOCAL -I dir2 -I dir1
+cd ..
+
+end_testgroup
+
+## ------------------------------------------- ##
+##  Precedences between ACLOCAL_PATH entries.  ##
+## ------------------------------------------- ##
+
+start_testgroup precedence-aclocal-path
+
+mkdir a && cd a || Exit 99
+check_precedence "ACLOCAL_PATH entries" 1 env ACLOCAL_PATH=dir1:dir2 $ACLOCAL
+cd ..
+
+mkdir b && cd b || Exit 99
+check_precedence "ACLOCAL_PATH entries" 2 env ACLOCAL_PATH=dir2:dir1 $ACLOCAL
+cd ..
+
+end_testgroup
+
+## -------------------------------------- ##
+##  Precedences between dirlist entries.  ##
+## -------------------------------------- ##
+
+start_testgroup precedence-dirlist
+
+mkdir a && cd a || Exit 99
+mkdir sdir
+(echo dir1 && echo dir2) > sdir/dirlist
+check_precedence "dirlist entries" 1 $ACLOCAL --system-acdir sdir 
+cd ..
+
+mkdir b && cd b || Exit 99
+mkdir sdir
+(echo dir2 && echo dir1) > sdir/dirlist
+check_precedence "dirlist entries" 2 $ACLOCAL --system-acdir sdir 
+cd ..
+
+end_testgroup
+
+
+## ------------------------------------------------------------- ##
+##  Setup H4: for trickier tests on precedence in ACLOCAL_PATH,  ##
+##  dirlist and `-I' options.                                    ##
+## ------------------------------------------------------------- ##
+
+mkdir H4 H4/adir H4/zdir
+
+cat > H4/zdir/foo.m4 <<'END'
+AC_DEFUN([AM_FOO], [::foo-z::])
+END
+
+cat > H4/adir/foo.m4 <<'END'
+AC_DEFUN([AM_FOO], [::foo-a::])
+AC_DEFUN([AM_BAR], [::bar-a::])
+END
+
+cat > H4/configure.1 << 'END'
+AC_INIT
+AM_FOO
+AM_BAR
+END
+
+# Try also with the macro calls reversed (it did make a difference).
+cat > H4/configure.2 << 'END'
+AC_INIT
+AM_BAR
+AM_FOO
+END
+
+# Usage: check_precedence_trickier DESCRIPTION ACLOCAL-COMMAND [ARGS..]
+check_precedence_trickier ()
+{
+  desc=$1; shift
+  for i in 1 2; do
+    mkdir $i.d
+    cd $i.d
+    cp -fR "$ocwd"/H4/* .
+    mv -f configure.$i configure.in
+    check_expanded \
+      --description "$desc (trickier usage, $i)" \
+      --output "::foo-z:: ::bar-a::" --no-output "::foo-a::" \
+      "$@"
+    cd ..
+  done
+}
+
+## ------------------------------------------------------ ##
+##  Precedences between `-I' options, trickier scenario.  ##
+## ------------------------------------------------------ ##
+
+start_testgroup precedence-trickier-local
+check_precedence_trickier "earlier -I dirs take precedence" \
+                          $ACLOCAL -I zdir -I adir
+end_testgroup
+
+## --------------------------------------------------------- ##
+##  Precedences between dirlist entries, trickier scenario.  ##
+## --------------------------------------------------------- ##
+
+start_testgroup precedence-trickier-dirlist
+mkdir sdir
+cat > sdir/dirlist <<END
+zdir
+adir
+END
+check_precedence_trickier "earlier dirlist entries take precedence" \
+                          $ACLOCAL --system-acdir "`pwd`/sdir"
+end_testgroup
+
+## -------------------------------------------------------------- ##
+##  Precedences between ACLOCAL_PATH entries, trickier scenario.  ##
+## -------------------------------------------------------------- ##
+
+start_testgroup precedence-trickier-aclocal-path
+check_precedence_trickier "earlier ACLOCAL_PATH entries take precedence" \
+                          env ACLOCAL_PATH=zdir:adir $ACLOCAL
+end_testgroup
+
+
+## ------------------------------------------------------------- ##
+##  Setup H5: precedence between different methods of extending  ##
+##  aclocal search path.                                         ##
+## ------------------------------------------------------------- ##
+
+mkdir H5 H5/local-dir H5/acpath-dir H5/dirlist-dir H5/acsys-dir
+
+cat > H5/configure.in << 'END'
+AC_INIT([mu], [1.0])
+AM_INIT_AUTOMAKE
+AM_SILENT_RULES
+FOO_MACRO
+BAR_MACRO
+AC_PROG_LIBTOOL
+END
+
+cat > H5/local-dir/a.m4 << 'END'
+AC_DEFUN([FOO_MACRO], [::foo-local::])
+END
+cat > H5/local-dir/silent.m4 << 'END'
+AC_DEFUN([AM_SILENT_RULES], [::silent-rules-local::])
+END
+
+cat > H5/acpath-dir/a.m4 << 'END'
+AC_DEFUN([FOO_MACRO], [::foo-acpath::])
+END
+cat > H5/acpath-dir/b.m4 << 'END'
+AC_DEFUN([BAR_MACRO], [::bar-acpath::])
+END
+cat > H5/acpath-dir/init.m4 << 'END'
+AC_DEFUN([AM_INIT_AUTOMAKE], [::am-acpath::])
+END
+
+cat > H5/dirlist-dir/a.m4 << 'END'
+AC_DEFUN([FOO_MACRO], [::foo-dirlist::])
+END
+cat > H5/dirlist-dir/b.m4 << 'END'
+AC_DEFUN([BAR_MACRO], [::bar-dirlist::])
+END
+cat > H5/dirlist-dir/x.m4 << 'END'
+AC_DEFUN([AC_PROG_LIBTOOL], [::libtool-dirlist::])
+END
+cat > H5/dirlist-dir/init.m4 << 'END'
+AC_DEFUN([AM_INIT_AUTOMAKE], [::am-dirlist::])
+END
+
+cat > H5/acsys-dir/a.m4 << 'END'
+AC_DEFUN([FOO_MACRO], [::foo-acsys::])
+END
+cat > H5/acsys-dir/b.m4 << 'END'
+AC_DEFUN([BAR_MACRO], [::bar-acsys::])
+END
+cat > H5/acsys-dir/c.m4 << 'END'
+AC_DEFUN([AC_PROG_LIBTOOL], [::libtool-acsys::])
+END
+cat > H5/acsys-dir/init.m4 << 'END'
+AC_DEFUN([AM_INIT_AUTOMAKE], [::am-acsys::])
+END
+
+echo ./dirlist-dir > H5/acsys-dir/dirlist
+
+check_precedence_hodgepodge ()
+{
+  moredesc=${1+"[$1]"}
+
+  check_expanded \
+    --description "many aclocal search paths at the same time $moredesc" \
+    env ACLOCAL_PATH=acpath-dir $ACLOCAL -I local-dir --system-acdir acsys-dir
+
+  $FGREP :: configure # For debugging.
+
+  command_ok_ \
+    "-I takes precedence over automake private macros $moredesc" \
+    $FGREP '::silent-rules-local::' configure
+
+  command_ok_ \
+    "-I takes precedence over everything else $moredesc" \
+    $FGREP '::foo-local::' configure
+
+  # Files in automake's "private" acdir-APIVERSION takes precedence over
+  # everything else *but* stuff in -I dirs.
+  # FIXME: this might be changed in future automake versions.
+  command_ok_ \
+    "acdir-APIVERSION take precedence over everything but -I $moredesc" \
+    eval ' not $FGREP ::am- configure && $FGREP "am__api_version" configure'
+
+  command_ok_ \
+    "ACLOCAL_PATH take precedence over dirlist and acdir $moredesc" \
+    $FGREP '::bar-acpath::' configure
+
+  # FIXME: this might be changed in future automake versions.
+  command_ok_ \
+    "acdir takes precedence over dirlist $moredesc" \
+    $FGREP '::libtool-acsys::' configure
+}
+
+## ------------------------------------------------------------------ ##
+##  Precedences between different components of the aclocal search    ##
+##  path: -I option, ACLOCAL_PATH environment variable, dirlist file  ##
+##  and system acdir.                                                 ##
+## ------------------------------------------------------------------ ##
+
+start_testgroup precedence-hodgepodge
+cp -fR ../H5/* .
+check_precedence_hodgepodge
+end_testgroup
+
+## -------------------------------------------------------------------- ##
+##  The same as above, but with serial number (which should be ignored  ##
+##  when `--install' is not used) and different names for the `.m4'     ##
+##  files (which shouldn't make any difference).                        ##
+## -------------------------------------------------------------------- ##
+
+start_testgroup precedence-hodgepodge-serial
+
+cp -fR ../H5/* .
+
+i=0
+for d in local-dir acpath-dir dirlist-dir acsys-dir; do
+  i=`expr $i + 1`
+  cd $d
+  for f in *.m4; do
+    echo "# serial $i" > t
+    cat $f >> t
+    mv -f t $i$f
+    rm -f $f
+    cat $i$f # For debugging.
+  done
+  pwd && ls -l # For debugging.
+  cd ..
+done
+
+check_precedence_hodgepodge "varied names and serials"
+
+end_testgroup
+
+
+## -------------------------------------------------------------------- ##
+##  Setup H6: for tests checking that, when two files define the same   ##
+##  macro in the same directory, the macro from the lexically greatest  ##
+##  file is used.                                                       ##
+## -------------------------------------------------------------------- ##
+
+mkdir H6
+
+mkdir H6/1 H6/1/m4
+cat > H6/1/configure.in <<END
+AC_INIT
+MACRO1
+END
+cat > H6/1/m4/version1.m4 <<END
+AC_DEFUN([MACRO1], [::macro11::])
+AC_DEFUN([MACRO2], [::macro21::])
+END
+cat > H6/1/m4/version2.m4 <<END
+AC_DEFUN([MACRO1], [::macro12::])
+END
+
+cp -fR H6/1 H6/2
+echo MACRO2 >> H6/2/configure.in
+
+check_lexicographic_precedence_1 ()
+{
+  desc=$1; shift
+  check_expanded \
+    --description "in the same $desc, lexicographic order is used (1)" \
+    --output "::macro12::" --no-output "::macro11 ::macro21::" \
+    "$@" 
+}
+
+check_lexicographic_precedence_2 ()
+{
+  desc=$1; shift
+  check_expanded \
+    --description "in the same $desc, lexicographic order is used (2)" \
+    --output "::macro12:: ::macro21::" --no-output "::macro11::" \
+    "$@" 
+}
+
+
+for i in 1 2; do
+
+  ## ---------------------------------------------------------------- ##
+  ##  Lexicographic precedence for files in the same `-I' directory.  ##
+  ## ---------------------------------------------------------------- ##
+
+  start_testgroup lexical-precedence-local-$i
+  cp -fR ../H6/$i/* .
+  check_lexicographic_precedence_$i "'-I' directory" $ACLOCAL -I m4
+  end_testgroup
+
+  ## ------------------------------------------------------------- ##
+  ##  Lexicographic precedence for files in the same ACLOCAL_PATH  ##
+  ##  directory.                                                   ##
+  ## ------------------------------------------------------------- ##
+
+  start_testgroup lexical-precedence-aclocal-path-$i
+  cp -fR ../H6/$i/* .
+  check_lexicographic_precedence_$i "ACLOCAL_PATH entry" \
+    env ACLOCAL_PATH=m4 $ACLOCAL
+  end_testgroup
+
+  ## ------------------------------------------------------------------- ##
+  ##  Lexicographic precedence for files in the same dirlist directory.  ##
+  ## ------------------------------------------------------------------- ##
+
+  start_testgroup lexical-precedence-dirlist-$i
+  cp -fR ../H6/$i/* .
+  mkdir acdir
+  echo ./m4 > acdir/dirlist
+  check_lexicographic_precedence_$i "dirlist entry" \
+    $ACLOCAL --system-acdir acdir
+  end_testgroup
+
+  ## ----------------------------------------------------------------- ##
+  ##  Lexicographic precedence for files in the same acdir directory.  ##
+  ## ----------------------------------------------------------------- ##
+
+  start_testgroup lexical-precedence-acdir-$i
+  cp -fR ../H6/$i/* .
+  mv -f m4 acdir
+  check_lexicographic_precedence_$i "system-wide acdir" \
+    $ACLOCAL --system-acdir acdir
+  end_testgroup
+
+done
+
+:
diff --git a/tests/aclocal9.test b/tests/aclocal9.test
deleted file mode 100755
index b182a1a..0000000
--- a/tests/aclocal9.test
+++ /dev/null
@@ -1,49 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2003, 2010, 2011 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Make sure aclocal define macros in the same order as -I's.
-
-. ./defs || Exit 1
-
-cat >> configure.in << 'END'
-MACRO1
-MACRO2
-END
-
-mkdir m4_1 m4_2
-
-cat >m4_1/somedefs.m4 <<EOF
-AC_DEFUN([MACRO1], [echo macro11 > foo])
-AC_DEFUN([MACRO2], [echo macro21 >> foo])
-EOF
-
-cat >m4_2/somedefs.m4 <<EOF
-AC_DEFUN([MACRO1], [echo macro12 > foo])
-EOF
-
-$ACLOCAL -I m4_1 -I m4_2
-$AUTOCONF
-./configure
-grep macro11 foo
-grep macro21 foo
-
-$sleep
-
-$ACLOCAL -I m4_2 -I m4_1
-$AUTOCONF
-./configure
-grep macro12 foo
-grep macro21 foo
diff --git a/tests/dirlist.test b/tests/dirlist.test
deleted file mode 100755
index 89183c6..0000000
--- a/tests/dirlist.test
+++ /dev/null
@@ -1,57 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2002, 2003, 2004, 2011 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Check dirlist support.
-# This test relies on m4/dirlist
-
-. ./defs || Exit 1
-
-cat > configure.in <<EOF
-AC_INIT
-AM_INIT_GUILE_MODULE
-EOF
-
-mkdir dirlist-test
-
-cat >dirlist-test/dirlist-check.m4 <<'END'
-AC_DEFUN([AM_INIT_GUILE_MODULE],[
-. $srcdir/../GUILE-VERSION
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
-AC_CONFIG_AUX_DIR(..)
-module=[$1]
-AC_SUBST(module)])
-END
-
-cat >dirlist-test/init.m4 <<EOF
-AC_DEFUN([AM_INIT_AUTOMAKE], [I should not be included])
-EOF
-
-$ACLOCAL
-$AUTOCONF
-
-# there should be no m4_include in aclocal.m4, even tho m4/dirlist contains
-# `./dirlist-test' as a relative directory.  Only -I directories are subject
-# to file inclusion.
-grep m4_include aclocal.m4 && Exit 1
-
-grep 'GUILE-VERSION' configure
-
-# This bug can occur only when we do a VPATH build of Automake
-# (because of the `-I' passed to aclocal in tests/defs/aclocal.in) but
-# it's OK because VPATH builds are done by `make distcheck'.
-grep 'I should not be included' configure && Exit 1
-
-:
diff --git a/tests/dirlist2.test b/tests/dirlist2.test
deleted file mode 100755
index e7c2c93..0000000
--- a/tests/dirlist2.test
+++ /dev/null
@@ -1,56 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2002, 2003, 2004, 2006, 2011 Free Software Foundation,
-# Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Check dirlist globbing support.
-# This test relies on m4/dirlist
-
-. ./defs || Exit 1
-
-cat > configure.in <<EOF
-AC_INIT
-AM_INIT_GUILE_MODULE
-AM_FOO_BAR
-EOF
-
-mkdir dirlist21-test dirlist22-test
-
-cat >dirlist21-test/dirlist21-check.m4 <<'END'
-AC_DEFUN([AM_INIT_GUILE_MODULE],[
-. $srcdir/../GUILE-VERSION
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
-AC_CONFIG_AUX_DIR(..)
-module=[$1]
-AC_SUBST(module)])
-END
-
-cat >dirlist22-test/dirlist22-check.m4 <<'END'
-AC_DEFUN([AM_FOO_BAR],[
-: foo bar baz
-])
-END
-$ACLOCAL
-$AUTOCONF
-
-# there should be no m4_include in aclocal.m4, even tho m4/dirlist contains
-# `./dirlist-test' as a relative directory.  Only -I directories are subject
-# to file inclusion.
-grep m4_include aclocal.m4 && Exit 1
-
-grep 'GUILE-VERSION' configure
-grep 'foo bar baz' configure
-
-:
-- 
1.7.2.3


reply via email to

[Prev in Thread] Current Thread [Next in Thread]