Rather then spread VERSION= defines throughout all the makefiles, put the base version in version_base.in. Use that to generate a version.h that includes the base version as well as the detailed version.