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 <[email protected]> wrote: >> Date: Tue, 9 Nov 2010 14:26:40 +0330 >> From: ali hagigat <[email protected]> >> >> 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. > _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
