I've got a C++ project that happens to be stored in a Bazaar repo. This project also uses a #define
'd string to display its version number. Someone just asked if we could simply tie this displayed version number to the bzr repo revision number.
So, in pseudo-C, pseudo-bash, something like:
#define VERSION_STRING "revision $(bzr revno)"
//...
cout << "Starting " << VERSION_STRING;
Or so. How might you answer this question? Does the makefile run a script that inserts the output of that command into the appropriate source file? Is there a macro solution for this? Etc?
I'm open to any and all clever solutions, as I'm drawing an educated blank on this one. =D