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

Fixes #1322.

git-svn-id: file:///svn/toku/tokudb.1032b@8301 c7de825b-a66e-492c-adef-691d508d4ae1
parent 4fc04593
...@@ -16,7 +16,7 @@ TARGETS = $(patsubst %.cpp,%,$(SRCS)) ...@@ -16,7 +16,7 @@ TARGETS = $(patsubst %.cpp,%,$(SRCS))
# OPTFLAGS = -O0 # OPTFLAGS = -O0
# GCOV_FLAGS = -fprofile-arcs -ftest-coverage # GCOV_FLAGS = -fprofile-arcs -ftest-coverage
CPPFLAGS = -I../ -I../../include CPPFLAGS = -I../ -I../../include -I../../linux
CXXFLAGS = -Wall $(OPTFLAGS) -g $(GCOV_FLAGS) CXXFLAGS = -Wall $(OPTFLAGS) -g $(GCOV_FLAGS)
LDLIBS = ../../lib/libtokudb_cxx.a ../../lib/libtokudb.a -lz -lpthread LDLIBS = ../../lib/libtokudb_cxx.a ../../lib/libtokudb.a -lz -lpthread
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#include <db_cxx.h> #include <db_cxx.h>
#include <errno.h> #include <errno.h>
#include <string.h> #include <string.h>
#include <sys/stat.h> #include <toku_os.h>
#include <sys/time.h> #include <sys/time.h>
#include <unistd.h> #include <unistd.h>
...@@ -520,7 +520,7 @@ int main (int argc, const char *argv[]) { ...@@ -520,7 +520,7 @@ int main (int argc, const char *argv[]) {
switch (mode) { switch (mode) {
case MODE_DEFAULT: case MODE_DEFAULT:
system("rm -rf " DIR); system("rm -rf " DIR);
mkdir(DIR, 0777); toku_os_mkdir(DIR, 0777);
create_databases(); create_databases();
{ {
int i; int i;
......
...@@ -22,12 +22,14 @@ include $(TOKUROOT)include/Makefile.include ...@@ -22,12 +22,14 @@ include $(TOKUROOT)include/Makefile.include
BENCHDBS = bench.bdb/ bench.tokudb ptest*.dir/ x.dir/ xfast.dir/ BENCHDBS = bench.bdb/ bench.tokudb ptest*.dir/ x.dir/ xfast.dir/
ifdef BDBDIR ifdef BDBDIR
BDB_CPPFLAGS = -D_GNU_SOURCE -I$(BDBDIR)/include -I../include -I../linux BDB_CPPFLAGS = -D_GNU_SOURCE -I$(BDBDIR)/include -I../include $(PORTABILITY_HEADERS)
BDB_LDFLAGS = -L$(BDBDIR)/lib -ldb -Wl,-rpath,$(BDBDIR)/lib $(LIBPORTABILITY) -lpthread BDB_LDFLAGS = -L$(BDBDIR)/lib -ldb -Wl,-rpath,$(BDBDIR)/lib $(LIBPORTABILITY) -lpthread
else else
BDB_CPPFLAGS = BDB_CPPFLAGS = -I$(PORTABILITY_HEADERS) -I../include
BDB_LDFLAGS = -ldb BDB_LDFLAGS = -ldb $(LIBPORTABILITY)
endif endif
BDB_CPPFLAGS += -D_SVID_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_XOPEN_SOURCE=600
TOKUDB=libtokudb.$(SOEXT) TOKUDB=libtokudb.$(SOEXT)
TDB_DLINK_FILES = $(TOKUROOT)lib/$(TOKUDB) TDB_DLINK_FILES = $(TOKUROOT)lib/$(TOKUDB)
...@@ -60,7 +62,7 @@ clean: ...@@ -60,7 +62,7 @@ clean:
$(MAYBEATSIGN)rm -f $(TARGETS) $(MAYBEATSIGN)rm -f $(TARGETS)
$(MAYBEATSIGN)rm -rf $(BENCHDBS) $(MAYBEATSIGN)rm -rf $(BENCHDBS)
$(TARGET_TDB) $(SCANSCAN_TDB): BIN_FROM_C_FLAGS += -DDIRSUF=tokudb $(TARGET_TDB) $(SCANSCAN_TDB): BIN_FROM_C_FLAGS += -DDIRSUF=tokudb -I$(PORTABILITY_HEADERS) -I../include
ifneq ($(PROF),) ifneq ($(PROF),)
USE_STATIC=1 USE_STATIC=1
......
...@@ -336,6 +336,7 @@ endif ...@@ -336,6 +336,7 @@ endif
ifeq ($(SKIP_NEWBRTRULE),) ifeq ($(SKIP_NEWBRTRULE),)
NEWBRT = $(TOKUROOT)newbrt/newbrt.$(AEXT) NEWBRT = $(TOKUROOT)newbrt/newbrt.$(AEXT)
NEWBRT_BUNDLE = $(TOKUROOT)newbrt/newbrt.bundle
$(NEWBRT): $(@D)*.[ch] $(NEWBRT): $(@D)*.[ch]
$(MAYBEATSIGN)cd $(@D) && $(MAKE) -s $(@F) $(MAYBEATSIGN)cd $(@D) && $(MAKE) -s $(@F)
endif endif
...@@ -355,8 +356,9 @@ O_FROM_C_FLAGS= $(CFLAGS) $(CPPFLAGS) -c $(OOUTPUT)$@ ...@@ -355,8 +356,9 @@ O_FROM_C_FLAGS= $(CFLAGS) $(CPPFLAGS) -c $(OOUTPUT)$@
$(MAYBEATSIGN)$(CC) $< $(O_FROM_C_FLAGS) $(MAYBEATSIGN)$(CC) $< $(O_FROM_C_FLAGS)
%.$(AEXT): %.$(AEXT):
$(MAYBEATSIGN)$(AR) $(ARFLAGS) $(AROUTPUT)$@ $^ $(MAYBEATSIGN)$(AR) $(ARFLAGS) $(AROUTPUT)$@ $(filter %.$(OEXT),$^) $(patsubst %.bundle, %.bundle/*.$(OEXT), $^)
%.bundle: %.$(AEXT)
mkdir -p $@; cd $@; $(AR) x ../$(<F)
ifeq ($(SOEXT),so) ifeq ($(SOEXT),so)
EXPORTMAPFILE=export.map EXPORTMAPFILE=export.map
......
...@@ -11,6 +11,7 @@ DEPEND_COMPILE += \ ...@@ -11,6 +11,7 @@ DEPEND_COMPILE += \
# keep this line so I can have a \ on the previous line # keep this line so I can have a \ on the previous line
NEWBRT = newbrt.$(AEXT) NEWBRT = newbrt.$(AEXT)
NEWBRT_BUNDLE = newbrt.bundle
#All executables need to statically link to newbrt #All executables need to statically link to newbrt
LINK_FILES += $(NEWBRT) LINK_FILES += $(NEWBRT)
...@@ -71,15 +72,17 @@ newbrt.$(OEXT): $(BRT_C_FILES) $(DEPEND_COMPILE) ...@@ -71,15 +72,17 @@ newbrt.$(OEXT): $(BRT_C_FILES) $(DEPEND_COMPILE)
ifneq ($(CYGWIN),) ifneq ($(CYGWIN),)
$(NEWBRT): $(BRT_O_FILES) NEWBRT_O_FILES = $(BRT_O_FILES)
else ifeq ($(CC),icc) else ifeq ($(CC),icc)
$(NEWBRT): $(BRT_O_FILES) NEWBRT_O_FILES = $(BRT_O_FILES)
else ifeq ($(COMBINE),0) else ifeq ($(COMBINE),0)
$(NEWBRT): $(BRT_O_FILES) NEWBRT_O_FILES = $(BRT_O_FILES)
else else
$(NEWBRT): newbrt.o NEWBRT_O_FILES = newbrt.o
endif endif
$(NEWBRT): $(NEWBRT_O_FILES)
log_code.$(OEXT): log_header.h wbuf.h log-internal.h rbuf.h log_code.$(OEXT): log_header.h wbuf.h log-internal.h rbuf.h
log_header.h: log_code.c log_header.h: log_code.c
@echo generated log_code.c so log_header.c was also generated @echo generated log_code.c so log_header.c was also generated
...@@ -90,7 +93,7 @@ logformat$(BINSUF): logformat.c $(LIBPORTABILITY) ...@@ -90,7 +93,7 @@ logformat$(BINSUF): logformat.c $(LIBPORTABILITY)
$(MAYBEATSIGN)$(CC) $< $(BIN_FROM_O_FLAGS_NOLIB) $(LIBPORTABILITY) $(MAYBEATSIGN)$(CC) $< $(BIN_FROM_O_FLAGS_NOLIB) $(LIBPORTABILITY)
libs: $(NEWBRT) libs: $(NEWBRT) $(NEWBRT_BUNDLE)
bins: $(BINS) bins: $(BINS)
# Put the benchmarktest_256 first since it takes the longest (and we want to use parallelism in the make) # Put the benchmarktest_256 first since it takes the longest (and we want to use parallelism in the make)
......
...@@ -79,8 +79,8 @@ $(TLIBRARY): LINK_FILES=$(TYDB) $(LOCKTREE) $(RANGETREE) $(NEWBRT) ...@@ -79,8 +79,8 @@ $(TLIBRARY): LINK_FILES=$(TYDB) $(LOCKTREE) $(RANGETREE) $(NEWBRT)
#Skip all BDB tests for CYGWIN+ICC #Skip all BDB tests for CYGWIN+ICC
ifeq ($(CYGWIN),) ifeq ($(CYGWIN),)
$(LIBRARY_S): $(YDB) $(LOCKTREE) $(RANGETREE) $(NEWBRT) $(LIBPORTABILITY) $(LIBRARY_S): $(patsubst %.$(AEXT),%.bundle, $(YDB) $(LOCKTREE) $(RANGETREE) $(NEWBRT) $(LIBPORTABILITY))
$(TLIBRARY_S): $(TYDB) $(LOCKTREE) $(RANGETREE) $(NEWBRT) $(LIBPORTABILITY) $(TLIBRARY_S): $(TYDB) $(LOCKTREE) $(RANGETREE) $(NEWBRT_BUNDLE) $(LIBPORTABILITY)
else ifneq ($(CC),icc) else ifneq ($(CC),icc)
$(LIBRARY_S): $(YDB) $(LOCKTREE) $(RANGETREE) $(NEWBRT) $(LIBPORTABILITY) $(LIBRARY_S): $(YDB) $(LOCKTREE) $(RANGETREE) $(NEWBRT) $(LIBPORTABILITY)
$(TLIBRARY_S): $(TYDB) $(LOCKTREE) $(RANGETREE) $(NEWBRT) $(LIBPORTABILITY) $(TLIBRARY_S): $(TYDB) $(LOCKTREE) $(RANGETREE) $(NEWBRT) $(LIBPORTABILITY)
...@@ -102,7 +102,7 @@ ipo_libtokudb.lib: ipo_libtokudb.obj ...@@ -102,7 +102,7 @@ ipo_libtokudb.lib: ipo_libtokudb.obj
xilib /out:$@ $^ xilib /out:$@ $^
check_globals: $(LIBNAME).$(AEXT) check_globals: $(LIBNAME).$(SOEXT)
$(MAYBEATSIGN)python tokuglobals.py $< $(MAYBEATSIGN)python tokuglobals.py $<
.PHONY: check_tests .PHONY: check_tests
......
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