In order to avoid release version strings in non-git builds, by default --version on non-tagged commits now also prints 'development build' as the 2nd line

This commit is contained in:
Wolfgang Bumiller 2013-01-11 10:37:54 +01:00
parent 88cfa53dc2
commit 5ea710e317
2 changed files with 4 additions and 0 deletions

View file

@ -45,6 +45,8 @@
#define GMQCC_VERSION_BUILD(J,N,P) (((J)<<16)|((N)<<8)|(P))
#define GMQCC_VERSION \
GMQCC_VERSION_BUILD(GMQCC_VERSION_MAJOR, GMQCC_VERSION_MINOR, GMQCC_VERSION_PATCH)
/* Undefine the following on a release-tag: */
#define GMQCC_VERSION_TYPE_DEVEL
/*
* We cannot rely on C99 at all, since compilers like MSVC

2
main.c
View file

@ -53,6 +53,8 @@ static void version() {
);
#ifdef GMQCC_GITINFO
con_out("git build: %s\n", GMQCC_GITINFO);
#elif defined(GMQCC_VERION_TYPE_DEVEL)
con_out("development build\n");
#endif
}