help-make
[Top][All Lists]
Advanced

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

Re: inappropriate warning on Solaris?


From: David Boyce
Subject: Re: inappropriate warning on Solaris?
Date: Thu, 9 Dec 2010 17:25:42 -0500

On Thu, Dec 9, 2010 at 5:13 PM, Paul Smith <address@hidden> wrote:
> On Wed, 2010-12-08 at 21:23 -0500, David Boyce wrote:
>> As shown, the target does have a relatively hi-res timestamp but the
>> prereq is even higher (001666000 vs 001666797). Essentially, Solaris
>> cp -p chops off just the nanosecond part. It looks to me like make's
>> algorithm for deciding to give a warning is too simplistic and/or
>> Linux-centric. Is this a minor bug or am I missing something?
>
> It's not about whether a timestamp is higher; it's about whether it's
> high-resolution (that is, the sub-second part of the timestamp is set)
> or not.

Right, I understand, but where is the official definition of "low" and
"high" resolution? On Solaris, apparently, "high" means 9 decimal
places and "low" means 6. You (make) are assuming that "low" means 0
decimal places. Seems to me this warning should either be adjusted per
platform or removed, because as far as I can see I'm using it
correctly and being told that I'm not, with no way out of the bind
(other than to rewrite my makefile to not use cp -p). Come to think of
it I wonder if

        mv $< $@ && cp -p $@ $<

might be a workaround, so the prereq would have the truncated
timestamp and look older. As long as it's within a filesystem that
might work. Not exactly elegant or obvious though.

David Boyce



reply via email to

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