From: Alexandre Oliva Date: Sat, 13 Mar 1999 22:20:33 +0000 (+0000) Subject: * tests/sh.test: look for `$Xsed' without `$echo "X...' X-Git-Tag: release-1-2f~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0762ab0a481e2f374554d7774549311af81a555c;p=thirdparty%2Flibtool.git * tests/sh.test: look for `$Xsed' without `$echo "X...' * ltconfig.in, ltmain.in: fixed a few such occurrences --- diff --git a/ChangeLog b/ChangeLog index 788451103..a5ba5d24b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 1999-03-13 Alexandre Oliva + * tests/sh.test: look for `$Xsed' without `$echo "X...' + * ltconfig.in, ltmain.in: fixed a few such occurrences + * ltmain.in (-static, -all-static): revert March 11's patch, I was barking up the wrong tree diff --git a/ltconfig.in b/ltconfig.in index e1a04f6a7..ecb2c6ec5 100755 --- a/ltconfig.in +++ b/ltconfig.in @@ -377,7 +377,7 @@ fi if test -z "$srcdir"; then # Assume the source directory is the same one as the path to LTMAIN. - srcdir=`$echo "$ltmain" | $Xsed -e 's%/[^/]*$%%'` + srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'` test "$srcdir" = "$ltmain" && srcdir=. fi @@ -2384,8 +2384,7 @@ case "$ltmain" in case "$ltecho" in *'\$0 --fallback-echo"') - ltecho=`$echo "X$ltecho" | - $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac diff --git a/ltmain.in b/ltmain.in index b60f22e6e..dc98e7220 100644 --- a/ltmain.in +++ b/ltmain.in @@ -1046,7 +1046,7 @@ compiler." ;; -R*) - xrpath="$xrpath "`echo "X$arg" | $Xsed -e 's/^-R//'` + xrpath="$xrpath "`$echo "X$arg" | $Xsed -e 's/^-R//'` continue ;; @@ -1163,7 +1163,7 @@ compiler." temp_deplibs= for deplib in $dependency_libs; do case "$deplib" in - -R*) temp_xrpath=`echo "X$deplib" | $Xsed -e 's/^-R//'` + -R*) temp_xrpath=`$echo "X$deplib" | $Xsed -e 's/^-R//'` case " $rpath $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; @@ -1841,8 +1841,7 @@ EOF potliblink=`ls -ld $potlib | sed 's/.* -> //'` case "$potliblink" in /*) potlib="$potliblink";; - *) potlib=`$echo "X$potlib" \ - | $Xsed -e 's,[^/]*$,,'`"$potliblink";; + *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" \ @@ -1945,7 +1944,7 @@ EOF # Ensure that we have .o objects for linkers which dislike .lo # (e.g. aix) incase we are running --disable-static for obj in $libobjs; do - oldobj=`echo $obj | $Xsed -e "$lo2o"` + oldobj=`$echo "X$obj" | $Xsed -e "$lo2o"` test -f $oldobj || ${LN_S} $obj $oldobj done @@ -1961,7 +1960,7 @@ EOF # Extract the objects. xdir="$xlib"x generated="$generated $xdir" - xlib=`echo "$xlib" | $Xsed -e 's%^.*/%%'` + xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` $show "${rm}r $xdir" $run ${rm}r "$xdir" @@ -2530,7 +2529,7 @@ static const void *lt_preloaded_setup() { if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then - relink_command=`echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` + relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= @@ -2791,7 +2790,7 @@ fi\ # Extract the objects. xdir="$xlib"x generated="$generated $xdir" - xlib=`echo "$xlib" | $Xsed -e 's%^.*/%%'` + xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` $show "${rm}r $xdir" $run ${rm}r "$xdir" diff --git a/tests/sh.test b/tests/sh.test index 99a92d89c..370aad90d 100755 --- a/tests/sh.test +++ b/tests/sh.test @@ -50,4 +50,10 @@ if egrep -n -e '[^ ]=[^ ].*(break|continue)' $scripts; then status=1 fi +# Check for uses of Xsed without corresponding echo "X +if egrep -n -e '\$Xsed' $scripts | egrep -v -n -e '\$echo \\*"X'; then + echo "occurrences of \`\$Xsed\' without \`echo \"X\' on the same line" + status=1 +fi + exit $status