On 9/22/26 3:59 PM, Dmitry Goncharov wrote:
On Tue, Sep 22, 2026 at 2:58 PM Jon Forrest <[email protected]> wrote:

I've been thinking about what this means. What is gained (or lost)
by treating each prerequisite as a target rather than checking
each prerequisite when a rule is being evaluated? Or, are they
functionally the same, and only affect error messages?

Not clear what you mean by "checking each prerequisite" or what you
mean by "they".

I have a mental model of how all this works. Please let me know
if it's wrong.

"Checking each prerequisite" means making sure that any files the
prerequisite mentions exist (among other things).

"They" means the two approaches we're discussing.

Make builds a dependency graph by reading the makefile. Then, make
descends to the lowest vertex and starts building targets from
prerequisites. At this point if a prerequisite doesn't exist,
and there's no deeper rule for it, then the error message I mentioned
is generated.

You can observe it yourself in action by specifying --debug=i.

This generates way too much output to be useful due to all the builtin
rules.
Are you in the U.S.?

Thanks,
Jon



Reply via email to