Hi Alexandre, This is somewhat older: http://lists.gnu.org/archive/html/automake-patches/2005-10/msg00009.html
* Alexandre Duret-Lutz wrote on Mon, Oct 17, 2005 at 10:52:47PM CEST: > >>> "SK" == Stepan Kasal <[EMAIL PROTECTED]> writes: > > SK> Alexandre, will you accept it? > > Sure. It just needs the usual stuff for a new feature: some > documentation, and a test case that shows it (will continue to) > works as documented. Here are documentation and test. I was unsure whether a reference to glob within the libc manual was appropriate in the documentation. Cheers, Ralf * doc/automake.texi (Macro search path): Document it. * tests/dirlist2.test: New test. * m4/dirlist, tests/Makefile.am: Adjusted. Index: doc/automake.texi =================================================================== RCS file: /cvs/automake/automake/doc/automake.texi,v retrieving revision 1.131 diff -u -r1.131 automake.texi --- doc/automake.texi 10 Mar 2006 10:51:37 -0000 1.131 +++ doc/automake.texi 15 Mar 2006 23:55:57 -0000 @@ -1855,9 +1855,9 @@ There is a third mechanism for customizing the search path. If a @file{dirlist} file exists in @var{acdir}, then that file is assumed to -contain a list of directories, one per line, to be added to the search -list. These directories are searched @emph{after} all other -directories. +contain a list of directory patterns, one per line. @command{aclocal} +expands these patterns to directory names similar to the C glob function, +and adds them to the search list @emph{after} all other directories. For example, suppose @[EMAIL PROTECTED]/dirlist} contains the following: @@ -1865,6 +1865,7 @@ @example /test1 /test2 +/test3* @end example @noindent @@ -1881,6 +1882,9 @@ @item @code{/test2} @end enumerate [EMAIL PROTECTED] +and all directories with path names starting with @code{/test3}. + If the @[EMAIL PROTECTED] option is used, then @command{aclocal} will search for the @file{dirlist} file in @var{dir}. In the @samp{--acdir=/opt/private/} example above, @command{aclocal} would look Index: m4/dirlist =================================================================== RCS file: /cvs/automake/automake/m4/dirlist,v retrieving revision 1.1 diff -u -r1.1 dirlist --- m4/dirlist 31 Jul 2002 19:58:25 -0000 1.1 +++ m4/dirlist 15 Mar 2006 23:55:58 -0000 @@ -1,3 +1,4 @@ -# This file is used by the testsuite (dirlist.test) +# This file is used by the testsuite (dirlist*.test) # it should not be installed ./dirlist-test +./dirlist2*-test Index: tests/Makefile.am =================================================================== RCS file: /cvs/automake/automake/tests/Makefile.am,v retrieving revision 1.593 diff -u -r1.593 Makefile.am --- tests/Makefile.am 10 Mar 2006 12:02:26 -0000 1.593 +++ tests/Makefile.am 15 Mar 2006 23:55:58 -0000 @@ -199,6 +202,7 @@ destdir.test \ dirforbid.test \ dirlist.test \ +dirlist2.test \ discover.test \ distcom2.test \ distcom3.test \ --- /dev/null 1970-01-01 00:00:01.000000000 +0100 +++ tests/dirlist2.test 2006-03-15 23:39:53.000000000 +0100 @@ -0,0 +1,61 @@ +#! /bin/sh +# Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc. +# +# This file is part of GNU Automake. +# +# GNU Automake 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. +# +# GNU Automake 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 Automake; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. + +# Check dirlist globbing support. +# This test relies on m4/dirlist + +. ./defs || exit 1 + +set -e + +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 + +: