help-make
[Top][All Lists]
Advanced

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

Re: .LOW_RESOLUTION_TIME


From: ali hagigat
Subject: Re: .LOW_RESOLUTION_TIME
Date: Wed, 10 Nov 2010 08:52:05 +0330

Sorry but one sentence of the document does not make sense related to
Eli's example as it is saying:

"The high resolution file time stamps of many modern file systems
lessen the chance of make incorrectly concluding that a file is up to
date."

The time-stamp of 'src' is like 10:25:32.890 and 'dst' is 10:25:32.
So 'src' is newer than 'dst' and 'dst' needs to be updated and make
concludes that the file is out of date!!

So I think the manual should be corrected as follows:
"The high resolution file time stamps of many modern file systems
lessen the chance of make incorrectly concluding that a file is out of
date."

On Tue, Nov 9, 2010 at 5:40 PM, Eli Zaretskii <address@hidden> wrote:
>> Date: Tue, 9 Nov 2010 14:26:40 +0330
>> From: ali hagigat <address@hidden>
>>
>> cp -p src dst
>>
>> Since ‘cp -p’ discards the subsecond part of ‘src’’s time stamp, ‘dst’
>> is typically slightly older than ‘src’ even when it is up to date.
>> The .LOW_RESOLUTION_TIME line causes make to consider ‘dst’ to be up
>> to date if its time stamp is at
>> the start of the same second that ‘src’’s time stamp is in.
>> ----------------------------------------------------------------
>> When we used -p , it means preserve time-stamp, so how ‘dst’ is
>> typically slightly older than ‘src’ ?
>
> It's a misfeature of (some versions of) `cp': it preserves the time
> stamp only to the seconds resolution, and discards the milliseconds
> part.  So if the original file was time-stamped 10:25:32.890, the
> copied file will have the time-stamp of 10:25:32, which is 890
> milliseconds older.
>
>> And concerning the last statement:
>> if the time stamp of 'dst' is at the start of the same second that
>> ‘src’’s time stamp is in, so the both time-stamps are the same and
>> 'dst' is up-to-date, why we need  .LOW_RESOLUTION_TIME to say that
>> 'dst' is up-to-date?
>
> Because Make compares time stamps as numbers, including the
> milliseconds part.
>



reply via email to

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