]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* bin/autoscan.in (subdirs): New global.
authorNoah Misch <noah@cs.caltech.edu>
Mon, 3 Apr 2006 15:58:20 +0000 (15:58 +0000)
committerNoah Misch <noah@cs.caltech.edu>
Mon, 3 Apr 2006 15:58:20 +0000 (15:58 +0000)
(scan_file): Prune directories with configure{,.{ac,in,gnu}}.
(output): Emit AC_CONFIG_SUBDIRS as needed.
* tests/autoscan.at (autoscan): Remove XFAIL.

ChangeLog
bin/autoscan.in
tests/autoscan.at

index 374705830ee84cdfe6419ce254a6637e430ee06e..20f9b5a3c3f535f3b1f24b760daa263a6af90575 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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.
index 48289f343607106739f991e99305596610564c1b..6195af29a3fed4b95e0d7e3610f37fa0e8e6c701 100644 (file)
@@ -47,7 +47,7 @@ use File::Basename;
 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
@@ -385,6 +385,15 @@ sub scan_file ()
   # 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;
@@ -530,6 +539,7 @@ sub output ($)
   output_kind ($file, 'identifier');
   output_kind ($file, 'function');
 
+  print $file "\n";
   if (@makefiles)
     {
       # Change DIR/Makefile.in to DIR/Makefile.
@@ -538,10 +548,16 @@ sub output ($)
          $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;
index 8aa7b8d351dd5da1f9e33935bb7c27acc337413b..c51eb5d1cc677d95338ecb776fc730239660d35f 100644 (file)
@@ -20,7 +20,6 @@ AT_BANNER([Autoscan.])
 # 02110-1301, USA.
 
 AT_SETUP([autoscan])
-AT_XFAIL_IF(:)
 
 AT_DATA([Makefile.am],
 [[SUBDIRS = subpkg