summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohn Hawthorn <john.hawthorn@gmail.com>2014-09-21 14:23:01 -0700
committerJohn Hawthorn <john.hawthorn@gmail.com>2014-09-27 16:50:06 -0700
commitcd1fb348588c12d44e13d3322373a44a9517598b (patch)
tree394368b48757e599a249b3e23cd2ac357c3dce17 /Makefile
parent882051d38efbcf9162cda0a7f857170728ed500e (diff)
Easy way to run tests with valgrind
VALGRIND="valgrind --leak-check=full" make test
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 20f3e61..7b3cead 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,7 @@ CFLAGS+=-Wall -Wextra -g -std=c99 -O3 -pedantic
PREFIX?=/usr/local
MANDIR?=$(PREFIX)/share/man
BINDIR?=$(PREFIX)/bin
+VALGRIND?=
INSTALL=install
INSTALL_PROGRAM=$(INSTALL)
@@ -16,7 +17,7 @@ fzytest: fzytest.o match.o choices.o
$(CC) $(CFLAGS) $(CCFLAGS) -o $@ $^
test: fzytest
- -./fzytest
+ -$(VALGRIND) ./fzytest
fzy: fzy.o match.o tty.o choices.o
$(CC) $(CFLAGS) $(CCFLAGS) -o $@ $^