]> de.git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
GMQCC_GITINFO
authorWolfgang Bumiller <blub@speed.at>
Fri, 28 Dec 2012 19:39:30 +0000 (20:39 +0100)
committerWolfgang Bumiller <blub@speed.at>
Fri, 28 Dec 2012 19:39:30 +0000 (20:39 +0100)
Makefile
gmqcc.h

index 7c9bedee91a3b5e532a26aa0485a560ec0c03f8f..0e23a92a3b9b204ec4af272c6bbe20e1cc8f119d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -10,6 +10,7 @@ MINGW   = $(findstring MINGW32, $(UNAME))
 
 CC     ?= clang
 CFLAGS += -Wall -Wextra -I. -fno-strict-aliasing -fsigned-char
+CFLAGS += -DGMQCC_GITINFO="`git describe`"
 #turn on tons of warnings if clang is present
 # but also turn off the STUPID ONES
 ifeq ($(CC), clang)
diff --git a/gmqcc.h b/gmqcc.h
index 27d32f77acd2341ff23d3613a298b03f46a232b0..fe9e8a04d4da5e029745a0654ad9a4539ae3710f 100644 (file)
--- a/gmqcc.h
+++ b/gmqcc.h
 #define GMQCC_VERSION \
     GMQCC_VERSION_BUILD(GMQCC_VERSION_MAJOR, GMQCC_VERSION_MINOR, GMQCC_VERSION_PATCH)
 
+#ifndef GMQCC_GITINFO
+# define GMQCC_GITINFO "(no git info)"
+#endif
+
 /*
- * We cannoy rely on C99 at all, since compilers like MSVC
+ * We cannot rely on C99 at all, since compilers like MSVC
  * simply don't support it.  We define our own boolean type
  * as a result (since we cannot include <stdbool.h>). For
  * compilers that are in 1999 mode (C99 compliant) we can use