[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Potential Bug: `.PHONY` targets and order-only prerequisites
From: |
Paul Smith |
Subject: |
Re: Potential Bug: `.PHONY` targets and order-only prerequisites |
Date: |
Sat, 21 May 2022 19:11:58 -0400 |
User-agent: |
Evolution 3.44.1 (by Flathub.org)) |
On Sat, 2022-05-21 at 14:34 -0400, Dmitry Goncharov wrote:
> On Sat, May 21, 2022 at 12:25 PM Paul Smith <psmith@gnu.org> wrote:
> > Maybe what you're saying is that make should throw an error or
> > warning if you try to add an order-only prerequisite to a phony
> > target, telling you that it will have no effect on your makefile?
>
> Having a phony target depend (usually indirectly, but there are
> examples of immediate dependency) on an order-only prerequisite is
> quite common. This happens when the top target is marked phony and
> there is an order-only prerequisite down the graph.
Agreed we would never mention an indirect dependency. That is not an
invalid use of order-only prerequisites anyway; the order-only
prerequisite will be relevant only for its immediate target not
"parents" of that target and if the immediate target is not phony then
the o-o prerequisite is entirely valid there.
I can't think of a reason to add an order-only prerequisite directly to
a phony target on purpose, but I suppose it could happen as the result
of some variable expansion or something which is annoying to avoid.
But I do not plan to add any sort of warning like this at the moment.
- Re: Potential Bug: `.PHONY` targets and order-only prerequisites, (continued)
- Re: Potential Bug: `.PHONY` targets and order-only prerequisites, Martin Dorey, 2022/05/17
- Re: Potential Bug: `.PHONY` targets and order-only prerequisites, Paul Smith, 2022/05/17
- Re: Potential Bug: `.PHONY` targets and order-only prerequisites, Jacob Kopczynski, 2022/05/18
- Re: Potential Bug: `.PHONY` targets and order-only prerequisites, Paul Smith, 2022/05/18
- Re: Potential Bug: `.PHONY` targets and order-only prerequisites, Jacob Kopczynski, 2022/05/18
- Re: Potential Bug: `.PHONY` targets and order-only prerequisites, Dmitry Goncharov, 2022/05/18
- Re: Potential Bug: `.PHONY` targets and order-only prerequisites, Paul Smith, 2022/05/21
- Re: Potential Bug: `.PHONY` targets and order-only prerequisites, Alejandro Colomar, 2022/05/21
- Re: Potential Bug: `.PHONY` targets and order-only prerequisites, Paul Smith, 2022/05/21
- Re: Potential Bug: `.PHONY` targets and order-only prerequisites, Dmitry Goncharov, 2022/05/21
- Re: Potential Bug: `.PHONY` targets and order-only prerequisites,
Paul Smith <=