From: Dale Weiler Date: Fri, 16 Aug 2013 07:33:57 +0000 (+0000) Subject: Some testing for valgrind in the makefile X-Git-Tag: v0.3.0~14 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d5d38e94ef7865883cada0098746bd0896d69863;p=xonotic%2Fgmqcc.git Some testing for valgrind in the makefile --- diff --git a/BSDmakefile b/BSDmakefile index b537444..5e2dc21 100644 --- a/BSDmakefile +++ b/BSDmakefile @@ -4,6 +4,7 @@ .include "include.mk" GITTEST != git describe --always 2>/dev/null +VALTEST != valgrind --version 2>/dev/null GITINFO := .if $(GITTEST) @@ -34,6 +35,11 @@ CFLAGS += -Wall -Wextra -Werror -Wstrict-aliasing . endif .endif +.if !$(VALTEST) + CFLAGS += -DNVALGRIND +.endif + + CFLAGS += -DGMQCC_GITINFO=\"$(GITINFO)\" $(OPTIONAL) DEPS != for i in $(OBJ_C) $(OBJ_P) $(OBJ_T) $(OBJ_X); do echo $$i; done | sort | uniq diff --git a/Makefile b/Makefile index c174b91..7f9a3b1 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,11 @@ else endif ifneq ($(shell git describe --always 2>/dev/null),) - CFLAGS += -DGMQCC_GITINFO="\"$(shell git describe --always)\"" + CFLAGS += -DGMQCC_GITINFO="\"$(shell git describe --always)\"" +endif + +ifeq ($(shell valgrind --version 2>/dev/null),) + CFLAGS += -DNVALGRIND endif # do this last otherwise there is whitespace in the command output and