On Tue, Oct 21, 2025 at 7:35 AM Dmitry Goncharov
<[email protected]> wrote:>
This rule-is-already-in-use check (that accompanies " Avoiding
implicit rule recursion for rule...")
> takes place before checking whether a rule matches the target.
> It is cheaper to check rule-is-already-in-use than to figure out if a rule 
> matches.
Thank you, this was a missing piece in my understanding of the
"Implicit Rule Search Algorithm."
It was not clear to me at what point the rule-is-already-in-use check runs.
There is no sign of this in "10.8 Implicit Rule Search Algorithm."
In 10.4 Chains of Implicit Rules, it says:
"No single implicit rule can appear more than once in a chain. This
means that make will not even consider such a ridiculous thing as
making foo from foo.o.o by running the linker twice. This constraint
has the added benefit of preventing any infinite loop in the search
for an implicit rule chain."

But it was not easy for me to figure out that it works exactly as you
explained above.

Reply via email to