Commit 7803e0c4 authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul

"A more complete solution to Ticket #105

We want to be able to do 
 make VGRIND=
and not end up having the extra valgrind parameters passed around.
Addresses #105.


git-svn-id: file:///svn/tokudb@904 c7de825b-a66e-492c-adef-691d508d4ae1
parent 67f7cf35
...@@ -13,22 +13,26 @@ endif ...@@ -13,22 +13,26 @@ endif
ifeq ($(OSX),OSX) ifeq ($(OSX),OSX)
#Note: OSX 10.4 needs DYLD_LIBRARY_PATH. OSX 10.5 claims to support -rpath. #Note: OSX 10.4 needs DYLD_LIBRARY_PATH. OSX 10.5 claims to support -rpath.
LIBEXT=dylib LIBEXT=dylib
VGRIND= VGRIND=
BDB_SUPPRESSIONS= BDB_SUPPRESSIONS=
TDB_LOADLIBES = -L../ -ldb TDB_LOADLIBES = -L../ -ldb
SETTOKUENV=export DYLD_LIBRARY_PATH=.. SETTOKUENV=export DYLD_LIBRARY_PATH=.. ;
UNSETTOKUENV=unset DYLD_LIBRARY_PATH UNSETTOKUENV=unset DYLD_LIBRARY_PATH ;
else else
SETTOKUENV=true SETTOKUENV=
UNSETTOKUENV=true UNSETTOKUENV=
LIBEXT=so LIBEXT=so
ifdef BDBDIR ifdef BDBDIR
BDB_LDFLAGS += -Wl,-rpath,$(BDBDIR)/lib -lpthread BDB_LDFLAGS += -Wl,-rpath,$(BDBDIR)/lib -lpthread
endif
TDB_LOADLIBES = -L../ -ldb -Wl,-rpath,..
VGRIND=valgrind --quiet --error-exitcode=1 --leak-check=yes
endif endif
TDB_LOADLIBES = -L../ -ldb -Wl,-rpath,.. ifeq ($(VGRIND),)
VGRIND=valgrind --quiet --error-exitcode=1 --leak-check=yes BDB_SUPPRESSIONS =
BDB_SUPPRESSIONS = --suppressions=bdb.supressions --gen-suppressions=all else
BDB_SUPPRESSIONS = --suppressions=bdb.supressions --gen-suppressions=all
endif endif
# VERBOSE=true # VERBOSE=true
...@@ -77,15 +81,15 @@ endif ...@@ -77,15 +81,15 @@ endif
# The @ sign makes the make quiet. If there is an error there is enough info to tell what test failed. # The @ sign makes the make quiet. If there is an error there is enough info to tell what test failed.
%.bdbrun: %.bdb %.bdbrun: %.bdb
ifdef VERBOSE ifdef VERBOSE
$(UNSETTOKUENV); $(VGRIND) $(BDB_SUPPRESSIONS) ./$< $(VERBVERBOSE) $(UNSETTOKUENV) $(VGRIND) $(BDB_SUPPRESSIONS) ./$< $(VERBVERBOSE)
else else
@ $(UNSETTOKUENV); $(VGRIND) $(BDB_SUPPRESSIONS) ./$< @ $(UNSETTOKUENV) $(VGRIND) $(BDB_SUPPRESSIONS) ./$<
endif endif
%.tdbrun: %.tdb %.tdbrun: %.tdb
ifdef VERBOSE ifdef VERBOSE
$(SETTOKUENV); $(VGRIND) ./$< $(VERBVERBOSE) $(SETTOKUENV) $(VGRIND) ./$< $(VERBVERBOSE)
else else
@ $(SETTOKUENV); $(VGRIND) ./$< @ $(SETTOKUENV) $(VGRIND) ./$<
endif endif
# For a few of the tests bdb is making valgrind unhappy. # For a few of the tests bdb is making valgrind unhappy.
...@@ -114,9 +118,9 @@ NO_VGRIND = db_env_open_nocreate \ ...@@ -114,9 +118,9 @@ NO_VGRIND = db_env_open_nocreate \
$(patsubst %,test_%.bdbrun,$(NO_VGRIND)): VGRIND= $(patsubst %,test_%.bdbrun,$(NO_VGRIND)): VGRIND=
%.bdb: %.c %.bdb: %.c
$(UNSETTOKUENV); cc -DDIR=\"dir.$<.bdb\" $(BDB_CPPFLAGS) -DUSE_BDB $(CFLAGS) $< $(BDB_LDFLAGS) -ldb -o $@ $(UNSETTOKUENV) cc -DDIR=\"dir.$<.bdb\" $(BDB_CPPFLAGS) -DUSE_BDB $(CFLAGS) $< $(BDB_LDFLAGS) -ldb -o $@
%.tdb: %.c %.tdb: %.c
$(SETTOKUENV); cc -DDIR=\"dir.$<.tdb\" -DUSE_TDB $(CFLAGS) $(TDB_CPPFLAGS) $(TDB_LOADLIBES) $< -o $@ $(SETTOKUENV) cc -DDIR=\"dir.$<.tdb\" -DUSE_TDB $(CFLAGS) $(TDB_CPPFLAGS) $(TDB_LOADLIBES) $< -o $@
.PHONY: %.recover .PHONY: %.recover
all.recover: test_log2.recover test_log3.recover all.recover: test_log2.recover test_log3.recover
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment