Some testing for valgrind in the makefile

This commit is contained in:
Dale Weiler 2013-08-16 07:33:57 +00:00
parent 89893f9a24
commit d5d38e94ef
2 changed files with 11 additions and 1 deletions

View file

@ -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

View file

@ -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