4 ms·
Going on a tangent here, but properly integrating support for such "discovered" dependencies in GNU Make can get a bit complicated. In particular, you probably
by AceJohnny2 3y ago
Going on a tangent here, but properly integrating support for such "discovered" dependencies in GNU Make can get a bit complicated.
In particular, you probably want to use `-include` instead of `include`, to continue even a given .dep file doesn't exist (as on the first run).
The GNU Make maintainer wrote in-depth about ways to do it here:
https://make.mad-scientist.net/papers/advanced-auto-dependency-generation/ https://make.mad-scientist.net/papers/advanced-auto-dependen...
- jjgreen 3y agoI think you can get away with 'include' here -- the (Gnu only?) make behaviour on trying to include a non-existent file is to look for a target which creates that file, then running it if found, then to try the include again. This has other applications: if your Common.mk is generated by autoconf (say), then default: all Common.mk: $(error Not configured) include Common.mk gives a nicer error message if you 'make' having not './configure'd