Commit 141ef2ea authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul Committed by Yoni Fogel

Clean up the MAYBEATSIGN and verbosity stuff. Fixes #1365.

git-svn-id: file:///svn/toku/tokudb.1032b+1343@8573 c7de825b-a66e-492c-adef-691d508d4ae1
parent 75cd8fe7
......@@ -40,7 +40,7 @@ check: $(CHECKS)
clean: $(patsubst %,%.dir.clean,$(SRCDIRS)) cleanlib
cleanlib:
$(MAYBEATSIGN)rm -rf lib/*.$(SOEXT) lib/*.$(AEXT) lib/*.bundle
rm -rf lib/*.$(SOEXT) lib/*.$(AEXT) lib/*.bundle
install:
./install.bash
......
# -*- Mode: Makefile -*-
VGRIND = valgrind
OPTFLAGS = -O3
CFLAGS = $(OPTFLAGS) -Wall -W -Wcast-align -Wbad-function-cast -Wextra -Wmissing-noreturn -Wmissing-format-attribute -g3 -ggdb3 -Werror -fPIC -Wshadow -fvisibility=hidden
CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_XOPEN_SOURCE=500
LDFLAGS = -lz
DIRS = newbrt src
# src cxx utils db-benchmark-test db-benchmark-test-cxx
include $(patsubst %,$(ROOT)%/Makefile.include,$(DIRS))
ifeq ($(VERBOSE),2)
VERBVERBOSE=-v
MAYBEATSIGN=
else
ifeq ($(VERBOSE),1)
VERBVERBOSE=-q
MAYBEATSIGN=
else
VERBVERBOSE=-q
MAYBEATSIGN=@
endif
endif
ifneq ($(OSX),)
LIBEXT=dylib
SHARED=-dynamiclib
RPATHNAME=-install_name @rpath/$(LIBRARY)
CFLAGS+=-fno-common
else
LIBEXT=so
SHARED=-shared $(EXPORTMAP)
RPATHNAME=
endif
LIBRARY=$(LIBNAME).$(LIBEXT)
TLIBRARY=$(TLIBNAME).$(LIBEXT)
ifeq ($(CYGWIN),cygwin)
else
FPICFLAGS = -fPIC
# valgrind is not present on cygwin
VGRIND = valgrind --quiet --error-exitcode=1 --leak-check=yes
endif
.PHONY: %.check
%.check: %
$(VGRIND) ./$< $(VERBVERBOSE)
......@@ -43,7 +43,7 @@ test1: test1.o dbt.o db.o dbenv.o ../lib/libdb.a
$(LIBNAME).a: $(OBJS)
$(AR) cr $@ $(OBJS)
clean:
$(MAYBEATSIGN)rm -f $(OBJS) $(LIBNAME).a $(LIBNAME).so *.gcno *.gcda *.gcov
$(MAYBEATSIGN)cd tests && $(MAKE) clean
rm -f $(OBJS) $(LIBNAME).a $(LIBNAME).so *.gcno *.gcda *.gcov
cd tests && $(MAKE) clean
......@@ -53,7 +53,7 @@ $(DBCXX):
cd ..;make
clean:
$(MAYBEATSIGN)rm -rf $(TARGETS) *.gcno *.gcda *.gcov *.db dir.test.db.assoc3 test_reverse_compare_fun.cpp.dir
rm -rf $(TARGETS) *.gcno *.gcda *.gcov *.db dir.test.db.assoc3 test_reverse_compare_fun.cpp.dir
check_test1: test1
$(VGRIND) ./$< $(SUMMARIZE_CMD)
......
......@@ -57,7 +57,7 @@ check-x: $(TARGET_TDB)
$(VALGRIND) ./$(TARGET_TDB) -x $(QUIET) $(SUMMARIZE_CMD)
clean:
$(MAYBEATSIGN)rm -rf $(TARGETS) $(BENCHDBS) *.gcno *.gcda *.gcov
rm -rf $(TARGETS) $(BENCHDBS) *.gcno *.gcda *.gcov
db-benchmark-test-tokudb: ../lib/libtokudb_cxx.a
db-benchmark-test-tokudb: db-benchmark-test.cpp
......
......@@ -47,20 +47,20 @@ build.tdb: $(TARGET_TDB) $(SCANSCAN_TDB)
check: check-default check-xfast check-x
check-default: $(TARGET_TDB)
$(MAYBEATSIGN)$(VGRIND) ./$(TARGET_TDB) $(QUIET) $(SUMMARIZE_CMD)
$(VGRIND) ./$(TARGET_TDB) $(QUIET) $(SUMMARIZE_CMD)
check-x: $(TARGET_TDB)
$(MAYBEATSIGN)$(VGRIND) ./$(TARGET_TDB) $(QUIET) -x --xcount 1000 --periter 100000 --env x.dir 10 $(SUMMARIZE_CMD)
$(VGRIND) ./$(TARGET_TDB) $(QUIET) -x --xcount 1000 --periter 100000 --env x.dir 10 $(SUMMARIZE_CMD)
# A fast transaction test that detects #455.
check-xfast: $(TARGET_TDB)
$(MAYBEATSIGN)./$(TARGET_TDB) $(QUIET) --noserial -x --valsize 1000 --cachesize 8000000 --xcount 1000 --periter 20000 --env xfast.dir 1 $(SUMMARIZE_CMD)
./$(TARGET_TDB) $(QUIET) --noserial -x --valsize 1000 --cachesize 8000000 --xcount 1000 --periter 20000 --env xfast.dir 1 $(SUMMARIZE_CMD)
clean:
$(MAYBEATSIGN)rm -f $(TARGETS)
$(MAYBEATSIGN)rm -rf $(BENCHDBS)
rm -f $(TARGETS)
rm -rf $(BENCHDBS)
$(TARGET_TDB) $(SCANSCAN_TDB): BIN_FROM_C_FLAGS += -DDIRSUF=tokudb -I$(PORTABILITY_HEADERS) -I../include
......@@ -81,29 +81,29 @@ OFILES = \
#end
$(TARGET_TDB): db-benchmark-test.c
$(MAYBEATSIGN)$(CC) $< $(BIN_FROM_C_FLAGS) $(OFILES)
$(CC) $< $(BIN_FROM_C_FLAGS) $(OFILES)
$(SCANSCAN_TDB): scanscan.c
$(MAYBEATSIGN)$(CC) $< $(BIN_FROM_C_FLAGS) $(OFILES)
$(CC) $< $(BIN_FROM_C_FLAGS) $(OFILES)
else
$(TARGET_TDB) $(SCANSCAN_TDB): DLINK_FILES=$(TDB_DLINK_FILES)
ifeq ($(SOEXT),dll) #Windows does not support rpath.
$(TOKUDB): $(TOKUROOT)lib/$(TOKUDB)
$(MAYBEATSIGN)cp $< $@
cp $< $@
$(TOKUROOT)lib/$(TOKUDB):
$(MAYBEATSIGN)cd $(@D) && $(MAKE) $(@F).install
cd $(@D) && $(MAKE) $(@F).install
$(TARGET_TDB) $(SCANSCAN_TDB): $(TOKUDB)
endif
$(TARGET_TDB) $(SCANSCAN_TDB): RPATH_DIRS=$(dir $(TDB_DLINK_FILES))
$(TARGET_TDB): db-benchmark-test.c
$(MAYBEATSIGN)$(CC) $< $(BIN_FROM_C_FLAGS)
$(CC) $< $(BIN_FROM_C_FLAGS)
$(SCANSCAN_TDB): scanscan.c
$(MAYBEATSIGN)$(CC) $< $(BIN_FROM_C_FLAGS)
$(CC) $< $(BIN_FROM_C_FLAGS)
endif
$(TARGET_BDB): db-benchmark-test.c
$(MAYBEATSIGN)$(CC) $(CFLAGS) $(BDB_CPPFLAGS) $< -o $@ -DDIRSUF=bdb $(BDB_LDFLAGS)
$(CC) $(CFLAGS) $(BDB_CPPFLAGS) $< -o $@ -DDIRSUF=bdb $(BDB_LDFLAGS)
$(SCANSCAN_BDB): scanscan.c
$(MAYBEATSIGN)$(CC) $(CFLAGS) $(BDB_CPPFLAGS) $< -o $@ -DDIRSUF=bdb $(BDB_LDFLAGS)
$(CC) $(CFLAGS) $(BDB_CPPFLAGS) $< -o $@ -DDIRSUF=bdb $(BDB_LDFLAGS)
PARGS =
......
......@@ -106,8 +106,8 @@ WRONGAEXT=lib
SOEXT=so
WRONGSOEXT=dll
AR=ar
DBG_ARFLAGS=r
OPT_ARFLAGS=r
DBG_ARFLAGS=cr
OPT_ARFLAGS=cr
LINK=-l
DEPEND_COMPILE += \
$(TOKUROOT)include/db.h \
......@@ -279,48 +279,48 @@ endif
tags: cscope.out TAGS
TAGS: $(TOKUROOT)*/*.[ch] $(TOKUROOT)*/*/*.[ch] $(TOKUROOT)*/*/*/*.[ch]
$(MAYBEATSIGN)etags $(TOKUROOT)*/*.[ch] $(TOKUROOT)*/*/*.[ch] $(TOKUROOT)*/*/*/*.[ch]
etags $(TOKUROOT)*/*.[ch] $(TOKUROOT)*/*/*.[ch] $(TOKUROOT)*/*/*/*.[ch]
cscope.files: $(TOKUROOT)*/*.[ch] $(TOKUROOT)*/*/*.[ch] $(TOKUROOT)*/*/*/*.[ch]
$(MAYBEATSIGN)(echo $(TOKUROOT)*/*.[ch] $(TOKUROOT)*/*/*.[ch] $(TOKUROOT)*/*/*/*.[ch] | tr " " "\n") > $@ # Very long command line quieted.
(echo $(TOKUROOT)*/*.[ch] $(TOKUROOT)*/*/*.[ch] $(TOKUROOT)*/*/*/*.[ch] | tr " " "\n") > $@ # Very long command line quieted.
cscope.out: cscope.files $(TOKUROOT)*/*.[ch] $(TOKUROOT)*/*/*.[ch] $(TOKUROOT)*/*/*/*.[ch]
$(MAYBEATSIGN)$(CSCOPE) -qb
$(CSCOPE) -qb
.PHONY: clean clean-default %.dir.clean
clean: clean-default
%.dir.clean:
$(MAYBEATSIGN)cd $* && $(MAKE) -k clean
cd $* && $(MAKE) clean
clean-default:
$(MAYBEATSIGN)rm -f $(BINS) *.$(AEXT) *.$(SOEXT) *.$(OEXT)
$(MAYBEATSIGN)rm -f *.bb *.bbg *.da *.gcov *.gcno *.gcda
$(MAYBEATSIGN)rm -f *.exe *.obj *.pdb *.ilk
$(MAYBEATSIGN)rm -f *.exe.manifest *.dll.manifest
rm -f $(BINS) *.$(AEXT) *.$(SOEXT) *.$(OEXT)
rm -f *.bb *.bbg *.da *.gcov *.gcno *.gcda
rm -f *.exe *.obj *.pdb *.ilk
rm -f *.exe.manifest *.dll.manifest
#Prevent using the wrong extensions/target types (Otherwise prereqs get confused).
%$(WRONGBINSUF): %.c
$(MAYBEATSIGN)echo "Wrong target type: $@ should be $*$(BINSUF)" && false
echo "Wrong target type: $@ should be $*$(BINSUF)" && false
%$(WRONGBINSUF): %.$(WRONGOEXT)
$(MAYBEATSIGN)echo "Wrong target type: $@ should be $*$(BINSUF)" && false
echo "Wrong target type: $@ should be $*$(BINSUF)" && false
%.$(WRONGOEXT): %.c
$(MAYBEATSIGN)echo "Wrong target type: $@ should be $*.$(OEXT)" && false
echo "Wrong target type: $@ should be $*.$(OEXT)" && false
%.$(WRONGAEXT):
$(MAYBEATSIGN)echo "Wrong target type: $@ should be $*.$(AEXT)" && false
echo "Wrong target type: $@ should be $*.$(AEXT)" && false
%.$(WRONGSOEXT):
$(MAYBEATSIGN)echo "Wrong target type: $@ should be $*.$(SOEXT)" && false
echo "Wrong target type: $@ should be $*.$(SOEXT)" && false
ifeq ($(SKIP_LIBPORTABILITYRULE),)
ifeq ($(CYGWIN),)
$(LIBPORTABILITY): $(TOKUROOT)linux/*.[ch]
$(MAYBEATSIGN)cd $(TOKUROOT)linux && $(MAKE) install
cd $(TOKUROOT)linux && $(MAKE) install
else ifneq ($(CC),icc)
$(LIBPORTABILITY): $(TOKUROOT)linux/*.[ch]
$(MAYBEATSIGN)cd $(TOKUROOT)linux && $(MAKE) install
cd $(TOKUROOT)linux && $(MAKE) install
else
$(LIBPORTABILITY): $(TOKUROOT)windows/*.[ch]
$(MAYBEATSIGN)cd $(TOKUROOT)windows && $(MAKE) install
cd $(TOKUROOT)windows && $(MAKE) install
endif
endif
......@@ -330,7 +330,7 @@ LOCKTREE_LINEAR = $(TOKUROOT)src/lock_tree/locktree_linear.$(AEXT)
LOCKTREE_TLOG = $(TOKUROOT)src/lock_tree/locktree_tlog.$(AEXT)
LOCKTREE_LOG = $(TOKUROOT)src/lock_tree/locktree_log.$(AEXT)
$(LOCKTREE) $(LOCKTREE_LINEAR) $(LOCKTREE_TLOG) $(LOCKTREE_LOG): $(@D)*.[ch]
$(MAYBEATSIGN)cd $(@D) && $(MAKE) $(@F)
cd $(@D) && $(MAKE) $(@F)
endif
ifeq ($(SKIP_RANGETREERULE),)
......@@ -339,42 +339,42 @@ RANGETREE_LINEAR = $(TOKUROOT)src/range_tree/rangetree_linear.$(AEXT)
RANGETREE_TLOG = $(TOKUROOT)src/range_tree/rangetree_tlog.$(AEXT)
RANGETREE_LOG = $(TOKUROOT)src/range_tree/rangetree_log.$(AEXT)
$(RANGETREE) $(RANGETREE_LINEAR) $(RANGETREE_TLOG) $(RANGETREE_LOG): $(@D)*.[ch]
$(MAYBEATSIGN)cd $(@D) && $(MAKE) $(@F)
cd $(@D) && $(MAKE) $(@F)
endif
ifeq ($(SKIP_NEWBRTRULE),)
NEWBRT = $(TOKUROOT)newbrt/newbrt.$(AEXT)
NEWBRT_BUNDLE = $(TOKUROOT)newbrt/newbrt.bundle
$(NEWBRT): $(@D)*.[ch]
$(MAYBEATSIGN)cd $(@D) && $(MAKE) $(@F)
cd $(@D) && $(MAKE) $(@F)
endif
BIN_FROM_C_FLAGS =$(CFLAGS) $(CPPFLAGS) $(BINOUTPUT)$@ $(LDFLAGS)
BIN_FROM_C_FLAGS_NOLIB=$(CFLAGS) $(CPPFLAGS) $(BINOUTPUT)$@ $(LDFLAGS_NOLIB)
%$(BINSUF):%.c $(DEPEND_COMPILE) $(DEPEND_LINK)
$(MAYBEATSIGN)$(CC) $< $(BIN_FROM_C_FLAGS)
$(CC) $< $(BIN_FROM_C_FLAGS)
BIN_FROM_O_FLAGS =$(CFLAGS) $(CPPFLAGS) $(BINOUTPUT)$@ $(LDFLAGS)
BIN_FROM_O_FLAGS_NOLIB=$(CFLAGS) $(CPPFLAGS) $(BINOUTPUT)$@ $(LDFLAGS_NOLIB)
%$(BINSUF):%.$(OEXT) $(DEPEND_COMPILE) $(DEPEND_LINK)
$(MAYBEATSIGN)$(CC) $< $(BIN_FROM_O_FLAGS)
$(CC) $< $(BIN_FROM_O_FLAGS)
O_FROM_C_FLAGS= $(CFLAGS) $(CPPFLAGS) -c $(OOUTPUT)$@
%.$(OEXT):%.c $(DEPEND_COMPILE)
$(MAYBEATSIGN)$(CC) $< $(O_FROM_C_FLAGS)
$(CC) $< $(O_FROM_C_FLAGS)
%.$(AEXT):
$(MAYBEATSIGN)$(AR) $(ARFLAGS) $(AROUTPUT)$@ $(filter %.$(OEXT),$^) $(patsubst %.bundle, %.bundle/*.$(OEXT), $(filter-out %.$(OEXT),$^))
$(AR) $(ARFLAGS) $(AROUTPUT)$@ $(filter %.$(OEXT),$^) $(patsubst %.bundle, %.bundle/*.$(OEXT), $(filter-out %.$(OEXT),$^))
ifeq ($(AEXT),a)
%.bundle: %.$(AEXT)
$(MAYBEATSIGN)mkdir -p $@ && cd $@ && $(AR) x ../$(<F)
$(MAYBEATSIGN)touch $@
mkdir -p $@ && cd $@ && $(AR) x ../$(<F)
touch $@
else
#Windows lib cannot extract everything.
#Do a for loop and extract one at a time.
%.bundle: %.$(AEXT)
$(MAYBEATSIGN)mkdir -p $@ && cd $@ && for ofile in `lib /list ../$(<F) |dos2unix |grep -F obj`; do lib /extract:$$ofile ../$(<F); done
$(MAYBEATSIGN)touch $@
mkdir -p $@ && cd $@ && for ofile in `lib /list ../$(<F) |dos2unix |grep -F obj`; do lib /extract:$$ofile ../$(<F); done
touch $@
endif
......@@ -395,7 +395,7 @@ endif
SO_FLAGS=$(SHARED) $(BIN_FROM_O_FLAGS) $(EXPORTMAP)
%.$(SOEXT): $(EXPORTMAPFILE)
$(MAYBEATSIGN)$(CC) $(SO_FLAGS)
$(CC) $(SO_FLAGS)
#Testing tools
ifeq ($(SUMMARIZE),1)
......@@ -416,9 +416,9 @@ APPVERIFIER_TESTS_NONDEFAULT=heaps.backward:TRUE heaps.protect:TRUE
ENABLE_APPVERIFIER_FOR=appverif -enable $(APPVERIFIER_TESTS) -with $(APPVERIFIER_TESTS_NONDEFAULT) -for
DISABLE_APPVERIFIER_FOR=appverif -disable \* -for
%.appverifyenable:
$(MAYBEATSIGN)$(ENABLE_APPVERIFIER_FOR) $*.exe
$(ENABLE_APPVERIFIER_FOR) $*.exe
%.appverifydisable:
$(MAYBEATSIGN)$(DISABLE_APPVERIFIER_FOR) $*.exe
$(DISABLE_APPVERIFIER_FOR) $*.exe
.PHONY:%.appverifyenable %.appverifydisable %.appverifymaybeenable %.appverifymaybedisable
......
......@@ -14,12 +14,12 @@ TARGET = libtokuportability.$(AEXT)
$(OBJS): CFLAGS += -DTOKU_ALLOW_DEPRECATED
install: $(TARGET)
$(MAYBEATSIGN)cp $(TARGET) $(LIBPORTABILITY)
cp $(TARGET) $(LIBPORTABILITY)
$(TARGET): $(OBJS)
clean:
$(MAYBEATSIGN)rm -rf $(TARGET) $(LIBPORTABILITY)
rm -rf $(TARGET) $(LIBPORTABILITY)
# For build, do nothing
build:
......@@ -32,7 +32,7 @@ BINS_O = $(patsubst %,%.$(OEXT),$(BINS_RAW))
.PHONY: build default bins libs
build default: bins libs $(TEST_NEWBRT)
$(MAYBEATSIGN)cd tests;$(MAKE) build
cd tests;$(MAKE) build
BRT_SOURCES = \
block_allocator \
......@@ -65,7 +65,7 @@ BRT_C_FILES = $(patsubst %,%.c,$(BRT_SOURCES))
BRT_O_FILES = $(patsubst %,%.$(OEXT),$(BRT_SOURCES))
newbrt.$(OEXT): $(BRT_C_FILES) $(DEPEND_COMPILE)
$(MAYBEATSIGN)$(CC) $(BRT_C_FILES) $(COMBINE_C) $(O_FROM_C_FLAGS)
$(CC) $(BRT_C_FILES) $(COMBINE_C) $(O_FROM_C_FLAGS)
ifneq ($(CYGWIN),)
......@@ -81,13 +81,11 @@ endif
$(NEWBRT): $(NEWBRT_O_FILES)
log_code.$(OEXT): log_header.h wbuf.h log-internal.h rbuf.h
log_header.h: log_code.c
@echo generated log_code.c so log_header.c was also generated
log_code.c: logformat$(BINSUF)
$(MAYBEATSIGN)./logformat
log_header.h log_code.c: logformat$(BINSUF)
./logformat
#Needs to be done manually since it does not include newbrt.
logformat$(BINSUF): logformat.c $(LIBPORTABILITY)
$(MAYBEATSIGN)$(CC) $< $(BIN_FROM_O_FLAGS_NOLIB) $(LIBPORTABILITY)
$(CC) $< $(BIN_FROM_O_FLAGS_NOLIB) $(LIBPORTABILITY)
libs: $(NEWBRT) $(NEWBRT_BUNDLE)
......@@ -97,7 +95,7 @@ bins: $(BINS)
# Put check_benchmarktest_256 first because it is long-running (and therefore on the critical path, so get it started)
check: bins
$(MAYBEATSIGN)cd tests;$(MAKE) check
cd tests;$(MAKE) check
%$(BINSUF): $(NEWBRT) $(LIBPORTABILITY)
......@@ -110,13 +108,13 @@ checko2:
clean: clean-local clean-tests
clean-tests:
$(MAYBEATSIGN)cd tests;$(MAKE) clean
cd tests;$(MAKE) clean
clean-local:
$(MAYBEATSIGN)rm -rf $(NEWBRT)
$(MAYBEATSIGN)rm -rf test_oexcl.c.tmp *.brt
$(MAYBEATSIGN)rm -rf log_code.c log_header.h logformat
rm -rf $(NEWBRT)
rm -rf test_oexcl.c.tmp *.brt
rm -rf log_code.c log_header.h logformat
# After doing (cd ../src/tests;make test_log5.recover), run these. The files should have no differences.
testdump: brtdump$(BINSUF)
$(MAYBEATSIGN)./brtdump ../src/tests/dir.test_log5.c.tdb.recover/foo.db > dump.r && ./brtdump ../src/tests/dir.test_log5.c.tdb/foo.db > dump.$(OEXT) && diff dump.$(OEXT) dump.r
./brtdump ../src/tests/dir.test_log5.c.tdb.recover/foo.db > dump.r && ./brtdump ../src/tests/dir.test_log5.c.tdb/foo.db > dump.$(OEXT) && diff dump.$(OEXT) dump.r
......@@ -99,41 +99,41 @@ build: $(BINS)
check: $(patsubst %,check_%,$(CHECKS))
check_fail:
$(MAYBEATSIGN)test 0 = 1 $(SUMMARIZE_CMD)
test 0 = 1 $(SUMMARIZE_CMD)
check_ok:
$(MAYBEATSIGN)test 0 = 0 $(SUMMARIZE_CMD)
test 0 = 0 $(SUMMARIZE_CMD)
# Don't run 1305 under valgrind. It takes way too long.
check_test1305: VGRIND=
check_test1305:
check_benchmarktest_256: benchmark-test$(BINSUF)
$(MAYBEATSIGN)$(VGRIND) ./$< $(VERBVERBOSE) --valsize 256 --verify 1 $(SUMMARIZE_CMD)
$(VGRIND) ./$< $(VERBVERBOSE) --valsize 256 --verify 1 $(SUMMARIZE_CMD)
check_test-assertA: test-assert$(BINSUF)
@# no arguments, should err
$(MAYBEATSIGN)$(VGRIND) ./$< > /dev/null 2>&1 ; test $$? = 1 $(SUMMARIZE_CMD)
$(VGRIND) ./$< > /dev/null 2>&1 ; test $$? = 1 $(SUMMARIZE_CMD)
check_test-assertB: test-assert$(BINSUF)
@# one argument, not "ok" should err
@rm -f test-assert.out
$(MAYBEATSIGN)($(VGRIND) ./$< notok) > test-assert.out 2>&1 ; test $$? = 1 && fgrep failed test-assert.out > /dev/null $(SUMMARIZE_CMD)
($(VGRIND) ./$< notok) > test-assert.out 2>&1 ; test $$? = 1 && fgrep failed test-assert.out > /dev/null $(SUMMARIZE_CMD)
check_test-assertC: test-assert$(BINSUF)
check_test-assert$(BINSUF): test-assert$(BINSUF)
@# one argument, "ok" should not error
$(MAYBEATSIGN)$(VGRIND) ./$< ok $(SUMMARIZE_CMD)
$(VGRIND) ./$< ok $(SUMMARIZE_CMD)
check_%$(BINSUF): %$(BINSUF)
$(MAYBEATSIGN)$(VGRIND) ./$< $(VERBVERBOSE) $(SUMMARIZE_CMD)
check_%: %
$(VGRIND) ./$< $(VERBVERBOSE) $(SUMMARIZE_CMD)
benchmark-test.$(OEXT): ../brt.h ../brt-search.h ../../include/db.h
LINK_FILES += ../newbrt.$(AEXT)
clean:
$(MAYBEATSIGN)rm -rf *.dir
$(MAYBEATSIGN)rm -f cachetable-fd-test.ctest2.data test_oexcl.c.tmp
$(MAYBEATSIGN)rm -f *.brt *.tdb *.dat *.data *.out
foo: ../cachetable.$(OEXT) ../fifo.$(OEXT) ../fingerprint.$(OEXT) ../key.$(OEXT) ../memory.$(OEXT) ../memarena.$(OEXT) ../mempool.$(OEXT) ../omt.$(OEXT) ../toku_assert.$(OEXT) ../ybt.$(OEXT) ../x1764.$(OEXT) ../trace_mem.$(OEXT) ../threadpool.$(OEXT)
rm -rf log-test7.c.dir_*
rm -rf *.dir
rm -f cachetable-fd-test.ctest2.data test_oexcl.c.tmp
rm -f *.brt *.tdb *.dat *.data *.out
$(BINS):
......@@ -50,7 +50,7 @@ build: local build_tests ;
local: buildlocktrees libs install_libs ;
build_tests: | local
$(MAYBEATSIGN)cd tests && $(MAKE) build
cd tests && $(MAKE) build
TOBJS= tdbtrace.$(OEXT) $(patsubst ydb.$(OEXT),ydbtrace.$(OEXT),$(OBJS))
......@@ -58,7 +58,7 @@ TOBJS= tdbtrace.$(OEXT) $(patsubst ydb.$(OEXT),ydbtrace.$(OEXT),$(OBJS))
install_libs: $(INSTALL_LIBRARIES)
%.install: %
$(MAYBEATSIGN)if ! diff $* ../lib/$* > /dev/null 2>&1; then cp $* ../lib/; fi
if ! diff $* ../lib/$* > /dev/null 2>&1; then cp $* ../lib/; fi
.PHONY: install
install: libs install_libs ;
......@@ -104,24 +104,24 @@ ipo_libtokudb.lib: ipo_libtokudb.obj
check_globals: $(LIBNAME).$(SOEXT)
$(MAYBEATSIGN)python tokuglobals.py $<
python tokuglobals.py $<
.PHONY: check_tests
check_tests: build_tests
$(MAYBEATSIGN)cd tests && $(MAKE) check
cd tests && $(MAKE) check
.PHONY: check
check: local check_globals check_tests
.PHONY: strip
strip: $(LIBRARY)
$(MAYBEATSIGN)strip $<
strip $<
clean:
$(MAYBEATSIGN)cd tests && $(MAKE) clean
$(MAYBEATSIGN)cd lock_tree && $(MAKE) clean
$(MAYBEATSIGN)cd range_tree && $(MAKE) clean
cd tests && $(MAKE) clean
cd lock_tree && $(MAKE) clean
cd range_tree && $(MAKE) clean
ydbtrace.$(OEXT): ydb.c $(DEPEND_COMPILE)
$(MAYBEATSIGN)$(CC) $< $(O_FROM_C_FLAGS) -DTOKUTRACE
$(CC) $< $(O_FROM_C_FLAGS) -DTOKUTRACE
......@@ -29,14 +29,14 @@ $(LOCKTREE_TLOG): $(OBJS) locktree_nooverlap.$(OEXT)
$(LOCKTREE_LOG) $(LOCKTREE_LINEAR): $(OBJS) locktree.$(OEXT)
$(LOCKTREE): $(LOCKTREE_TLOG)
$(MAYBEATSIGN)cp $< $@
cp $< $@
.PHONY: build check
build: $(LIBRARIES)
locktree_nooverlap.$(OEXT): locktree.c $(DEPEND_COMPILE)
$(MAYBEATSIGN)$(CC) $< -DTOKU_RT_NOOVERLAPS $(O_FROM_C_FLAGS)
$(CC) $< -DTOKU_RT_NOOVERLAPS $(O_FROM_C_FLAGS)
build check clean:
$(MAYBEATSIGN)cd tests;$(MAKE) $@
cd tests;$(MAKE) $@
......@@ -48,26 +48,26 @@ check.log: $(RUN_LOG_TESTS)
%.run: %.linrun %.tlogrun #%.logrun
%.linrun: %.lin$(BINSUF)
$(MAYBEATSIGN) $(VGRIND) ./$< $(VERBVERBOSE) $(SUMMARIZE_CMD)
$(VGRIND) ./$< $(VERBVERBOSE) $(SUMMARIZE_CMD)
%.tlogrun: %.tlog$(BINSUF)
$(MAYBEATSIGN) $(VGRIND) ./$< $(VERBVERBOSE) $(SUMMARIZE_CMD)
$(VGRIND) ./$< $(VERBVERBOSE) $(SUMMARIZE_CMD)
%.logrun: %.log$(BINSUF)
$(MAYBEATSIGN) $(VGRIND) ./$< $(VERBVERBOSE) $(SUMMARIZE_CMD)
$(VGRIND) ./$< $(VERBVERBOSE) $(SUMMARIZE_CMD)
A_LINEAR=$(LOCKTREE_LINEAR) $(RANGETREE_LINEAR)
A_TLOG =$(LOCKTREE_TLOG) $(RANGETREE_TLOG)
A_LOG =$(LOCKTREE_LOG) $(RANGETREE_LOG)
%.lin$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK) $(A_LINEAR)
$(MAYBEATSIGN)$(CC) -DTESTDIR=\"dir.$<.lin\" $< $(A_LINEAR) $(BIN_FROM_C_FLAGS)
$(CC) -DTESTDIR=\"dir.$<.lin\" $< $(A_LINEAR) $(BIN_FROM_C_FLAGS)
%.tlog$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK) $(A_TLOG)
$(MAYBEATSIGN)$(CC) -DTESTDIR=\"dir.$<.tlog\" $< $(A_TLOG) $(BIN_FROM_C_FLAGS) -DTOKU_RT_NOOVERLAPS
$(CC) -DTESTDIR=\"dir.$<.tlog\" $< $(A_TLOG) $(BIN_FROM_C_FLAGS) -DTOKU_RT_NOOVERLAPS
%.log$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK) $(A_LOG)
$(MAYBEATSIGN)$(CC) -DTESTDIR=\"dir.$<.log\" $< $(A_LOG) $(BIN_FROM_C_FLAGS)
$(CC) -DTESTDIR=\"dir.$<.log\" $< $(A_LOG) $(BIN_FROM_C_FLAGS)
clean:
$(MAYBEATSIGN)rm -f $(ALL_TESTS)
$(MAYBEATSIGN)rm -rf dir.*.lin dir.*.tlog dir.*.log
rm -f $(ALL_TESTS)
rm -rf dir.*.lin dir.*.tlog dir.*.log
......@@ -28,11 +28,11 @@ $(RANGETREE_LINEAR): linear.$(OEXT)
$(RANGETREE_LOG): log.$(OEXT)
$(RANGETREE): $(RANGETREE_TLOG)
$(MAYBEATSIGN)cp $< $@
cp $< $@
.PHONY: build check
build: $(LIBRARIES)
build check clean:
$(MAYBEATSIGN)cd tests;$(MAKE) $@
cd tests;$(MAKE) $@
......@@ -46,26 +46,26 @@ check.log: $(RUN_LOG_TESTS)
%.run: %.linrun %.tlogrun #%.logrun
%.linrun: %.lin$(BINSUF)
$(MAYBEATSIGN) $(VGRIND) ./$< $(VERBVERBOSE) $(SUMMARIZE_CMD)
$(VGRIND) ./$< $(VERBVERBOSE) $(SUMMARIZE_CMD)
%.tlogrun: %.tlog$(BINSUF)
$(MAYBEATSIGN) $(VGRIND) ./$< $(VERBVERBOSE) $(SUMMARIZE_CMD)
$(VGRIND) ./$< $(VERBVERBOSE) $(SUMMARIZE_CMD)
%.logrun: %.log$(BINSUF)
$(MAYBEATSIGN) $(VGRIND) ./$< $(VERBVERBOSE) $(SUMMARIZE_CMD)
$(VGRIND) ./$< $(VERBVERBOSE) $(SUMMARIZE_CMD)
A_LINEAR=$(RANGETREE_LINEAR)
A_TLOG =$(RANGETREE_TLOG)
A_LOG =$(RANGETREE_LOG)
%.lin$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK) $(A_LINEAR)
$(MAYBEATSIGN)$(CC) -DTESTDIR=\"dir.$<.lin\" $< $(A_LINEAR) $(BIN_FROM_C_FLAGS)
$(CC) -DTESTDIR=\"dir.$<.lin\" $< $(A_LINEAR) $(BIN_FROM_C_FLAGS)
%.tlog$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK) $(A_TLOG)
$(MAYBEATSIGN)$(CC) -DTESTDIR=\"dir.$<.tlog\" $< $(A_TLOG) $(BIN_FROM_C_FLAGS) -DTOKU_RT_NOOVERLAPS
$(CC) -DTESTDIR=\"dir.$<.tlog\" $< $(A_TLOG) $(BIN_FROM_C_FLAGS) -DTOKU_RT_NOOVERLAPS
%.log$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK) $(A_LOG)
$(MAYBEATSIGN)$(CC) -DTESTDIR=\"dir.$<.log\" $< $(A_LOG) $(BIN_FROM_C_FLAGS)
$(CC) -DTESTDIR=\"dir.$<.log\" $< $(A_LOG) $(BIN_FROM_C_FLAGS)
clean:
$(MAYBEATSIGN)rm -f $(ALL_TESTS)
$(MAYBEATSIGN)rm -rf dir.*.lin dir.*.tlog dir.*.log
rm -f $(ALL_TESTS)
rm -rf dir.*.lin dir.*.tlog dir.*.log
......@@ -21,13 +21,13 @@ endif
BDBVGRIND=
$(LIBTDB) $(TLIBTDB):
$(MAYBEATSIGN)cd $(@D) && $(MAKE) $(@F)
cd $(@D) && $(MAKE) $(@F)
$(notdir $(LIBTDB)): $(LIBTDB)
$(MAYBEATSIGN)cp $< $@
cp $< $@
$(notdir $(TLIBTDB)): $(TLIBTDB)
$(MAYBEATSIGN)cp $< $@
cp $< $@
SRCS = $(sort $(wildcard *.c))
......@@ -106,8 +106,8 @@ tests.tdb: $(TDB_TESTS) ;
check.tdb: $(RUN_TDB_TESTS) ;
foo:
$(MAYBEATSIGN)echo RUN_TDB_TESTS: $(RUN_TDB_TESTS)
$(MAYBEATSIGN)echo ALL_TESTS: $(ALL_TESTS)
echo RUN_TDB_TESTS: $(RUN_TDB_TESTS)
echo ALL_TESTS: $(ALL_TESTS)
#TODO: What is this for? TODO: Port this if necessary.
#traces: test_env_open_flags.tdbt$(BINSUF)
......@@ -126,12 +126,12 @@ $(SHOULD_FAIL): SUMMARIZE_CMD=$(SUMMARIZE_SHOULD_FAIL)
# Use -s on the command line to make things quiet.
# Use -s on the command line to make things quiet.
%.bdbrun: %.bdb$(BINSUF) $(DEPEND_COMPILE) $(DEPEND_LINK)
$(MAYBEATSIGN)$(BDBVGRIND) ./$< $(VERBVERBOSE) $(SUMMARIZE_CMD)
$(BDBVGRIND) ./$< $(VERBVERBOSE) $(SUMMARIZE_CMD)
%.tdbrun: %.tdb$(BINSUF) $(DEPEND_COMPILE) $(DEPEND_LINK) $(notdir $(LIBTDB))
$(MAYBEATSIGN)$(VGRIND) ./$< $(VERBVERBOSE) $(MAYBEINVERTER) $(SUMMARIZE_CMD)
$(VGRIND) ./$< $(VERBVERBOSE) $(MAYBEINVERTER) $(SUMMARIZE_CMD)
%.recover: %.tdb$(BINSUF)
$(MAYBEATSIGN)$(VGRIND) ./$< && \
$(VGRIND) ./$< && \
rm -rf dir.$*.c.tdb.recover && \
mkdir dir.$*.c.tdb.recover && \
(cd dir.$*.c.tdb.recover && $(VGRIND) ../../../newbrt/tdb-recover ../dir.$*.c.tdb ) && \
......@@ -139,7 +139,7 @@ $(SHOULD_FAIL): SUMMARIZE_CMD=$(SUMMARIZE_SHOULD_FAIL)
$(MAYBEINVERTER) $(SUMMARIZE_CMD)
%.recoverwc: %.tdb$(BINSUF)
$(MAYBEATSIGN) (cd dir.$*.c.tdb;pwd;cat log*| ../../../newbrt/tdb_logprint |wc -c)
(cd dir.$*.c.tdb;pwd;cat log*| ../../../newbrt/tdb_logprint |wc -c)
.PHONY: %.recover
all.recover: $(patsubst %,test_log%.recover,$(TLRECOVER)) ;
......@@ -157,7 +157,7 @@ endif
%.bdb$(BINSUF): CFLAGS+= -DENVDIR=\"dir.$<.bdb\" -DUSE_BDB -DIS_TDB=0
%.bdb$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK)
$(MAYBEATSIGN)$(CC) $< $(BIN_FROM_C_FLAGS)
$(CC) $< $(BIN_FROM_C_FLAGS)
%.tdb$(BINSUF): DLINK_FILES+=$(LIBTDB)
%.tdb$(BINSUF): RPATH_DIRS+=$(dir $(LIBTDB))
......@@ -166,11 +166,11 @@ endif
%.tdb$(BINSUF) %.tdbt$(BINSUF): CFLAGS+= -DENVDIR=\"dir.$<.tdb\" -DUSE_TDB -DIS_TDB=1
%.tdb$(BINSUF) %.tdbt$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK)
$(MAYBEATSIGN)$(CC) $< $(filter-out ../../lib/libtokuportability.a,$(BIN_FROM_C_FLAGS))
$(CC) $< $(filter-out ../../lib/libtokuportability.a,$(BIN_FROM_C_FLAGS))
clean:
$(MAYBEATSIGN)rm -f $(ALL_TESTS)
$(MAYBEATSIGN)rm -rf dir.*.tdb dir.*.bdb dir.*.tdb.recover
rm -f $(ALL_TESTS)
rm -rf dir.*.tdb dir.*.bdb dir.*.tdb.recover
ifeq ($(VGRIND),)
BDB_SUPPRESSIONS =
......@@ -201,7 +201,7 @@ test_groupcommit_perf.bdbrun test_groupcommit_perf.tdbrun: VGRIND=
# Use helgrind on the group commit count test
# helgrind is too flakey, so I'm removing it from the tests. -Bradley
#test_groupcommit_count_helgrind.tdbrun: test_groupcommit_count_helgrind.tdb
# $(MAYBEATSIGN)$(HGRIND) ./$< $(VERBVERBOSE)
# $(HGRIND) ./$< $(VERBVERBOSE)
......@@ -218,37 +218,37 @@ test_db_assoc3.tdb$(BINSUF) test_db_assoc3.bdb$(BINSUF): test.h
# This one failed in both BDB and TokuDB, in the same way. It was a program error. Now it works
test_db_assoc3.tdbrun_wasbad: test_db_assoc3.tdb$(BINSUF)
$(MAYBEATSIGN)./$< --seed=1 --count=200
$(MAYBEATSIGN)./$< --seed=1 --count=200 --more
$(MAYBEATSIGN)./$< --seed=1 --count=200 --more
$(MAYBEATSIGN)./$< --seed=1 --count=200 --more
$(MAYBEATSIGN)./$< --seed=1 --count=200 --more
$(MAYBEATSIGN)./$< --seed=1 --count=200 --more
$(MAYBEATSIGN)./$< --seed=1 --count=200 --more
./$< --seed=1 --count=200
./$< --seed=1 --count=200 --more
./$< --seed=1 --count=200 --more
./$< --seed=1 --count=200 --more
./$< --seed=1 --count=200 --more
./$< --seed=1 --count=200 --more
./$< --seed=1 --count=200 --more
# serialize these two tests since they use the same directory
test_db_assoc3.tdbrun_wasbad: test_db_assoc3.tdbrun
.phony: build_primary_db build_name_db build_expire_db
test_v6_assoc3.dir/dir.test_db_assoc3.c.tdb$(BINSUF):
$(MAYBEATSIGN)mkdir $@
mkdir $@
build_primary_db: test_v6_assoc3.dir/dir.test_db_assoc3.c.tdb$(BINSUF)
$(MAYBEATSIGN)gunzip < test_v6_assoc3.dir/dir.test_db_assoc3.c.tdb.original/primary.db.gz > test_v6_assoc3.dir/dir.test_db_assoc3.c.tdb/primary.db
gunzip < test_v6_assoc3.dir/dir.test_db_assoc3.c.tdb.original/primary.db.gz > test_v6_assoc3.dir/dir.test_db_assoc3.c.tdb/primary.db
build_name_db: test_v6_assoc3.dir/dir.test_db_assoc3.c.tdb$(BINSUF)
$(MAYBEATSIGN)gunzip < test_v6_assoc3.dir/dir.test_db_assoc3.c.tdb.original/name.db.gz > test_v6_assoc3.dir/dir.test_db_assoc3.c.tdb/name.db
gunzip < test_v6_assoc3.dir/dir.test_db_assoc3.c.tdb.original/name.db.gz > test_v6_assoc3.dir/dir.test_db_assoc3.c.tdb/name.db
build_expire_db: test_v6_assoc3.dir/dir.test_db_assoc3.c.tdb$(BINSUF)
$(MAYBEATSIGN)gunzip < test_v6_assoc3.dir/dir.test_db_assoc3.c.tdb.original/expire.db.gz > test_v6_assoc3.dir/dir.test_db_assoc3.c.tdb/expire.db
gunzip < test_v6_assoc3.dir/dir.test_db_assoc3.c.tdb.original/expire.db.gz > test_v6_assoc3.dir/dir.test_db_assoc3.c.tdb/expire.db
test_v6v7_assoc3.tdbrun: test_db_assoc3.tdb$(BINSUF) build_primary_db build_name_db build_expire_db
$(MAYBEATSIGN)(cd test_v6_assoc3.dir; LD_LIBRARY_PATH=../.. $(VGRIND) ../test_db_assoc3.tdb$(BINSUF) --seed=3 --count=1000 --more) $(SUMMARIZE_CMD)
(cd test_v6_assoc3.dir; LD_LIBRARY_PATH=../.. $(VGRIND) ../test_db_assoc3.tdb$(BINSUF) --seed=3 --count=1000 --more) $(SUMMARIZE_CMD)
test_db_assoc3.tdbrun: test_db_assoc3.tdb$(BINSUF)
$(MAYBEATSIGN)$(VGRIND) ./$< --seed=2 --count=100000 $(VERBVERBOSE) && \
$(VGRIND) ./$< --seed=2 --count=100000 $(VERBVERBOSE) && \
$(VGRIND) ./$< --seed=2 --count=100000 --more $(VERBVERBOSE) $(SUMMARIZE_CMD)
# Give up on VGRIND for bdbrun
test_db_assoc3.bdbrun: test_db_assoc3.bdb$(BINSUF)
$(MAYBEATSIGN)./$< --seed=2 --count=100000 $(VERBVERBOSE) && \
./$< --seed=2 --count=100000 $(VERBVERBOSE) && \
./$< --seed=2 --count=100000 --more $(VERBVERBOSE) $(SUMMARIZE_CMD)
# a bunch of little tests designed to run in parallel
......@@ -263,14 +263,14 @@ test_get_both_range.tdbrun: \
tgbr_2_a.tdbrun tgbr_2_b.tdbrun tgbr_2_c.tdbrun \
tgbr_1_a.tdbrun tgbr_1_b.tdbrun tgbr_1_c.tdbrun \
# intentionally blank line
$(MAYBEATSIGN)true $(SUMMARIZE_CMD) #State that this has passed.
true $(SUMMARIZE_CMD) #State that this has passed.
tgbr_%_a.tdbrun: test_get_both_range.tdb$(BINSUF)
$(MAYBEATSIGN)$(VGRIND) ./$< $(VERBVERBOSE) -i $* -a $(MAYBEINVERTER) $(SUMMARIZE_CMD)
$(VGRIND) ./$< $(VERBVERBOSE) -i $* -a $(MAYBEINVERTER) $(SUMMARIZE_CMD)
tgbr_%_b.tdbrun: test_get_both_range.tdb$(BINSUF)
$(MAYBEATSIGN)$(VGRIND) ./$< $(VERBVERBOSE) -i $* -b $(MAYBEINVERTER) $(SUMMARIZE_CMD)
$(VGRIND) ./$< $(VERBVERBOSE) -i $* -b $(MAYBEINVERTER) $(SUMMARIZE_CMD)
tgbr_%_c.tdbrun: test_get_both_range.tdb$(BINSUF)
$(MAYBEATSIGN)$(VGRIND) ./$< $(VERBVERBOSE) -i $* -c $(MAYBEINVERTER) $(SUMMARIZE_CMD)
$(VGRIND) ./$< $(VERBVERBOSE) -i $* -c $(MAYBEINVERTER) $(SUMMARIZE_CMD)
# helgrind1 is supposed to fail.
helgrind1.tdbrun: VGRIND=$(HGRIND) --log-file=helgrind1.tdb.deleteme
......@@ -285,6 +285,6 @@ dumpit:
# test on small stacks
test_thread_stack.%run: test_thread_stack.%$(BINSUF)
$(MAYBEATSIGN)./$< -a -thread_stack 16384 && \
$(MAYBEATSIGN)./$< -a -thread_stack 16384 -resume $(SUMMARIZE_CMD)
./$< -a -thread_stack 16384 && \
./$< -a -thread_stack 16384 -resume $(SUMMARIZE_CMD)
SRC_TESTS_HERE = $(ROOT)src/tests
SRC_TESTS_SRCS = $(sort $(wildcard $(SRC_TESTS_HERE)/*.c))
SRC_TESTS_TDB_TESTS = $(patsubst %.c,%.tdb,$(SRC_TESTS_SRCS))
SRC_TESTS_BDB_DONTRUN = bug627 test_abort1
SRC_TESTS_BDB_TESTS = $(patsubst %.c,%.bdb,$(filter-out $(patsubst %,%.c,$(SRC_TESTS_BDB_DONTRUN)),$(SRC_TEST_SRCS)))
SRC_TESTS_TDB_TESTS_THAT_SHOULD_FAIL = test_groupcommit_count
SRC_TESTS_ALL_TESTS = $(SRC_TESTS_TDB_TESTS) $(SRC_TESTS_BDB_TESTS)
SRC_TESTS_RUN_TDB_TESTS = $(patsubst %.tdb,%.tdbrun,$(SRC_TESTS_TDB_TESTS))
SRC_TESTS_RUN_BDB_TESTS = $(patsubst %.bdb,%.bdbrun,$(SRC_TESTS_BDB_TESTS))
SRC_TESTS_RUN_ALL_TESTS = $(SRC_TESTS_RUN_TDB_TESTS) $(SRC_TESTS_RUN_BDB_TESTS)
SRC_TESTS_TDB_LOADLIBES = -L$(ROOT)lib -ltokudb -Wl,-rpath,.. -lpthread
SRC_TESTS_TDB_CPPFLAGS = -I$(ROOT)include
foo:
echo $(SRC_TESTS_RUN_ALL_TESTS)
src/tests.checkdir: $(SRC_TESTS_RUN_ALL_TESTS)
src/tests.builddir: $(SRC_TESTS_ALL_TESTS)
$(SRC_TESTS_ALL_TESTS): $(SRC_TESTS_HERE)/test.h
%.bdbrun: %.bdb
$(MAYBEATSIGN) $(UNSETTOKUENV) ./$< $(VERBVERBOSE)
%.tdbrun: %.tdb
$(MAYBEATSIGN) $(SETTOKUENV) $(VGRIND) ./$< $(VERBVERBOSE) $(MAYBEINVERTERR)
%.bdb: %.c
$(UNSETTOKUENV) cc -DENVDIR=\"$<.bdbdir\" $(BDB_CPPFLAGS) -DUSE_BDB -DIS_TDB=0 $(CFLAGS) $< $(BDB_LDFLAGS) -ldb -o $@
%.tdb: %.c $(ROOT)lib/libtokudb.$(LIBEXT)
$(SETTOKUENV) cc -DENVDIR=\"$<.tdbdir\" -DUSE_TDB -DIS_TDB=1 $(CFLAGS) $(CPPFLAGS) $(SRC_TESTS_TDB_CPPFLAGS) $(SRC_TESTS_TDB_LOADLIBES) $< -o $@
%.tdbt: %.c
$(SETTOKUENV) cc -DENVDIR=\"$<.tdbdir\" -DUSE_TDB -DIS_TDB=1 $(CFLAGS) $(CPPFLAGS) $(SRC_TESTS_TDB_CPPFLAGS) $(TDB_TRACELOADLIBES) $< -o $@
$(SRC_TESTS_HERE)/test_logmax.tdb: CPPFLAGS += -D_BSD_SOURCE
$(SRC_TESTS_HERE)/test_thread_insert.tdb: CPPFLAGS += -D_GNU_SOURCE
$(SRC_TESTS_HERE)/test_thread_stack.tdb: CPPFLAGS += -D_GNU_SOURCE
......@@ -181,5 +181,5 @@ test_dupsort:
#if $(DIFF) -q <(echo "foo") <(echo "foo") > /dev/null; then echo yes; else echo no; fi
clean:
$(MAYBEATSIGN)rm -rf *.so *.o $(UTILS) $(BDB_UTILS) $(STATIC_UTILS) *.temp *.gcno *.gcda *.gcov
rm -rf *.so *.o $(UTILS) $(BDB_UTILS) $(STATIC_UTILS) *.temp *.gcno *.gcda *.gcov
......@@ -15,10 +15,10 @@ TARGET = libtokuportability.$(AEXT)
install: $(LIBPORTABILITY)
$(LIBPORTABILITY): $(TARGET)
$(MAYBEATSIGN)cp $< $@
cp $< $@
$(TARGET): $(OBJS)
clean:
$(MAYBEATSIGN)rm -rf $(TARGET) $(LIBPORTABILITY)
rm -rf $(TARGET) $(LIBPORTABILITY)
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