]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* bin/autoreconf.in (&autoreconf): AC_CONFIG_SUBIDRS are to be
authorAkim Demaille <akim@epita.fr>
Thu, 8 Nov 2001 16:15:20 +0000 (16:15 +0000)
committerAkim Demaille <akim@epita.fr>
Thu, 8 Nov 2001 16:15:20 +0000 (16:15 +0000)
processed only if present.
* tests/torture.at (Configuring subdirectories): Use autoreconf
instead of successive calls to autoconf.
Add a nonexistent subdirectory to exercise the patch above.
Reported by Ralf Corsepius.

ChangeLog
bin/autoreconf.in
tests/torture.at

index 86aae091d268007e34e3f09e050c37f8d0674dae..abe40cc7d1b272e11474b47f50a469933d89f80e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2001-11-08  Akim Demaille  <akim@epita.fr>
+
+       * bin/autoreconf.in (&autoreconf): AC_CONFIG_SUBIDRS are to be
+       processed only if present.
+       * tests/torture.at (Configuring subdirectories): Use autoreconf
+       instead of successive calls to autoconf.
+       Add a nonexistent subdirectory to exercise the patch above.
+       Reported by Ralf Corsepius.
+
 2001-11-08  Kevin Ryde  <user42@zip.com.au>
 
        * autoconf.texi (Limitations of Usual Tools): Note HP-UX cc
index 4cb1b4c885194868bb75d0cffb93d5506db5b612..ba6f1c9501ac755c50af45f4d26f06e3a1cef5f3 100644 (file)
@@ -240,9 +240,22 @@ sub autoreconf ($)
       $uses_gettext = 1           if /AM_GNU_GETTEXT/;
       $uses_libtool = 1           if /AM_PROG_LIBTOOL/;
       $uses_autoheader = 1        if /AC_CONFIG_HEADERS/;
-      push @ARGV, split (' ', $1) if /AC_CONFIG_SUBDIRS:(.*)/;
+      push @subdir, split (' ', $1) if /AC_CONFIG_SUBDIRS:(.*)/;
     }
 
+  # The subdirs are *optional*, they may not exist.
+  foreach (@subdir)
+    {
+      if (-d)
+       {
+         verbose "$configure_ac: subdirectory $_ to autoreconf";
+         push @ARGV, $_;
+       }
+      else
+       {
+         verbose "$configure_ac: subdirectory $_ not present";
+       }
+    }
 
   # -------------------- #
   # Running gettexitze.  #
index b76afbea007d7e36a9017ae26c237d903433e32c..06ab6e62f5adda56420176c3b21333183bf2c5f4 100644 (file)
@@ -523,6 +523,19 @@ AT_CLEANUP
 # `-- install-sh
 #
 AT_SETUP([Configuring subdirectories])
+AT_KEYWORDS(autoreconf)
+
+# Move into a fresh testSubDir.  But Autotest is not ready for such
+# tricks, albeit most useful :( It expects to find its files
+# (at-setup-line and so on) in the original `.', and it will complain
+# not to find even one.  So just run mkdir as if it were a test.  This
+# will create at-setup-line blah blah, and Autotest will leave us in
+# peace.
+#
+# FIXME: The more I think about it, the more I am tempted to *always*
+# have test groups run in a subdir, a` la Automake.
+AT_CHECK([AS_MKDIR_P([testSubDir])])
+cd testSubDir
 
 # The contents of `inner/', and `inner/innermost/'.
 AS_MKDIR_P([inner/innermost])
@@ -545,15 +558,18 @@ top_srcdir=@top_srcdir@
 # The contents of `.'
 AT_DATA([install-sh], [])
 
+# nonexistent is allowed not to exist.
 AT_DATA([configure.ac],
 [AC_INIT(GNU Outer, 1.0)
 AC_ARG_VAR([OUTER], [an outer variable])
+if false; then
+  AC_CONFIG_SUBDIRS([nonexistent])
+fi
 AC_CONFIG_SUBDIRS([inner])
 AC_OUTPUT
 ])
 
-AT_CHECK_AUTOCONF
-AT_CHECK_AUTOCONF([-o inner/configure inner/configure.ac])
+AT_CHECK([autoreconf])
 AT_CHECK([test -f inner/configure])
 
 # Running the outer configure recursively should provide the innermost
@@ -578,4 +594,4 @@ top_srcdir=../../../inner
 ])
 
 
-AT_CLEANUP(inner builddir)
+AT_CLEANUP(testSubDir)