%% "Albert L. Ting" <[EMAIL PROTECTED]> writes:
alt> Not sure if this is a solaris bug or a make bug, but it works
alt> fine in make-3.78.1. It appears make now treats targets with the
alt> same timestamp as the prerequisite as out of date. That didn't
alt> happen with make-3.78.1.
alt> test:
alt> /bin/rm -f bar foo
alt> touch bar
alt> cp -p bar foo
This is actually a deficiency in "cp -p". Unfortunately, I know of no
way to fix it.
The problem is that on systems that support <1s timestamps (micro or
nanosecond timestamps), make now can take advantage of this; this is
important on fast systems because files and their prerequisites can have
the same timestamp at 1s granularity.
The problem is, while stat(2) etc. will allow you to retrieve timestamps
at that accuracy, there is no system call I'm aware of that will let you
_set_ timestamps at that accuracy (oops!)
So, "cp -p" can't copy the micro or nanosecond field, and so "cp -p"
cannot create a copy of a file with exactly the same timestamp as the
original, so make, on systems where nanoseconds are supported, won't
work well in conjunction with "cp -p".
I don't know what to do about this other than add a note to the README,
which I've done for the next release.
I've been considering adding a configure option to disable nanosecond
timestamps for those who need "cp -p" to work, but haven't done so yet.
--
-------------------------------------------------------------------------------
Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at:
http://www.gnu.org http://www.paulandlesley.org/gmake/
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist