]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
In order to avoid release version strings in non-git builds, by default --version...
authorWolfgang Bumiller <blub@speed.at>
Fri, 11 Jan 2013 09:37:54 +0000 (10:37 +0100)
committerWolfgang Bumiller <blub@speed.at>
Fri, 11 Jan 2013 09:40:33 +0000 (10:40 +0100)
gmqcc.h
main.c

diff --git a/gmqcc.h b/gmqcc.h
index e4a800abcde9683b08402c1c9ff941846f8632d1..1f0e066815a06655587e2240b10c320cabcf45b8 100644 (file)
--- 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 ff0e41dc7f3adc30ef38fbda0d79c61ae2df13c1..d14acf0b828024c7c2af0a1902d69d5d36fae0f7 100644 (file)
--- 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
 }