[Top][All Lists]

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

Re: Phony targets and pattern rules

From: Paul Smith
Subject: Re: Phony targets and pattern rules
Date: Sat, 06 Sep 2014 13:45:53 -0400

On Sat, 2014-09-06 at 19:38 +0200, Frank Heckenbach wrote:
> I know that specific rules take precendence over pattern rules (e.g.
> if I had a rule "foobar:;", I wouldn't expect the echo to run), as
> the documentation says: "The rules you write take precedence over
> those that are built in." But here foobar has no specific rule, just
> appears as a pseudo-prerequisite of ".PHONY".
> Apparently this is enough to prevent make from using the pattern
> rule as well, but I couldn't find this mentioned in the
> documentation, so I wonder whether it's meant to be so or a bug?

The manual chapter on phony targets sez:

        Since it knows that phony targets do not name actual files that
        could be remade from other files, `make' skips the implicit rule
        search for phony targets (*note Implicit Rules::).  This is why
        declaring a target phony is good for performance, even if you
        are not worried about the actual file existing.

reply via email to

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