autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

configure: --silent should be passed to sub-configure


From: Ralf Wildenhues
Subject: configure: --silent should be passed to sub-configure
Date: Tue, 12 Sep 2006 20:46:22 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

1) It seems inconsistent that a sub-configure script invoked by
  ./configure --silent

produces normal (i.e., verbose) output.  The patch below passes --silent
to sub-configure scripts, and adds a test.  FWIW, this change:
http://lists.gnu.org/archive/html/autoconf-patches/2002-11/msg00011.html
contains a rationale why --silent should not be kept by a
  ./config.status --recheck

but interestingly, our documentation implies otherwise in an example.
The patch below updates the example to what happens currently.  Do you 
agree that this is appropriate?  Maybe Automake should allow to pass
$(CONFIG_STATUS_FLAGS) (or a similarly named variable) to allow the
user to pass `--silent' to the recheck?

2) While in the area, I noted that we take great care to escape
single-quotes in $prefix in _AC_OUTPUT_SUBDIRS, but forget to put
single quotes around it (for other special characters like, e.g.,
doubled spaces).  So I fixed that and added it to the test, too.

OK to commit?

Cheers,
Ralf

        * lib/autoconf/status.m4 (_AC_OUTPUT_SUBDIRS): Quote the
        argument to `--prefix' for sub-configure scripts.
        Pass `--silent' to sub-configure scripts.
        * tests/torture.at (Configuring subdirectories): Add tests
        for both changes.
        * doc/autoconf.texi (Setting Output Variables): Fix example to
        not show `--silent' being passed to a `configure' re-run.

Index: doc/autoconf.texi
===================================================================
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.1084
diff -u -r1.1084 autoconf.texi
--- doc/autoconf.texi   12 Sep 2006 18:16:34 -0000      1.1084
+++ doc/autoconf.texi   12 Sep 2006 18:43:24 -0000
@@ -8415,7 +8415,7 @@
 @example
 $ @kbd{CC=/usr/bin/cc ./configure undeclared_var=raboof --silent}
 $ @kbd{./config.status --recheck}
-running /bin/sh ./configure undeclared_var=raboof --silent \
+running CONFIG_SHELL=/bin/sh /bin/sh ./configure undeclared_var=raboof \
   CC=/usr/bin/cc  --no-create --no-recursion
 @end example
 @end itemize
Index: lib/autoconf/status.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/status.m4,v
retrieving revision 1.117
diff -u -r1.117 status.m4
--- lib/autoconf/status.m4      8 Aug 2006 16:29:05 -0000       1.117
+++ lib/autoconf/status.m4      12 Sep 2006 18:43:24 -0000
@@ -983,7 +983,12 @@
   case $ac_arg in
   *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
   esac
-  ac_sub_configure_args="$ac_arg $ac_sub_configure_args"
+  ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
+
+  # Pass --silent
+  if test "$silent" = yes; then
+    ac_sub_configure_args="--silent $ac_sub_configure_args"
+  fi
 
   ac_popdir=`pwd`
   for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
Index: tests/torture.at
===================================================================
RCS file: /cvsroot/autoconf/autoconf/tests/torture.at,v
retrieving revision 1.69
diff -u -r1.69 torture.at
--- tests/torture.at    24 Aug 2006 22:56:47 -0000      1.69
+++ tests/torture.at    12 Sep 2006 18:43:24 -0000
@@ -876,6 +876,21 @@
 prefix=/good
 ])
 
+# Make sure --prefix is properly quoted
+AT_CHECK([cd builddir && ../configure --prefix "/a  b c$ 'd"], 0, [ignore])
+AT_CHECK([cat builddir/inner/innermost/config], 0,
+[INNER=inner
+srcdir=../../../inner/innermost
+top_srcdir=../../../inner
+prefix=/a  b c$ 'd
+])
+
+# Make sure --silent is properly passed...
+AT_CHECK([cd builddir && ../configure --silent], 0, [])
+# ...but not stored in config.status.
+AT_CHECK([cd builddir && ./config.status --recheck], 0, [stdout])
+AT_CHECK([grep 'creating \./config.status' stdout], 0, [ignore])
+
 # Make sure we can run autoreconf on a subdirectory
 rm -f configure configure.in
 AT_CHECK([autoreconf inner], [], [], [ignore])




reply via email to

[Prev in Thread] Current Thread [Next in Thread]