Em ter., 30 de mai. de 2023 às 16:05, Mathias Stearn <redbeard0531+isocpp@gmail.com> escreveu:
So I did a bit of digging and I now think it is possible to get restat-like behavior out of make. The "trick" is to use a separate recursive make invocation for scanning vs building.

I am now confused about another bit. And I'm not sure how that works for ninja either.

If the output of the dependency scan maintains the same timestamp, won't the next run think the dependency file is still out of date to its inputs and cause yet another run of the dependency scan? 

I guess we could have the scan rule have a "side-effect" that keeps the state as of the last time it actually changed, but the actual target is output to a file that represents the last run. But that means the dependency chain is broken and the system doesn't quite know where that "side-effect" comes from.

daniel