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-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)'
- 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:
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
# 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);
}
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:
@example
/test1
/test2
+/test3*
@end example
@noindent
@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
-# 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
destdir.test \
dirforbid.test \
dirlist.test \
+dirlist2.test \
discover.test \
distcom2.test \
distcom3.test \
--- /dev/null
+#! /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
+
+: