libtool-patches
[Top][All Lists]
Advanced

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

[PATCH 4/6] tweak to config.status->libtool quoting (correct?)


From: Paolo Bonzini
Subject: [PATCH 4/6] tweak to config.status->libtool quoting (correct?)
Date: Fri, 7 Nov 2008 13:02:44 +0100

This is a patch I was not sure of when I wrote it, but now I am more
confident.  config.status was looking for quoting only in the first
word of variables because of a missing "..." in the arguments of $ECHO.
$ECHO, depending on how it is set (and always in the final patch) will
not print arguments after the first.

The first hunk is needed for the other patches, but the second does the
same change, and the current code seems equally wrong.  Note that not
applying this patch is a showstopper for the final patch in the series,
which defines variables like

    printf %s\\n "$1"

There, the first word does not need extra quoting, but the others do.

* libltdl/m4libtool.m4 (_LT_OUTPUT_LIBTOOL_COMMANDS_INIT): Double
quote ECHO-ed variable.

---
 libltdl/m4/libtool.m4 |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index 34fa517..27c8d70 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -520,7 +520,7 @@ compiler='$compiler_DEFAULT'
 # Quote evaled strings.
 for var in lt_decl_all_varnames([[ \
 ]], lt_decl_quote_varnames); do
-    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    case \`eval \\\\\$ECHO \\\\""X\\\\\$\$var"\\\\"\` in
     *[[\\\\\\\`\\"\\\$]]*)
       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e 
\\"\\\$sed_quote_subst\\"\\\`\\\\\\""
       ;;
@@ -533,7 +533,7 @@ done
 # Double-quote double-evaled strings.
 for var in lt_decl_all_varnames([[ \
 ]], lt_decl_dquote_varnames); do
-    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    case \`eval \\\\\$ECHO \\\\""X\\\\\$\$var"\\\\"\` in
     *[[\\\\\\\`\\"\\\$]]*)
       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e 
\\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e 
\\"\\\$delay_variable_subst\\"\\\`\\\\\\""
       ;;
-- 
1.5.5





reply via email to

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