]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
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 1d8b1c42d38a8203728598ec78618ce419d58f95..85848e437aafc5db31ad6476b405537d0a27afae 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)