2007-09-21 21:48:11 +00:00
|
|
|
CFLAGS = -std=gnu89 -W -Wall -Wno-unused -g -fPIC -I /usr/local/Berkeletokudb.4.1/include/ -ldb
|
2007-09-15 00:24:48 +00:00
|
|
|
LFLAGS = -l CPPFLAGS = -I../include -I../newbrt
|
|
|
|
|
|
|
|
#cc $(CPPFLAGS) $(DBBINS) -shared -o libdb.so $(CFLAGS)
|
|
|
|
|
2007-09-21 21:48:11 +00:00
|
|
|
BDB_DUMP=/usr/local/Berkeletokudb.4.1/bin/db_dump
|
|
|
|
BDB_LOAD=/usr/local/Berkeletokudb.4.1/bin/db_load
|
2007-09-15 00:24:48 +00:00
|
|
|
|
2007-09-21 21:48:11 +00:00
|
|
|
UTILS= \
|
|
|
|
tokudb_gen \
|
|
|
|
tokudb_load \
|
|
|
|
# tokudb_dump \
|
2007-09-15 00:24:48 +00:00
|
|
|
#End
|
|
|
|
|
|
|
|
.PHONY: all clean test test_gen test_gen_hex
|
|
|
|
|
|
|
|
all: $(UTILS)
|
|
|
|
|
|
|
|
test: test_gen
|
|
|
|
|
|
|
|
test_gen: test_gen_hex
|
|
|
|
|
2007-09-18 20:38:47 +00:00
|
|
|
# SHELL=/bin/bash
|
2007-09-15 00:24:48 +00:00
|
|
|
|
2007-09-21 21:48:11 +00:00
|
|
|
BDB_LOAD=/usr/local/Berkeletokudb.4.1/bin/db_load
|
|
|
|
BDB_DUMP=/usr/local/Berkeletokudb.4.1/bin/db_dump
|
2007-09-15 00:24:48 +00:00
|
|
|
|
2007-09-19 15:24:20 +00:00
|
|
|
TEST_GEN_HEX_FLAGS=-n 10000 -m 0 -M 1024 -r 5
|
2007-09-15 00:24:48 +00:00
|
|
|
|
|
|
|
test_gen_hex:
|
|
|
|
#Generating 10,000 keys. 0 to 1024 bytes (not including identifier overhead)
|
|
|
|
echo "Generating text input > db > text"
|
2007-09-19 15:24:20 +00:00
|
|
|
rm -f $@.db.temp
|
2007-09-21 21:48:11 +00:00
|
|
|
./tokudb_gen $(TEST_GEN_HEX_FLAGS) | $(BDB_LOAD) $@.db.temp
|
2007-09-19 15:24:20 +00:00
|
|
|
$(BDB_DUMP) $@.db.temp > $@.load_dump.temp
|
2007-09-21 21:48:11 +00:00
|
|
|
./tokudb_gen -Hf > $@.gen_sorted.temp
|
|
|
|
./tokudb_gen -hf $(TEST_GEN_HEX_FLAGS) -d g -s h | tr "h" "\n" | sort -t g -k 1,1 | tr -d "\n" | tr "g" "\n" >> $@.gen_sorted.temp
|
|
|
|
./tokudb_gen -Fh >> $@.gen_sorted.temp
|
2007-09-19 15:24:20 +00:00
|
|
|
if ! diff -q $@.load_dump.temp $@.gen_sorted.temp; then echo Files different!; exit 1; fi
|
|
|
|
rm $@.*.temp
|
|
|
|
|
2007-09-15 00:24:48 +00:00
|
|
|
|
|
|
|
#if diff -q <(echo "foo") <(echo "foo") > /dev/null; then echo yes; else echo no; fi
|
|
|
|
clean:
|
2007-09-19 15:24:20 +00:00
|
|
|
rm -rf *.so *.o $(UTILS) *.temp
|
2007-09-15 00:24:48 +00:00
|
|
|
|