bug-make
[Top][All Lists]
Advanced

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

Re: Order-only Prerequisites Suppress some Error Checking


From: Paul Smith
Subject: Re: Order-only Prerequisites Suppress some Error Checking
Date: Tue, 22 Apr 2008 09:57:05 -0400

On Tue, 2008-04-22 at 09:41 -0400, Tony Strauss wrote:
> To put it another way, imagine that order-only prerequisites were
> specified through a different syntax mechanism that did not look like
> an ordinary rule to gmake.  Would this (should this) order-only
> prerequisite count as a "real rule" for section 4.7 purposes, given
> that no statement for how the target actually is built has been made?

Yes, if it were then what you say could be true.  But, in fact, the way
make has implemented this feature and order-only prerequisite is a
prerequisite, just with a special flag that says it should be ignored
for the purposes of determining out-of-date-ness.  For all other
behaviors it is treated identically to a normal prerequisite.

So, for example, you could, and many people do, write:

        $(DERIVED_OBJ_DIR)/test.o : some-file | $(DERIVED_OBJ_DIR)

Your version is just a degenerate case of the more generic version,
where the "normal prerequisites" list is empty.  It still defines a
target and a rule for that target, exactly the same way it would if you
wrote:

        $(DERIVED_OBJ_DIR)/test.o : $(DERIVED_OBJ_DIR)

(only the way the prerequisite is handled at the end is a bit
different).

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.mad-scientist.us
 "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]