%% Darren Hiebert <[EMAIL PROTECTED]> writes:
dh> Paul D. Smith wrote:
>> Hmm. Are you using Irix "cp" to do this? If so, this may be a bug in
>> the Irix "cp" command. Maybe.
>> If you're using another cp, then that's probably your problem...
dh> Good idea. I checked and found, by putting explicit paths to cp in
dh> the makefile that /usr/bin/cp, /sbin/cp, and /usr/freeware/bin/cp
dh> (GNU fileutils 3.16) all exhibit the same behavior.
:(
>> GNU make 3.79 uses the nanosecond field of struct stat, if the system
>> provides it. If the version of "cp -p" you're using doesn't correctly
>> copy the value of the nanosecond timestamp field over along with the
>> rest of the timestamp, you'd get the behavior you describe (because "a"
>> has a timestamp of x.00010 seconds (for example), while "b" has a
>> timestamp of x.00000 seconds).
dh> I presume your implying that this behavior is new to make-3.79.
Yes.
dh> Is there a later version of GNU cp which copies across the
dh> nanosecond field also? It seems that even the SGI versions do not.
Not sure. I think I saw a new GNU fileutils released just a couple of
days ago. I don't know whether it supports nanosecond timestamps or
not.
Mind you, I'm entirely guessing based solely on this email; the
hypothesis I've made fits the results you see but you'd have to
experiment to determine if this is _actually_ the problem.
One thing you can do is hand-edit the config.h file in the GNU make
distro and #undef (or comment out the #define) of ST_MTIM_NSEC. Rebuild
make and see if the problem goes away.
Another thing you can do is write a little test program (you'll have to
use C as I don't think perl, etc. support this field either) that shows
the values of st_mtime and st_mtim.tv_nsec (or whatever your system
uses, I don't have an Irix system handy; the ST_MTIM_NSEC macro above
will be set to the proper value) returned by stat(2), then run it on a
file, and then on a copy created with "cp -p", and see what the
nanosecond field shows.
--
-------------------------------------------------------------------------------
Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at:
http://www.gnu.org http://www.ultranet.com/~pauld/gmake/
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist