2008-04-02 23:40:36 +00:00
|
|
|
default: build
|
|
|
|
|
|
|
|
|
2007-07-13 19:37:47 +00:00
|
|
|
TAGS: */*.c */*.h
|
2008-05-13 13:07:25 +00:00
|
|
|
etags */*.c */*.h src/lock_tree/*.c src/lock_tree/*.h src/range_tree/*.c src/range_tree/*.h newbrt/tests/*.h
|
2008-01-02 11:37:16 +00:00
|
|
|
|
2008-04-02 23:40:36 +00:00
|
|
|
SRCDIRS = newbrt 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
|
|
|
|
2008-04-24 22:10:13 +00:00
|
|
|
CSCOPE_SRCDIRS=$(SRCDIRS) buildheader include
|
|
|
|
CSCOPE_DIRS =$(shell find $(CSCOPE_SRCDIRS) -type d '(' -path '*/.*' -prune -o -print ')')
|
|
|
|
CSCOPE_FILES=$(shell find $(CSCOPE_DIRS) -maxdepth 1 -type f -name "*.[ch]")
|
|
|
|
cscope.files: $(CSCOPE_DIRS)
|
|
|
|
@echo "$(CSCOPE_FILES)" | tr " " "\n" > $@ # Very long command line quieted.
|
|
|
|
|
|
|
|
cscope.out: cscope.files $(CSCOPE_FILES)
|
2008-04-25 16:34:48 +00:00
|
|
|
cscope -b
|
2008-04-24 22:10:13 +00:00
|
|
|
|
2008-04-02 23:40:36 +00:00
|
|
|
src.dir: newbrt.dir
|
|
|
|
cxx.dir: src.dir
|
|
|
|
db-benchmark-test.dir: src.dir
|
|
|
|
db-benchmark-test-cxx.dir: cxx.dir
|
|
|
|
utils.dir: src.dir
|
|
|
|
|
|
|
|
%.dir:
|
|
|
|
cd $(patsubst %.dir, %, $@);$(MAKE) build
|
|
|
|
|
|
|
|
build: $(patsubst %,%.dir, $(SRCDIRS))
|
2008-01-18 14:43:32 +00:00
|
|
|
|
2008-03-06 21:48:24 +00:00
|
|
|
CHECKS = $(patsubst %,checkdir_%,$(SRCDIRS))
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2008-04-02 23:40:36 +00:00
|
|
|
checkdir_%:
|
2008-03-06 21:48:24 +00:00
|
|
|
cd $(patsubst checkdir_%,%,$@) ; $(MAKE) -k check
|
|
|
|
|
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
|
|
|
|
|
|
|
clean:
|
|
|
|
for d in $(SRCDIRS); do (cd $$d; $(MAKE) -k clean); done
|
2008-04-03 03:12:09 +00:00
|
|
|
rm -rf lib/*.so lib/*.a
|
2008-04-24 22:10:13 +00:00
|
|
|
rm -rf cscope.files cscope.out
|
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:
|
2008-04-02 23:40:36 +00:00
|
|
|
(cd newbrt; $(MAKE) -k check VGRIND="")
|
2008-01-26 18:54:22 +00:00
|
|
|
check-coverage-src-tests:
|
2008-01-21 15:24:59 +00:00
|
|
|
(cd src/tests; $(MAKE) -k check.tdb VGRIND="")
|
2008-01-26 18:54:22 +00:00
|
|
|
check-coverage-utils:
|
2008-01-21 15:24:59 +00:00
|
|
|
(cd utils; $(MAKE) -k test-coverage)
|
2008-01-26 18:54:22 +00:00
|
|
|
check-coverage-cxx-tests:
|
2008-01-21 15:24:59 +00:00
|
|
|
(cd cxx/tests; $(MAKE) -k check VGRIND="")
|
2008-02-07 16:45:58 +00:00
|
|
|
check-coverage-db-benchmark-test:
|
|
|
|
(cd db-benchmark-test; $(MAKE) -k check VGRIND="")
|
|
|
|
check-coverage-db-benchmark-test-cxx:
|
|
|
|
(cd db-benchmark-test-cxx; $(MAKE) -k check VGRIND="")
|
2008-01-26 18:54:22 +00:00
|
|
|
check-coverage-range-tree-tests:
|
|
|
|
(cd src/range_tree/tests; $(MAKE) clean; $(MAKE) -k check.lin VGRIND="" OPTFLAGS=-O0 GCOV_FLAGS="-fprofile-arcs -ftest-coverage")
|
|
|
|
check-coverage-lock-tree-tests:
|
|
|
|
(cd src/lock_tree/tests; $(MAKE) clean; $(MAKE) -k check.lin VGRIND="" OPTFLAGS=-O0 GCOV_FLAGS="-fprofile-arcs -ftest-coverage")
|