Quoting Junio C Hamano [off-list ref]
If your product ships as one main executable _dynamically_ linked with two
dynamic libraries, and all three components are built from the source
material under your source control, obviously you would need to make sure
that the above version.o or some equivalent of what embeds output from
"git describe HEAD" are linked to the main executable and to the two
libraries, but the idea is the same.
Doesn't the above strategy also apply to the case where the
libraries are linked statically, too? You get the version
string from the main program and two version strings from the
libraries embedded in the final product.
--
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/