diff --git a/linux/Makefile b/linux/Makefile index a85041d3e81..43395306855 100644 --- a/linux/Makefile +++ b/linux/Makefile @@ -13,6 +13,7 @@ OBJS = $(patsubst %.c,%.$(OEXT),$(SRCS)) TARGET = libtokuportability.$(AEXT) build install: $(LIBPORTABILITY) + cd tests;$(MAKE) build $(LIBPORTABILITY): $(TARGET) if ! diff $< $@ 2>/dev/null; then cp $< $@; fi diff --git a/linux/tests/Makefile b/linux/tests/Makefile index 7a9453f04e7..c1da36a8468 100644 --- a/linux/tests/Makefile +++ b/linux/tests/Makefile @@ -2,6 +2,9 @@ CPPFLAGS = -D_GNU_SOURCE CPPFLAGS += -I../../toku_include -I.. -I. CFLAGS = -Wall -Werror -g -O0 -std=c99 +ifneq ($(GCOV),) + CFLAGS += -fprofile-arcs -ftest-coverage -DGCOV +endif LDFLAGS = ../libtokuportability.a -lpthread SRCS = $(wildcard test-*.c) TARGETS = $(patsubst %.c,%,$(SRCS)) @@ -29,7 +32,8 @@ all: $(TARGETS) test-gettime: test-gettime.c $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< $(LDFLAGS) -lrt -.PHONY: check +.PHONY: check build +build: $(TARGETS) check: $(TARGETS) $(RUNTARGETS); %.tdbrun: %