* aclocal.in (parse_arguments): Added wildcard support to the
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 21 Mar 2006 19:09:21 +0000 (19:09 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 21 Mar 2006 19:09:21 +0000 (19:09 +0000)
dirlist parser.
* doc/automake.texi (Macro search path): Document it.
* tests/dirlist2.test: New test.
* m4/dirlist, tests/Makefile.am: Adjust.
* NEWS, THANKS: Update.

ChangeLog
NEWS
THANKS
aclocal.in
doc/automake.texi
m4/dirlist
tests/Makefile.am
tests/dirlist2.test [new file with mode: 0755]

index 1fe798c..bb5ec54 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2006-03-21  Clifford Wolf  <clifford@clifford.at>  (tiny change)
+           Stepan Kasal  <kasal@ucw.cz>
+           Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * 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.
+
 2006-03-20  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * m4/init.m4 (AM_INIT_AUTOMAKE): Add `_AM_DEPENDENCIES(OBJC)'
diff --git a/NEWS b/NEWS
index 70a30ec..2c5ed01 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -101,6 +101,9 @@ New in 1.9a:
   - 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 `[...]'.
 \f
 New in 1.9:
 
diff --git a/THANKS b/THANKS
index aa66efe..9eb0db3 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -42,6 +42,7 @@ Bruno Haible          haible@ilog.fr
 Charles Wilson         cwilson@ece.gatech.edu
 Chris Provenzano       proven@io.proven.org
 Christian Cornelssen   ccorn@cs.tu-berlin.de
+Clifford Wolf          clifford@clifford.at
 Dalibor Topic          robilad@kaffe.org
 danbp                  danpb@nospam.postmaster.co.uk
 Daniel Jacobowitz      drow@false.org
index a05ba72..2e9bb84 100644 (file)
@@ -942,7 +942,10 @@ sub parse_arguments ()
              # 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 25d3585..5c00018 100644 (file)
@@ -1860,9 +1860,10 @@ Any extra directories specified using @option{-I} options
 
 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
 @file{@var{acdir}/dirlist} contains the following:
@@ -1870,6 +1871,7 @@ For example, suppose
 @example
 /test1
 /test2
+/test3*
 @end example
 
 @noindent
@@ -1886,6 +1888,9 @@ Then, the search path would be
 @item @code{/test2}
 @end enumerate
 
+@noindent
+and all directories with path names starting with @code{/test3}.
+
 If the @option{--acdir=@var{dir}} 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 ac070b3..82339e4 100644 (file)
@@ -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 ebac264..55c4e68 100644 (file)
@@ -202,6 +202,7 @@ depend4.test \
 destdir.test \
 dirforbid.test \
 dirlist.test \
+dirlist2.test \
 discover.test \
 distcom2.test \
 distcom3.test \
diff --git a/tests/dirlist2.test b/tests/dirlist2.test
new file mode 100755 (executable)
index 0000000..5016bf4
--- /dev/null
@@ -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
+
+: