4 ms·
> Ninja looks like it tracks dependencies roughly automatically, whereas dependencies are manual in Make Ninja has built-in support for the ".d" files generate
by drothlis 6y ago
> Ninja looks like it tracks dependencies roughly automatically, whereas dependencies are manual in Make
Ninja has built-in support for the ".d" files generated by gcc's "-M" family of flags, but you still have to make your gcc command-line actually pass the right flags, and you have to tell Ninja the name of the ".d" file. See https://lwn.net/Articles/706404/ https://lwn.net/Articles/706404/
Another neat feature of Ninja is that it's much better at "pruning" downstream targets if you rebuilt something (because of an out-of-date timestamp) but then it turned out to be bit-for-bit identical as it was before. In this case, downstream targets that depend on this intermediate target don't need to be rebuilt.