]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - Makefile
Copying arg counter into the local
[xonotic/gmqcc.git] / Makefile
index 52e7270fd66a705fe4e8c9b87f89791c4406a55d..33b77c9d9fe564193a0c5c83c1237d1ee4b844a9 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)
@@ -148,10 +150,8 @@ all: $(GMQCC) $(QCVM) $(TESTSUITE)
 
 check: all
        @ ./$(TESTSUITE)
-
-# alias to check because test.o exists and people will get confused
-# about the undefined references to X.
 test: check
+       @ ./$(TESTSUITE)
 
 clean:
        rm -f *.o $(GMQCC) $(QCVM) $(TESTSUITE) *.dat