+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
$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. #
# `-- 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])
# 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
])
-AT_CLEANUP(inner builddir)
+AT_CLEANUP(testSubDir)