Parallel to my game development, I'm also managing unit testing as a separate project. This project is mostly made of several source files each with their own main(). Each file basically contains the unit tests for a class or routine in my main project.
I'm doing the unit tests development with the Crimson Editor and using my own makefile to control the build process. Crimson Editor also has a very low memory footprint so I can have it open alongside SlickEdit without any meaningful impact on my already low resources.
Anyways, this setup presents me with a problem.
I want the makefile to describe the target prerequisites in the most detailed fashion (with the exception for library headers). The Make documentation describes a solution involving .d files (one for each source file) and the use of the gcc -MM switch.
This seems a little overwhelming. All of a sudden I duplicate the number of files I need to source control and otherwise manage. Does anyone actually do this? I never saw it anywhere on SourceForge CVS, for instance.
Is there a better way?
Currently I'm thinking developing some small executable that simply traverses my sources tree looking for source files, call gcc -MM on them and grab the output to generate the makefile. I can then run it everytime I know I need to update the prerequisites. The extra work of calling the executable doesn't bother me. It's just that I only simplified the process. I still have the problem of not having automated it.