On Thu, Nov 18 2021, Johannes Schindelin wrote: > On Tue, 16 Nov 2021, Jeff King wrote: > >> I wondered if contrib/buildsystems/CMakeLists would need a similar >> fixup, but it doesn't have any generated header dependencies at all (not >> for hook-list.h, but not for the existing command-list.h). So I'll >> assume it's fine (as did cfe853e66b). > > The strategy we take in our CMake-based configuration is for files like > hook-list.h to be generated at _configure_ time, i.e. before the build > definition file is written, i.e. well before the build. That's why there > is no explicit dependency, it's not necessary. It is necessary, otherwise how will it know to re-generate the hook-list.h if its source of truth changes? I.e. if we add a new hook. Ditto for a new built-in, config variable etc. I understand that the answer is that cmake (or at least our use of it) doesn't even try to solve the same problem as the Makefile does, i.e. to declare dependencies and to be capable of incremental builds. It's more of a one-shot command where you'll need to run its equivalent of "make clean" before you recompile. Correct?