From: Ralf Wildenhues Date: Wed, 13 Sep 2006 04:48:23 +0000 (+0000) Subject: * lib/autoconf/status.m4 (_AC_OUTPUT_SUBDIRS): Quote the X-Git-Tag: AUTOCONF-2.60b~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff70b0c81e306198c3e3f6baccb35aff7ecfc605;p=thirdparty%2Fautoconf.git * 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. --- diff --git a/ChangeLog b/ChangeLog index 054a0d873..f189ca99c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2006-09-13 Ralf Wildenhues + + * 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. + 2006-09-12 Paul Eggert * doc/autoconf.texi (Input): Clarify role of AC_CONFIG_MACRO_DIR. diff --git a/doc/autoconf.texi b/doc/autoconf.texi index bfc0bf96c..5d3cb79df 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -8415,7 +8415,7 @@ line argument, including when no cache is used: @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 diff --git a/lib/autoconf/status.m4 b/lib/autoconf/status.m4 index 522dbc6d1..7f3919067 100644 --- a/lib/autoconf/status.m4 +++ b/lib/autoconf/status.m4 @@ -983,7 +983,12 @@ if test "$no_recursion" != yes; then 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 diff --git a/tests/torture.at b/tests/torture.at index e4c6daf23..436842f6c 100644 --- a/tests/torture.at +++ b/tests/torture.at @@ -876,6 +876,21 @@ top_srcdir=../../../inner 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])