libtool-patches
[Top][All Lists]
Advanced

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

Re: 115-gary-libtoolize-copy-fix.patch


From: Ralf Wildenhues
Subject: Re: 115-gary-libtoolize-copy-fix.patch
Date: Tue, 1 Mar 2005 08:48:34 +0100
User-agent: Mutt/1.4.1i

Hi Gary,

(working on mail backlog..)

* Gary V. Vaughan wrote on Tue, Feb 22, 2005 at 02:19:39PM CET:
|
|  # func_copy_cb filename srcdir destdir
| -# A wrapper for func_copy that accepts arguments in the order
| -# used by func_copy_all_files callbacks.
| +# If option `--copy' was specified, or soft-linking SRCFILE to DESTFILE 
fails,
| +# then try to copy SRCFILE to DESTFILE (without changing the timestamp if
| +# possible).
|  func_copy_cb ()
|  {
|      $opt_debug
| -    func_copy "$2/$1" "$3/$1"
| +    my_file="$1"
| +    my_srcdir="$2"
| +    my_destdir="$3"
| +    copy_return_status=1
| +
| +    # Libtool is probably misinstalled if this happens:
| +    test -f "$my_srcdir/$my_file" || \
| +      { func_error "\`$my_file' not found in \`$my_srcdir'"; return; }
| +
| +    func_mkdir_p "$my_destdir"
| +
| +    $RM "$my_destdir/$my_file"
| +    if $opt_link && $LN_S "$my_srcdir/$my_file" "$my_destdir/$my_file"; then
| +      $opt_quiet || func_echo "copying file \`$my_destdir/$my_file'"
| +      copy_return_status=0
| +    elif { ( cd "$my_srcdir" && $TAR cf - "$my_file" > /dev/null 2>&1; ) \
| +        | ( cd "$my_destdir" && "$TAR" xf - > /dev/null 2>&1; ) } ; then

Just don't ever let anyone put relative symlinks into $my_srcdir..

| +      $opt_quiet || func_echo "copying file \`$my_destdir/$my_file'"
| +      copy_return_status=0
| +    elif $CP -p "$my_srcdir/$my_file" "$my_destdir/$my_file"; then
| +      $opt_quiet || func_echo "copying file \`$my_destdir/$my_file'"
| +      copy_return_status=0
| +    else
| +      func_error "can not copy \`$my_srcdir/$my_file' to \`$my_destdir/'"
| +      exit_status=$EXIT_FAILURE
| +    fi
|  }

Cheers,
Ralf




reply via email to

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