%% Darren Hiebert <[EMAIL PROTECTED]> writes:

  dh> I encountered a strange bug when make-3.79 is used on IRIX 6.5,

  dh> # Begin Makefile
  dh> #DATE=-d "19 Dec 1994"

  dh> b: a
  dh>   cp -p $< $@

  dh> a:
  dh>   touch $(DATE) a
  dh> # End Makefile

  dh> Note that every time you run make after the first time, it tries to
  dh> rebuild file b, even though the file is up to date. It seems to be a
  dh> problem of when the dates are exactly the same, it is considered to
  dh> be out of date.

  dh> What makes the problem strange is that if the original file "a"
  dh> has a timestamp earlier than 1/1/2000, the bug is not exhibited.
  dh> This may be demonstrated by uncommenting the DATE macro in the
  dh> above makefile.

  dh> Note that this bug does not appear with make-3.77 or make-3.78.1 on
  dh> IRIX 6.5. Nor does it appear on Linux with any version of make.

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...

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).

-- 
-------------------------------------------------------------------------------
 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

Reply via email to