I have some C++ code base, documented with doxygen, and build with GNU make. Version information is centralized in makefile, where I have something like:
the commands manual suggests that $(VARIABLE) expands environment variables. So maybe you can put your version in an environment variable?
$(VARIABLE)