3 ms·
> Having said that, you could certainly list system headers in a Makefile You can. But that's a lot of headers. You can instruct gcc to tell the dependencies t
by jnxx 6y ago
> Having said that, you could certainly list system headers in a Makefile
You can. But that's a lot of headers. You can instruct gcc to tell the dependencies to you, but this information is hard to pipe into make because you'd need to generate a new Makefile from it (which is more or less what some larger projects do).
Using redo it is easy to use this compiler-generated dependency information, and the paramount reason for this is that it is not a DAG dependency graph DSL with added shell snippets but just a shell script with added shell commands which define dependencies. This is what I mean with "it is Make turned inside out".
- dllthomas 6y agoI should note that in general, decomposing things into multiple shell utilities is something I'm a huge proponent of, and assuming redo does it well that's really cool! That said, I don't think "depending on system headers" is somewhere make is lacking. The -M argument to gcc or clang gives you a well formatted Makefile which includes system headers. You have to explicitly ask they be excluded (-MM) if that's what you want (which it was often enough for the option to be added, it seems).