From 5ea710e317f01bccc754b66454d6c2ae07fa2e76 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Fri, 11 Jan 2013 10:37:54 +0100 Subject: [PATCH] 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 --- gmqcc.h | 2 ++ main.c | 2 ++ 2 files changed, 4 insertions(+) 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 } -- 2.39.2