2013-04-16 23:57:31 -04:00
|
|
|
# -*- Mode: Makefile -*-
|
2008-04-02 23:40:36 +00:00
|
|
|
|
2013-04-16 23:57:31 -04:00
|
|
|
.DEFAULT_GOAL= default
|
|
|
|
TOKUROOT=./
|
2008-04-02 23:40:36 +00:00
|
|
|
|
2013-04-16 23:57:37 -04:00
|
|
|
include $(TOKUROOT)toku_include/Makefile.include
|
2013-04-16 23:57:31 -04:00
|
|
|
default: build
|
2008-01-02 11:37:16 +00:00
|
|
|
|
2013-04-16 23:57:47 -04:00
|
|
|
SRCDIRS = $(OS_CHOICE) newbrt src/range_tree src/lock_tree src cxx utils db-benchmark-test db-benchmark-test-cxx
|
2008-03-19 23:56:35 +00:00
|
|
|
BUILDDIRS = $(SRCDIRS) man/texi
|
2008-01-18 14:43:32 +00:00
|
|
|
|
2013-04-16 23:57:31 -04:00
|
|
|
newbrt.dir: $(OS_CHOICE).dir
|
2013-04-16 23:57:47 -04:00
|
|
|
src/lock_tree.dir: src/range_tree.dir
|
|
|
|
src.dir: newbrt.dir src/lock_tree.dir
|
2008-04-02 23:40:36 +00:00
|
|
|
cxx.dir: src.dir
|
|
|
|
db-benchmark-test.dir: src.dir
|
|
|
|
db-benchmark-test-cxx.dir: cxx.dir
|
|
|
|
utils.dir: src.dir
|
|
|
|
|
|
|
|
%.dir:
|
2013-04-16 23:57:40 -04:00
|
|
|
cd $(patsubst %.dir, %, $@) && $(MAKE) build
|
2008-04-02 23:40:36 +00:00
|
|
|
|
2013-04-16 23:57:33 -04:00
|
|
|
build: $(patsubst %,%.dir, $(BUILDDIRS))
|
2008-01-18 14:43:32 +00:00
|
|
|
|
2013-04-16 23:57:43 -04:00
|
|
|
CHECKS = $(patsubst %,%.checkdir,$(SRCDIRS))
|
2008-03-06 21:48:24 +00:00
|
|
|
|
|
|
|
# This is the original check rule
|
|
|
|
# The stuff below allows "make -j2 -k check" to work
|
|
|
|
|
|
|
|
#check:
|
|
|
|
# for d in $(SRCDIRS); do (cd $$d; $(MAKE) -k check); done
|
|
|
|
|
2013-04-16 23:57:31 -04:00
|
|
|
%.checkdir:
|
|
|
|
cd $* && $(MAKE) -k check
|
2008-03-06 21:48:24 +00:00
|
|
|
|
2008-05-12 10:58:07 +00:00
|
|
|
summarize: SUMMARIZE=1
|
|
|
|
summarize: VERBOSE=0
|
|
|
|
summarize: check
|
2008-03-06 21:48:24 +00:00
|
|
|
|
2008-05-12 10:58:07 +00:00
|
|
|
check: $(CHECKS)
|
2008-01-26 18:54:22 +00:00
|
|
|
|
2013-04-16 23:57:34 -04:00
|
|
|
clean: $(patsubst %,%.dir.clean,$(SRCDIRS)) cleanlib
|
|
|
|
cleanlib:
|
2013-04-16 23:57:34 -04:00
|
|
|
rm -rf lib/*.$(SOEXT) lib/*.$(AEXT) lib/*.bundle
|
2008-01-26 18:54:22 +00:00
|
|
|
|
2008-02-05 15:48:54 +00:00
|
|
|
install:
|
|
|
|
./install.bash
|
|
|
|
|
2008-01-26 18:54:22 +00:00
|
|
|
# maybe we should have a coverage target in each makefile
|
2008-01-18 14:43:32 +00:00
|
|
|
build-coverage:
|
2008-04-03 03:12:09 +00:00
|
|
|
$(MAKE) build OPTFLAGS= GCOV_FLAGS="-fprofile-arcs -ftest-coverage"
|
2008-01-21 14:03:46 +00:00
|
|
|
|
2008-01-26 18:54:22 +00:00
|
|
|
# this is messy now since we dont have consistent make targets
|
|
|
|
check-coverage: check-coverage-newbrt check-coverage-src-tests check-coverage-utils check-coverage-cxx-tests \
|
2008-02-07 16:45:58 +00:00
|
|
|
check-coverage-db-benchmark-test check-coverage-db-benchmark-test-cxx \
|
2008-01-26 18:54:22 +00:00
|
|
|
check-coverage-range-tree-tests check-coverage-lock-tree-tests
|
2008-02-07 16:45:58 +00:00
|
|
|
|
2008-01-26 18:54:22 +00:00
|
|
|
check-coverage-newbrt:
|
2013-04-16 23:57:31 -04:00
|
|
|
(cd newbrt && $(MAKE) -k check VGRIND="")
|
2008-01-26 18:54:22 +00:00
|
|
|
check-coverage-src-tests:
|
2013-04-16 23:57:31 -04:00
|
|
|
(cd src/tests && $(MAKE) -k check.tdb VGRIND="")
|
2008-01-26 18:54:22 +00:00
|
|
|
check-coverage-utils:
|
2013-04-16 23:57:31 -04:00
|
|
|
(cd utils && $(MAKE) -k test-coverage)
|
2008-01-26 18:54:22 +00:00
|
|
|
check-coverage-cxx-tests:
|
2013-04-16 23:57:31 -04:00
|
|
|
(cd cxx/tests && $(MAKE) -k check VGRIND="")
|
2008-02-07 16:45:58 +00:00
|
|
|
check-coverage-db-benchmark-test:
|
2013-04-16 23:57:31 -04:00
|
|
|
(cd db-benchmark-test && $(MAKE) -k check VGRIND="")
|
2008-02-07 16:45:58 +00:00
|
|
|
check-coverage-db-benchmark-test-cxx:
|
2013-04-16 23:57:31 -04:00
|
|
|
(cd db-benchmark-test-cxx && $(MAKE) -k check VGRIND="")
|
2008-01-26 18:54:22 +00:00
|
|
|
check-coverage-range-tree-tests:
|
2013-04-16 23:57:31 -04:00
|
|
|
(cd src/range_tree/tests && $(MAKE) clean && $(MAKE) -k check.lin VGRIND="" OPTFLAGS=-O0 GCOV_FLAGS="-fprofile-arcs -ftest-coverage")
|
2008-01-26 18:54:22 +00:00
|
|
|
check-coverage-lock-tree-tests:
|
2013-04-16 23:57:31 -04:00
|
|
|
(cd src/lock_tree/tests && $(MAKE) clean && $(MAKE) -k check.lin VGRIND="" OPTFLAGS=-O0 GCOV_FLAGS="-fprofile-arcs -ftest-coverage")
|
|
|
|
|