Add some info about git commit when printing the version.

Also modify dependency generation to be a side-effect of compilation.
It's still not quite perfect in picking up some changes (in particular
just after a commit, no files have changed but the git identification
is now different).
This commit is contained in:
Olaf Seibert
2015-07-06 21:43:03 +02:00
parent ce2d526291
commit 80b20b17eb
4 changed files with 41 additions and 6 deletions

View File

@@ -1,9 +1,17 @@
#ifndef MACRO11_H
#define MACRO11_H
#define VERSIONSTR "0.4wip (22 May 2015)"
#include "git-info.h"
#define BASE_VERSION "0.4wip"
#if defined(GIT_VERSION)
#define VERSIONSTR BASE_VERSION" ("GIT_VERSION"\n\t"GIT_AUTHOR_DATE")"
#else
#define VERSIONSTR BASE_VERSION" (21 June 2015)"
/*#define VERSIONSTR "0.3 (April 21, 2009)" */
/*#define VERSIONSTR "0.2 July 15, 2001" */
#endif
/*