We use GNU Make for our system. At the end of our makefiles, we have an include called Makedepends that generates a bunch of .d files using the -MM switch to gcc. Then we include the .d file for each .cc file using the include line (CXXFILES: .cc = .d). But when we delete the file or move the files, the dependency step is interrupted, and we must manually delete the .d files (even make clean does not work because the dependencies fail)
Is there a way to generate these .d dependency files or include these .d file dependencies that will gracefully handle file deletion or movement?
EDIT: For example: I have serial.cc, and the make files generate a serial.d file that has a dependency on buffer.h, but then I change it, so I no longer need buffer.h and I delete the buffer.hour. The next time I run make, it will suffocate because it includes the .d file, which still makes serial.o dependent on buffer.h.
source
share