From: Wolfgang Bumiller Date: Thu, 10 Jan 2013 15:13:47 +0000 (+0100) Subject: checking if git even is available X-Git-Tag: before-library~325 X-Git-Url: http://git.xonotic.org/?a=commitdiff_plain;h=16ccaffc3fad36d1fd6436d746f8c688d5f85cc6;p=xonotic%2Fgmqcc.git checking if git even is available --- diff --git a/Makefile b/Makefile index 1d8b1c4..85848e4 100644 --- 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)