Commit f682c6a3 authored by Yoni Fogel's avatar Yoni Fogel

Addresses #1032

Modified makefiles to support the portability directory.

git-svn-id: file:///svn/toku/tokudb.1032b@8367 c7de825b-a66e-492c-adef-691d508d4ae1
parent 842353e4
ifneq ($(CYGWIN),) # -*- Mode: Makefile -*-
CSCOPE=mlcscope
else
CSCOPE=cscope
endif
default: build
.DEFAULT_GOAL= default
TOKUROOT=./
TAGS: */*.c */*.h */*/*.c */*/*.h include $(TOKUROOT)include/Makefile.include
etags */*.c */*.h src/tests/*.c src/tests/*.h src/lock_tree/*.c src/lock_tree/*.h src/range_tree/*.c src/range_tree/*.h newbrt/tests/*.h default: build
SRCDIRS = newbrt src cxx utils db-benchmark-test db-benchmark-test-cxx SRCDIRS = $(OS_CHOICE) newbrt src cxx utils db-benchmark-test db-benchmark-test-cxx
BUILDDIRS = $(SRCDIRS) man/texi BUILDDIRS = $(SRCDIRS) man/texi
CSCOPE_SRCDIRS=$(SRCDIRS) buildheader include newbrt.dir: $(OS_CHOICE).dir
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)
$(CSCOPE) -b
tags: cscope.out TAGS
src.dir: newbrt.dir src.dir: newbrt.dir
cxx.dir: src.dir cxx.dir: src.dir
db-benchmark-test.dir: src.dir db-benchmark-test.dir: src.dir
...@@ -31,11 +17,11 @@ db-benchmark-test-cxx.dir: cxx.dir ...@@ -31,11 +17,11 @@ db-benchmark-test-cxx.dir: cxx.dir
utils.dir: src.dir utils.dir: src.dir
%.dir: %.dir:
cd $(patsubst %.dir, %, $@);$(MAKE) build cd $(patsubst %.dir, %, $@) && $(MAKE) build
build: $(patsubst %,%.dir, $(SRCDIRS)) build: $(patsubst %,%.dir, $(BUILDDIRS));
CHECKS = $(patsubst %,checkdir_%,$(SRCDIRS)) CHECKS = $(patsubst %,%.checkdir,$(SRCDIRS))
# This is the original check rule # This is the original check rule
# The stuff below allows "make -j2 -k check" to work # The stuff below allows "make -j2 -k check" to work
...@@ -43,8 +29,8 @@ CHECKS = $(patsubst %,checkdir_%,$(SRCDIRS)) ...@@ -43,8 +29,8 @@ CHECKS = $(patsubst %,checkdir_%,$(SRCDIRS))
#check: #check:
# for d in $(SRCDIRS); do (cd $$d; $(MAKE) -k check); done # for d in $(SRCDIRS); do (cd $$d; $(MAKE) -k check); done
checkdir_%: %.checkdir:
cd $(patsubst checkdir_%,%,$@) ; $(MAKE) -k check cd $* && $(MAKE) -k check
summarize: SUMMARIZE=1 summarize: SUMMARIZE=1
summarize: VERBOSE=0 summarize: VERBOSE=0
...@@ -52,10 +38,9 @@ summarize: check ...@@ -52,10 +38,9 @@ summarize: check
check: $(CHECKS) check: $(CHECKS)
clean: clean:
for d in $(SRCDIRS); do (cd $$d; $(MAKE) -k clean); done $(MAYBEATSIGN)for d in $(SRCDIRS); do (cd $$d && $(MAKE) -k clean); done
rm -rf lib/*.so lib/*.a $(MAYBEATSIGN)rm -rf lib/*.$(SOEXT) lib/*.$(AEXT)
rm -rf cscope.files cscope.out
install: install:
./install.bash ./install.bash
...@@ -70,18 +55,19 @@ check-coverage: check-coverage-newbrt check-coverage-src-tests check-coverage-ut ...@@ -70,18 +55,19 @@ check-coverage: check-coverage-newbrt check-coverage-src-tests check-coverage-ut
check-coverage-range-tree-tests check-coverage-lock-tree-tests check-coverage-range-tree-tests check-coverage-lock-tree-tests
check-coverage-newbrt: check-coverage-newbrt:
(cd newbrt; $(MAKE) -k check VGRIND="") (cd newbrt && $(MAKE) -k check VGRIND="")
check-coverage-src-tests: check-coverage-src-tests:
(cd src/tests; $(MAKE) -k check.tdb VGRIND="") (cd src/tests && $(MAKE) -k check.tdb VGRIND="")
check-coverage-utils: check-coverage-utils:
(cd utils; $(MAKE) -k test-coverage) (cd utils && $(MAKE) -k test-coverage)
check-coverage-cxx-tests: check-coverage-cxx-tests:
(cd cxx/tests; $(MAKE) -k check VGRIND="") (cd cxx/tests && $(MAKE) -k check VGRIND="")
check-coverage-db-benchmark-test: check-coverage-db-benchmark-test:
(cd db-benchmark-test; $(MAKE) -k check VGRIND="") (cd db-benchmark-test && $(MAKE) -k check VGRIND="")
check-coverage-db-benchmark-test-cxx: check-coverage-db-benchmark-test-cxx:
(cd db-benchmark-test-cxx; $(MAKE) -k check VGRIND="") (cd db-benchmark-test-cxx && $(MAKE) -k check VGRIND="")
check-coverage-range-tree-tests: 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") (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: 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") (cd src/lock_tree/tests && $(MAKE) clean && $(MAKE) -k check.lin VGRIND="" OPTFLAGS=-O0 GCOV_FLAGS="-fprofile-arcs -ftest-coverage")
...@@ -6,7 +6,8 @@ MANPAGES_3 = $(patsubst %,%.3,$(MANPAGES)) ...@@ -6,7 +6,8 @@ MANPAGES_3 = $(patsubst %,%.3,$(MANPAGES))
SECTIONS = intro SECTIONS = intro
SECTIONS_TEXI = $(patsubst %,%.texi,$(SECTIONS)) SECTIONS_TEXI = $(patsubst %,%.texi,$(SECTIONS))
default: $(MANPAGES_3) tokudb.dvi default: $(MANPAGES_3) tokudb.dvi;
build: default;
tokudb.dvi: tokudb.texi $(MANPAGES_TEXI) $(SECTIONS_TEXI) tokudb.dvi: tokudb.texi $(MANPAGES_TEXI) $(SECTIONS_TEXI)
texi2dvi4a2ps tokudb.texi texi2dvi4a2ps tokudb.texi
......
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