libtool-patches
[Top][All Lists]
Advanced

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

Re: CVS Head - patch to remove extraneous code in temp_rpath calcs.


From: Gary V. Vaughan
Subject: Re: CVS Head - patch to remove extraneous code in temp_rpath calcs.
Date: Mon, 29 Nov 2004 12:44:50 +0000
User-agent: Mozilla Thunderbird 0.9 (X11/20041103)

Hi Bob!

Bob Friesenhahn wrote:
> The following patch removes code which is no longer needed.  Ok to apply?

We can simplify more than that now:

> --- config/ltmain.m4sh    28 Nov 2004 19:55:40 -0000    1.27
> +++ config/ltmain.m4sh    29 Nov 2004 03:14:53 -0000
> @@ -3516,7 +3516,6 @@
>          if test -n "$shlibpath_var"; then
>            # Make sure the rpath contains only unique directories.
>            case "$temp_rpath " in
> -          *" $dir "*) ;;
>            *" $absdir "*) ;;
>            *) temp_rpath="$temp_rpath $absdir" ;;
>            esac

This hunk can become:

           if test -n "$shlibpath_var"; then
             # Make sure the rpath contains only unique directories.
             case ":$rpath:" in
               *":$absdir:"*) ;;
               *) rpath="$rpath$absdir:" ;;
             esac

And the next hunk will then delete everything between:

     if test -n "$shlibpath_var"; then
        ...
     fi

instead of all this fuss for replacing ' ' with ':':

> @@ -5490,26 +5489,7 @@
>      # We should set the shlibpath_var
>      rpath=
>      for dir in $temp_rpath; do
> -      case $dir in
> -      [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
> -        # Absolute path.
> -        rpath="$rpath$dir:"
> -        ;;
> -      *)
> -        # Relative path: add a thisdir entry.
> -        case "$output" in
> -        *[[\\/]]*)
> -          # the output file is not in the current dir
> -          # so we need an absolute path.
> -          absdir=`cd "$dir" && pwd`
> -          rpath="$rpath$absdir:"
> -          ;;
> -        *)
> -          rpath="$rpath\$thisdir/$dir:"
> -          ;;
> -        esac
> -        ;;
> -      esac
> +      rpath="$rpath$dir:"
>      done
>      temp_rpath="$rpath"
>        fi

There is also another reference to temp_rpath further on which can be
replaced by $rpath easily enough.

However, isn't there a bug here too?  What happens on Windows when $absdir
is C:\Program Files\MinGW\lib?  I think we need to have a $PATHSEP_CHAR
and use that carefully no?

Cheers,
        Gary.
-- 
Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://tkd.kicks-ass.net
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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