top | item 39761568

(no title)

bjkchoy | 1 year ago

SCons is listed as a meta build system here, but it is clearly an end-to-end build system. It seems to me SCons even fits all the requirements listed by the author. Plus, you program your SCons build using Python.

He also describes the dynamic discovery of header dependencies of Ninja as a hack. It is true that it is a special case to handle a specific type of dynamic dependencies. But the basic idea behind it (using the compiler's diagnostic as the source of truth) is sane and efficient. The alternative is to scan the sources using a custom parser, which is slower and more fragile.

discuss

order

jason_s|1 year ago

> The alternative is to scan the sources using a custom parser, which is slower and more fragile.

More fragile, yes, but I dispute the "slower" aspect. waf does this very well. In C you don't need to parse the entire program structure, you just need to parse what the preprocessor does.

Also there's a difference between the complete set of header dependencies (notably #include statements within an #if or #ifdef) and a more sane but incomplete methodology for #include statements (don't do it within #if/#ifdef). Not sure whether this is a big enough difference to try to matter.

gavinhoward|1 year ago

You can definitely use the actual compiler with a more general build system with dynamic dependencies.