[Top][All Lists]

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

Re: bootstrap symlink dependencies

From: Jim Meyering
Subject: Re: bootstrap symlink dependencies
Date: Sat, 14 May 2011 10:41:51 +0200

Paul Eggert wrote:

>> If something treats symlink mtime as significant,
>> then I suspect that it's at fault.
> Yes, there's something busted there.  GNU 'make' does the right thing:
> it follows symlinks when checking time stamps.  Is some other 'make'
> is being used, or perhaps some tool other than 'make'?
>> That looks like a good change to me, but maybe
>> Paul (the author of that part, I think) knows more.
> Well, if my (admittedly vague) memory serves, the checks are present
> for the opposite problem with broken 'make' implementations, where
> they do unnecessary work merely because symlink timestamps changed.
>> Alternatively, avoid a subshell+ls while retaining semantics like this:
>> (untested)
>>   inums=`ls -diL "$src" 2>/dev/null` && set $inums &&
>>   test "$1" = "$3" || {
> I assumme you meant 'ls -diL "$src" "$dst"' there?


> But this won't work if the file names contain spaces.

Good point.  But this does:

  inums=`ls -1diL "$src" "$dst" 2>/dev/null|sed 's/ .*//'` && set $inums &&
  test "$1" = "$2" || {

However, it could still fail for any name containing a newline.

reply via email to

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