automake-patches
[Top][All Lists]
Advanced

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

Re: [Mingw-users] perl symlink oddity


From: Ralf Wildenhues
Subject: Re: [Mingw-users] perl symlink oddity
Date: Sat, 5 Dec 2009 14:17:42 +0100
User-agent: Mutt/1.5.20 (2009-10-28)

[ adding automake-patches; please remove (subscription-only) mingw-users
  from replies unless it is on-topic there; this is
  <http://thread.gmane.org/gmane.comp.gnu.mingw.user/31574> ]

* Ralf Wildenhues wrote on Fri, Dec 04, 2009 at 07:43:42AM CET:
> * Charles Wilson wrote on Fri, Dec 04, 2009 at 05:38:21AM CET:
> > There's a lot of stuff related to symlinks that is just not going to
> > work as expected on MSYS.

> That's ok with me.  All I would think is that symlink should return a
> failure status if it could not create the target file, either due to the
> dirname part of the target file does not exist as a directory, or due to
> the source file not existing.

I'm queuing this for the Automake maint branch, for master and
branch-1.11.

Cheers,
Ralf

    Do not rely on Perl symlink status, for MSYS perl.
    
    * automake.in (require_file_internal): Ensure presence of
    symlink target file; MSYS perl symlink doesn't return an error
    status when the file could not be created (copied, on this
    system).  Fixes symlink.test failure.

diff --git a/automake.in b/automake.in
index e7f2cac..871c98e 100755
--- a/automake.in
+++ b/automake.in
@@ -7838,7 +7838,8 @@ sub require_file_internal ($$$@)
                      unlink ($fullfile) if -f $fullfile;
                      if ($symlink_exists && ! $copy_missing)
                        {
-                         if (! symlink ("$libdir/$file", $fullfile))
+                         if (! symlink ("$libdir/$file", $fullfile)
+                             || ! -e $fullfile)
                            {
                              $suppress = 0;
                              $trailer = "; error while making link: $!";




reply via email to

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