> 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
