From: Wolfgang Bumiller Date: Fri, 11 Jan 2013 09:37:54 +0000 (+0100) Subject: In order to avoid release version strings in non-git builds, by default --version... X-Git-Tag: before-library~310 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5ea710e317f01bccc754b66454d6c2ae07fa2e76;p=xonotic%2Fgmqcc.git 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 --- diff --git a/gmqcc.h b/gmqcc.h index e4a800a..1f0e066 100644 --- a/gmqcc.h +++ b/gmqcc.h @@ -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 diff --git a/main.c b/main.c index ff0e41d..d14acf0 100644 --- a/main.c +++ b/main.c @@ -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 }