libtool-patches
[Top][All Lists]
Advanced

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

Re: eval $show when we $run eval


From: Peter O'Gorman
Subject: Re: eval $show when we $run eval
Date: Thu, 14 Oct 2004 23:13:09 +0900
User-agent: Mozilla Thunderbird 0.7.3 (Macintosh/20040803)

Gary V. Vaughan wrote:

Hmmm.... maybe $command contains " marks too :-(  If that is a
possibility
then $command must be passed through func_quote_for_eval():

   func_quote_for_eval "$command"
   eval \$show \"$func_quote_for_eval_result\"


Oh no, I just committed it to both HEAD and branch-2-0. It did pass all
it's tests, but I'll get around to making these modifications tomorrow.


Okay, thanks.

While you are in the region of the lines that can use it (on HEAD), I have
been playing around with the following function in another project:

# func_verbose_eval command [args] ...
func_verbose_eval ()
{

Oh, I'm way too wimpy for that. I reverted the majority of my last commit, just adding the func_quote_for_eval and the eval \$show to the shared library building bit.

Patch attached. In both HEAD and branch-2-0. By the way, I fixed my postfix, but my commit messages aren't coming to the list either. Do I have to use a different From address?

Peter
--
Peter O'Gorman - http://www.pogma.com
Index: ChangeLog
2004-10-14  Peter O'Gorman  <address@hidden>

        * config/ltmain.m4sh: Revert most of my last commit, only eval
        \$show \"$cmds\", and only when building a library. I'm a wimp.
        Thanks Gary for pointing out errors in previous commit.

from  Gary V. Vaughan  <address@hidden>
Index: config/ltmain.m4sh
===================================================================
RCS file: /cvsroot/libtool/libtool/config/ltmain.m4sh,v
retrieving revision 1.9
diff -u -3 -p -u -r1.9 ltmain.m4sh
--- config/ltmain.m4sh 13 Oct 2004 16:06:49 -0000 1.9
+++ config/ltmain.m4sh 14 Oct 2004 14:07:00 -0000
@@ -1276,7 +1276,7 @@ EOF
 
       $run $RM "$lobj" "$output_obj"
 
-      eval $show "$command"
+      $show "$command"
       if $run eval "$command"; then :
       else
        test -n "$output_obj" && $run $RM $removelist
@@ -1348,7 +1348,7 @@ EOF
       # Suppress compiler output if we already did a PIC compilation.
       command="$command$suppress_output"
       $run $RM "$obj" "$output_obj"
-      eval $show "$command"
+      $show "$command"
       if $run eval "$command"; then :
       else
        $run $RM $removelist
@@ -1563,7 +1563,7 @@ func_mode_finish ()
          for cmd in $cmds; do
            IFS="$save_ifs"
            eval cmd=\"$cmd\"
-           eval $show "$cmd"
+           $show "$cmd"
            $run eval "$cmd" || admincmds="$admincmds
        $cmd"
          done
@@ -1813,7 +1813,7 @@ func_mode_install ()
          fi
 
          func_warning "relinking \`$file'"
-         eval $show "$relink_command"
+         $show "$relink_command"
          $run eval "$relink_command" || \
            func_fatal_error "error: relink \`$file' with the above command 
before installing it"
        fi
@@ -1829,10 +1829,10 @@ func_mode_install ()
          test -n "$relink_command" && srcname="$realname"T
 
          # Install the shared library and build the symlinks.
-         eval $show "$install_prog $dir/$srcname $destdir/$realname"
+         $show "$install_prog $dir/$srcname $destdir/$realname"
          $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
          if test -n "$stripme" && test -n "$striplib"; then
-           eval $show "$striplib $destdir/$realname"
+           $show "$striplib $destdir/$realname"
            $run eval "$striplib $destdir/$realname" || exit $?
          fi
 
@@ -1841,7 +1841,7 @@ func_mode_install ()
            for linkname
            do
              if test "$linkname" != "$realname"; then
-               eval $show "(cd $destdir && $RM $linkname && $LN_S $realname 
$linkname)"
+               $show "(cd $destdir && $RM $linkname && $LN_S $realname 
$linkname)"
                $run eval "(cd $destdir && $RM $linkname && $LN_S $realname 
$linkname)"
              fi
            done
@@ -1854,7 +1854,7 @@ func_mode_install ()
          for cmd in $cmds; do
            IFS="$save_ifs"
            eval cmd=\"$cmd\"
-           eval $show "$cmd"
+           $show "$cmd"
            $run eval "$cmd" || exit $?
          done
          IFS="$save_ifs"
@@ -1863,7 +1863,7 @@ func_mode_install ()
        # Install the pseudo-library for information purposes.
        name=`$ECHO "X$file" | $Xsed -e 's%^.*/%%'`
        instname="$dir/$name"i
-       eval $show "$install_prog $instname $destdir/$name"
+       $show "$install_prog $instname $destdir/$name"
        $run eval "$install_prog $instname $destdir/$name" || exit $?
 
        # Maybe install the static library, too.
@@ -1897,7 +1897,7 @@ func_mode_install ()
 
        # Install the libtool object if requested.
        if test -n "$destfile"; then
-         eval $show "$install_prog $file $destfile"
+         $show "$install_prog $file $destfile"
          $run eval "$install_prog $file $destfile" || exit $?
        fi
 
@@ -1906,7 +1906,7 @@ func_mode_install ()
          # Deduce the name of the old-style object file.
          staticobj=`$ECHO "X$file" | $Xsed -e "$lo2o"`
 
-         eval $show "$install_prog $staticobj $staticdest"
+         $show "$install_prog $staticobj $staticdest"
          $run eval "$install_prog \$staticobj \$staticdest" || exit $?
        fi
        exit $EXIT_SUCCESS
@@ -2005,7 +2005,7 @@ func_mode_install ()
              # Replace the output file specification.
              relink_command=`$ECHO "X$relink_command" | $Xsed -e 
'address@hidden@%'"$outputname"'%g'`
 
-             eval $show "$relink_command"
+             $show "$relink_command"
              if $run eval "$relink_command"; then :
              else
                func_error "error: relink \`$file' with the above command 
before installing it"
@@ -2039,7 +2039,7 @@ func_mode_install ()
          esac
          ;;
        esac
-       eval $show "$install_prog$stripme $file $destfile"
+       $show "$install_prog$stripme $file $destfile"
        $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
        test -n "$outputname" && ${RM}r "$tmpdir"
        ;;
@@ -2052,11 +2052,11 @@ func_mode_install ()
       # Set up the ranlib parameters.
       oldlib="$destdir/$name"
 
-      eval $show "$install_prog $file $oldlib"
+      $show "$install_prog $file $oldlib"
       $run eval "$install_prog \$file \$oldlib" || exit $?
 
       if test -n "$stripme" && test -n "$old_striplib"; then
-       eval $show "$old_striplib $oldlib"
+       $show "$old_striplib $oldlib"
        $run eval "$old_striplib $oldlib" || exit $?
       fi
 
@@ -2066,7 +2066,7 @@ func_mode_install ()
       for cmd in $cmds; do
        IFS="$save_ifs"
        eval cmd=\"$cmd\"
-       eval $show "$cmd"
+       $show "$cmd"
        $run eval "$cmd" || exit $?
       done
       IFS="$save_ifs"
@@ -3649,7 +3649,7 @@ func_mode_link ()
              for cmd in $cmds; do
                IFS="$save_ifs"
                eval cmd=\"$cmd\"
-               eval $show "$cmd"
+               $show "$cmd"
                $run eval "$cmd" || exit $?
              done
              IFS="$save_ifs"
@@ -3663,7 +3663,7 @@ func_mode_link ()
              for cmd in $cmds; do
                IFS="$save_ifs"
                eval cmd=\"$cmd\"
-               eval $show "$cmd"
+               $show "$cmd"
                $run eval "$cmd" || exit $?
              done
              IFS="$save_ifs"
@@ -4910,7 +4910,7 @@ EOF
              eval cmd=\"$cmd\"
              if len=`expr "X$cmd" : ".*"` &&
               test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; 
then
-               eval $show "$cmd"
+               $show "$cmd"
                $run eval "$cmd" || exit $?
                skipped_export=false
              else
@@ -5086,7 +5086,7 @@ EOF
            save_ifs="$IFS"; IFS='~'
            for cmd in $concat_cmds; do
              IFS="$save_ifs"
-             eval $show "$cmd"
+             $show "$cmd"
              $run eval "$cmd" || {
                lt_exit=$?
 
@@ -5144,7 +5144,8 @@ EOF
        for cmd in $cmds; do
          IFS="$save_ifs"
          eval cmd=\"$cmd\"
-         eval $show "$cmd"
+         func_quote_for_eval "$cmd"
+         eval \$show \"$func_quote_for_eval_result\"
          $run eval "$cmd" || {
            lt_exit=$?
 
@@ -5256,7 +5257,7 @@ EOF
       for cmd in $cmds; do
        IFS="$save_ifs"
        eval cmd=\"$cmd\"
-       eval $show "$cmd"
+       $show "$cmd"
        $run eval "$cmd" || exit $?
       done
       IFS="$save_ifs"
@@ -5293,7 +5294,7 @@ EOF
        for cmd in $cmds; do
          IFS="$save_ifs"
          eval cmd=\"$cmd\"
-         eval $show "$cmd"
+         $show "$cmd"
          $run eval "$cmd" || exit $?
        done
        IFS="$save_ifs"
@@ -5477,7 +5478,7 @@ EOF
        link_command="$compile_command$compile_rpath"
 
        # We have no uninstalled library dependencies, so finalize right now.
-       eval $show "$link_command"
+       $show "$link_command"
        $run eval "$link_command"
        status=$?
 
@@ -5544,7 +5545,7 @@ EOF
        # Delete the old output file.
        $run $RM $output
        # Link the executable and exit
-       eval $show "$link_command"
+       $show "$link_command"
        $run eval "$link_command" || exit $?
        exit $EXIT_SUCCESS
       fi
@@ -5577,7 +5578,7 @@ EOF
       # Delete the old output files.
       $run $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
 
-      eval $show "$link_command"
+      $show "$link_command"
       $run eval "$link_command" || exit $?
 
       # Now create the wrapper script.
@@ -6257,7 +6258,7 @@ fi\
       for cmd in $cmds; do
        eval cmd=\"$cmd\"
        IFS="$save_ifs"
-       eval $show "$cmd"
+       $show "$cmd"
        $run eval "$cmd" || exit $?
       done
       IFS="$save_ifs"
@@ -6514,7 +6515,7 @@ func_mode_uninstall ()
              for cmd in $cmds; do
                IFS="$save_ifs"
                eval cmd=\"$cmd\"
-               eval $show "$cmd"
+               $show "$cmd"
                $run eval "$cmd"
                if test "$?" -ne 0 && test "$rmforce" != yes; then
                  exit_status=1
@@ -6530,7 +6531,7 @@ func_mode_uninstall ()
              for cmd in $cmds; do
                IFS="$save_ifs"
                eval cmd=\"$cmd\"
-               eval $show "$cmd"
+               $show "$cmd"
                $run eval "$cmd"
                if test "$?" -ne 0 && test "$rmforce" != yes; then
                  exit_status=1

reply via email to

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