Commit 4d059818 authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul

Make the makefile happier. Don't recompile as many things. Fixes #753.

git-svn-id: file:///svn/tokudb@3658 c7de825b-a66e-492c-adef-691d508d4ae1
parent 20bb869a
...@@ -30,9 +30,7 @@ SHARED=-shared $(EXPORTMAP) ...@@ -30,9 +30,7 @@ SHARED=-shared $(EXPORTMAP)
RPATHNAME= RPATHNAME=
endif endif
build: build: buildlocktrees
cd range_tree;$(MAKE) build
cd lock_tree;$(MAKE) build
$(MAKE) $(LIBRARY) $(LIBNAME).a $(TLIBNAME).a $(TLIBRARY) $(MAKE) $(LIBRARY) $(LIBNAME).a $(TLIBNAME).a $(TLIBRARY)
cd tests;$(MAKE) build cd tests;$(MAKE) build
if ! diff $(LIBNAME).a ../lib/$(LIBNAME).a >/dev/null 2>&1; then cp $(LIBNAME).a ../lib/; fi if ! diff $(LIBNAME).a ../lib/$(LIBNAME).a >/dev/null 2>&1; then cp $(LIBNAME).a ../lib/; fi
...@@ -40,6 +38,11 @@ build: ...@@ -40,6 +38,11 @@ build:
if ! diff $(TLIBNAME).a ../lib/$(TLIBNAME).a >/dev/null 2>&1; then cp $(TLIBNAME).a ../lib/; fi if ! diff $(TLIBNAME).a ../lib/$(TLIBNAME).a >/dev/null 2>&1; then cp $(TLIBNAME).a ../lib/; fi
if ! diff $(TLIBRARY) ../lib/$(TLIBRARY) > /dev/null 2>&1; then cp $(TLIBRARY) ../lib/; fi if ! diff $(TLIBRARY) ../lib/$(TLIBRARY) > /dev/null 2>&1; then cp $(TLIBRARY) ../lib/; fi
.PHONY: buildlocktrees
buildlocktrees:
cd range_tree;$(MAKE) build
cd lock_tree;$(MAKE) build
local: $(LIBRARY) $(LIBNAME).a $(TLIBNAME).a $(TLIBRARY) local: $(LIBRARY) $(LIBNAME).a $(TLIBNAME).a $(TLIBRARY)
.PHONY: install .PHONY: install
...@@ -77,19 +80,18 @@ TDBBINS = tdbtrace.o $(patsubst ydb.o,ydbtrace.o,$(DBBINS)) ...@@ -77,19 +80,18 @@ TDBBINS = tdbtrace.o $(patsubst ydb.o,ydbtrace.o,$(DBBINS))
RANGETREE_BINS = range_tree/rangetree.o range_tree/tokuredblack.o RANGETREE_BINS = range_tree/rangetree.o range_tree/tokuredblack.o
LOCKTREE_BINS = lock_tree/locktree.o lock_tree/rth.o lock_tree/lth.o lock_tree/idlth.o lock_tree/db_id.o $(RANGETREE_BINS) LOCKTREE_BINS = lock_tree/locktree.o lock_tree/rth.o lock_tree/lth.o lock_tree/idlth.o lock_tree/db_id.o $(RANGETREE_BINS)
$(LIBRARY): $(DBBINS) | buildlocktrees
cc $(CPPFLAGS) $^ $(LOCKTREE_BINS) $(SHARED) -o $@ $(CFLAGS) -lz $(RPATHNAME)
$(LIBRARY): $(DBBINS) $(LOCKTREE_BINS) $(LIBNAME).a: $(DBBINS) | buildlocktrees
cc $(CPPFLAGS) $^ $(SHARED) -o $@ $(CFLAGS) -lz $(RPATHNAME) $(AR) rv $@ $^ $(LOCKTREE_BINS)
$(LIBNAME).a: $(DBBINS) $(LOCKTREE_BINS)
$(AR) rv $@ $^
$(LIBNAME).a(ydb.o): ydb.o $(LIBNAME).a(ydb.o): ydb.o
$(TLIBRARY): $(TDBBINS) $(LOCKTREE_BINS) $(TLIBRARY): $(TDBBINS) | buildlocktrees
cc $(CPPFLAGS) $^ $(SHARED) -o $@ $(CFLAGS) -lz $(RPATHNAME) cc $(CPPFLAGS) $^ $(LOCKTREE_BINS) $(SHARED) -o $@ $(CFLAGS) -lz $(RPATHNAME)
$(TLIBNAME).a: $(TDBBINS) $(LOCKTREE_BINS) $(TLIBNAME).a: $(TDBBINS) | buildlocktrees
$(AR) rv $@ $^ $(AR) rv $@ $^ $(LOCKTREE_BINS)
$(TLIBNAME).a(ydbtrace.o): ydbtrace.o $(TLIBNAME).a(ydbtrace.o): ydbtrace.o
...@@ -35,7 +35,7 @@ BINS=rth.o lth.o idlth.o db_id.o ...@@ -35,7 +35,7 @@ BINS=rth.o lth.o idlth.o db_id.o
.PHONY: install logformat .PHONY: install logformat
build: $(LT_BINS) build: $(LT_BINS) $(BINS)
cd tests; $(MAKE) build cd tests; $(MAKE) build
check: check:
......
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