+2006-04-03 Noah Misch <noah@cs.caltech.edu>
+
+ * bin/autoscan.in (subdirs): New global.
+ (scan_file): Prune directories with configure{,.{ac,in,gnu}}.
+ (output): Emit AC_CONFIG_SUBDIRS as needed.
+ * tests/autoscan.at (autoscan): Remove XFAIL.
+
2006-04-03 Noah Misch <noah@cs.caltech.edu>
* lib/autoconf/general.m4 (AC_CACHE_SAVE): Use AC_MSG_NOTICE.
use File::Find;
use strict;
-use vars qw(@cfiles @makefiles @shfiles %printed);
+use vars qw(@cfiles @makefiles @shfiles @subdirs %printed);
# The kind of the words we are looking for.
my @kinds = qw (function header identifier program
# Strip a useless leading `./'.
$File::Find::name =~ s,^\./,,;
+ if ($_ ne '.' and -d $_ and
+ -f "$_/configure.in" ||
+ -f "$_/configure.ac" ||
+ -f "$_/configure.gnu" ||
+ -f "$_/configure")
+ {
+ $File::Find::prune = 1;
+ push @subdirs, $File::Find::name;
+ }
if (/\.[chlym](\.in)?$/)
{
used 'program', 'cc', $File::Find::name;
output_kind ($file, 'identifier');
output_kind ($file, 'function');
+ print $file "\n";
if (@makefiles)
{
# Change DIR/Makefile.in to DIR/Makefile.
$m =~ s/\.(?:in|am)$//;
$unique_makefiles{$m}++;
}
- print $file ("\nAC_CONFIG_FILES([",
+ print $file ("AC_CONFIG_FILES([",
join ("\n ",
sort keys %unique_makefiles), "])\n");
}
+ if (@subdirs)
+ {
+ print $file ("AC_CONFIG_SUBDIRS([",
+ join ("\n ",
+ sort @subdirs), "])\n");
+ }
print $file "AC_OUTPUT\n";
$file->close;