I build for more than two dozen targets from a source tree with usually three active branches with both production and debug builds. To date I've used a personal Makefile that defines the target which includes a common Makefile that defines the compile flags which then includes the Makefile from a specific source tree. This works but I can't help but thinking there's a better way.
I'd like to use a sqlite3 database to store and organize a full list of build flags. At compile time the database would be queried to generate to generate flags based on project version, platform and dev/production and start the build.
This database would be a single place where I can document and keep track my current settings for all my development builds. A base set of stored flags would be overridden by more granular flags at version, target platform, then build quality levels.
As part of implementing something like this I would also create a handful of shell scripts to manipulate the database and get/set flags as well as permit other developers in my lab adopt this more easily.
Has this already been done? Are there any examples of something like this?
Is there a different/better way to handle this?
Two things: * I cannot modify the original project Makefiles. * Attempting to use something like automake would be cumbersome as the necessary number of configure flags to enable a debugging level in an existing module of the code base would number in the hundreds.