Hi Alexandre, * Alexandre Duret-Lutz wrote on Sat, Mar 18, 2006 at 09:23:34AM CET: > >>> "RW" == Ralf Wildenhues <[EMAIL PROTECTED]> writes: > > RW> http://lists.gnu.org/archive/html/automake-patches/2005-10/msg00009.html
> RW> I was unsure whether a reference > RW> to glob within the libc manual was appropriate in the documentation. > > Well glob() is in turn documented to behave according to the > rules of the shell, so maybe it's simpler to say "dirlist > entries may use shell wildcards such as @samp{*}, @samp{?}, > or @code{[...]}". (This would also make a nice NEWS entry.) > > Assuming you have already applied Stepan/Clifford's patch to test > this, could you commit it along with yours and add Clifford to THANKS? I had not applied their patch yet. I've done that now, together with my part and your comments addressed, as shown below. Thanks for the review! Cheers, Ralf 2006-03-21 Clifford Wolf <[EMAIL PROTECTED]> (tiny change) Stepan Kasal <[EMAIL PROTECTED]> Ralf Wildenhues <[EMAIL PROTECTED]> * aclocal.in (parse_arguments): Added wildcard support to the dirlist parser. * doc/automake.texi (Macro search path): Document it. * tests/dirlist2.test: New test. * m4/dirlist, tests/Makefile.am: Adjust. * NEWS, THANKS: Update. Index: NEWS =================================================================== RCS file: /cvs/automake/automake/NEWS,v retrieving revision 1.303 diff -u -r1.303 NEWS --- NEWS 20 Mar 2006 20:31:28 -0000 1.303 +++ NEWS 21 Mar 2006 19:02:37 -0000 @@ -101,6 +101,9 @@ - Improved support for Objective C: - Autoconf's new AC_PROG_OBJC will enable automatic dependency tracking. - A new section of the manual documents the support. + + - `dirlist' entries (for the aclocal search path) may use shell wildcards + such as `*', `?', or `[...]'. New in 1.9: Index: THANKS =================================================================== RCS file: /cvs/automake/automake/THANKS,v retrieving revision 1.276 diff -u -r1.276 THANKS --- THANKS 5 Feb 2006 05:53:37 -0000 1.276 +++ THANKS 21 Mar 2006 19:02:37 -0000 @@ -42,6 +42,7 @@ Charles Wilson [EMAIL PROTECTED] Chris Provenzano [EMAIL PROTECTED] Christian Cornelssen [EMAIL PROTECTED] +Clifford Wolf [EMAIL PROTECTED] Dalibor Topic [EMAIL PROTECTED] danbp [EMAIL PROTECTED] Daniel Jacobowitz [EMAIL PROTECTED] Index: aclocal.in =================================================================== RCS file: /cvs/automake/automake/aclocal.in,v retrieving revision 1.135 diff -u -r1.135 aclocal.in --- aclocal.in 19 Mar 2006 05:09:11 -0000 1.135 +++ aclocal.in 21 Mar 2006 19:02:38 -0000 @@ -942,7 +942,10 @@ # strip off newlines and end-of-line comments s/\s*\#.*$//; chomp; - push (@system_includes, $_) if -d $_; + foreach my $dir (glob) + { + push (@system_includes, $dir) if -d $dir; + } } close (DIRLIST); } Index: doc/automake.texi =================================================================== RCS file: /cvs/automake/automake/doc/automake.texi,v retrieving revision 1.132 diff -u -r1.132 automake.texi --- doc/automake.texi 20 Mar 2006 20:31:28 -0000 1.132 +++ doc/automake.texi 21 Mar 2006 19:02:43 -0000 @@ -1860,9 +1860,10 @@ 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, and adds them to the search +list @emph{after} all other directories. @file{dirlist} entries may +use shell wildcards such as @samp{*}, @samp{?}, or @code{[...]}. For example, suppose @[EMAIL PROTECTED]/dirlist} contains the following: @@ -1870,6 +1871,7 @@ @example /test1 /test2 +/test3* @end example @noindent @@ -1886,6 +1888,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 21 Mar 2006 19:02:43 -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.597 diff -u -r1.597 Makefile.am --- tests/Makefile.am 20 Mar 2006 20:31:28 -0000 1.597 +++ tests/Makefile.am 21 Mar 2006 19:02:43 -0000 @@ -202,6 +202,7 @@ destdir.test \ dirforbid.test \ dirlist.test \ +dirlist2.test \ discover.test \ distcom2.test \ distcom3.test \ --- /dev/null 2006-03-19 06:33:14.877151536 +0100 +++ tests/dirlist2.test 2006-03-21 19:57:04.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 + +: