-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Description
I'd like to add proper dependency checking into the build.
The most basic form involves the use of the -MMD gcc flag which causes the compiler to produce .d files along with the .o files. The .d files then basically add something like:
somefile.o: somefile.c header1.h heder2.h ...etc...
The second, more advanced form of dependency checking is used by the linux kernel build system, and it makes the options passed on the command line factor into the build.
The basic dependency checking does:
if a source file, or any of the header files use by the source file change, then rebuild the object.
The more advance form adds in:
if the command line used to build an object changes, then rebuild the object.
I'd be happy to add either or both of these to the build.