The bash script now adds a #define if the current checkout is exactly on a tag, and it leaves all #defines empty if building from a tarball. The batch file still needs to be updated.