Ramsay Jones <ramsay@xxxxxxxxxxxxxxxxxxxx> writes: > Commit ef3ca95475 ("Add missing includes and forward declarations", > 2018-08-15) resulted from the author employing a manual method to > create a C file consisting of a pair of pre-processor #include > lines (for 'git-compat-util.h' and a given toplevel header), and > fixing any resulting compiler errors or warnings. It makes sense to have tool do what we do not have to do manually. One thing that makes me wonder with the patch is that the new check command does not seem to need to see what is on CFLAGS and friends. Having seen that "make DEVELOPER=1" adds more -W... on the command line of the compiler and makes a build fail on a source that otherwise would build, I am wondering if there are some (subset of) options that the header-check command line wants to give to the compiler. Of course, there are also conditionally compiled sections of code, which are affected by the choice of -DMACRO=VALUE; how does this new feature handle that? > Add a Makefile target to automate this process. This implementation > relies on the '-include' and '-xc' arguments to the 'gcc' and 'clang' > compilers, which allows us to effectively create the required C > compilation unit on-the-fly. This limits the portability of this > solution to those systems which have such a compiler.