checking if git even is available
authorWolfgang Bumiller <blub@speed.at>
Thu, 10 Jan 2013 15:13:47 +0000 (16:13 +0100)
committerWolfgang Bumiller <blub@speed.at>
Thu, 10 Jan 2013 15:13:47 +0000 (16:13 +0100)
Makefile

index 1d8b1c4..85848e4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -10,7 +10,9 @@ MINGW   = $(findstring MINGW32, $(UNAME))
 
 CC     ?= clang
 CFLAGS += -Wall -Wextra -I. -fno-strict-aliasing -fsigned-char
-CFLAGS += -DGMQCC_GITINFO="\"`git describe`\""
+ifneq ($(shell git describe --always 2>/dev/null),)
+    CFLAGS += -DGMQCC_GITINFO="\"$(shell git describe --always)\""
+endif
 #turn on tons of warnings if clang is present
 # but also turn off the STUPID ONES
 ifeq ($(CC), clang)