make-alpha
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CVS psmith make: Various cleanups reported by people using the alpha


From: Paul D. Smith
Subject: Re: CVS psmith make: Various cleanups reported by people using the alpha release.
Date: Tue, 9 Jul 2002 02:41:28 -0400

%% Greg McGary <address@hidden> writes:

  gm> I determined that this is a generic failure.  Observe this makefile,
  gm> adapted from the order-only test by removing the use of the order-only
  gm> feature.  This test should be added to the testsuite.

I investigate this.  The value is not placed in $? because make doesn't
bother to check the mtime of the target.  Since the target is phony,
make internally tracks it with a special flag and doesn't bother trying
to stat() the file either before or after invoking the rule.

So, make doesn't really know whether the prerequisite is newer than the
target or not; the way the code works out it assumes it never is newer.

The other possibility would be to assume it is always newer.  That might
be more correct, I don't know; however, the whole idea of defining a
normal prerequisite of a target to be .PHONY is pretty broken (the
manual specifically recommends against this) so I'm not too worried
about it.  I rewrote the tests to avoid the issue.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]