Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
2ef7951f
Commit
2ef7951f
authored
Dec 10, 2007
by
Yoni Fogel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ported makefile to OSX
git-svn-id:
file:///svn/tokudb@1044
c7de825b-a66e-492c-adef-691d508d4ae1
parent
55e74633
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
20 deletions
+35
-20
utils/Makefile
utils/Makefile
+35
-20
No files found.
utils/Makefile
View file @
2ef7951f
...
...
@@ -4,13 +4,28 @@ endif
BDB_DUMP
=
$(BDBDIR)
/bin/db_dump
BDB_LOAD
=
$(BDBDIR)
/bin/db_load
DIFF
=
diff
-I
'db_pagesize='
CFLAGS
=
-std
=
gnu89
-W
-Wall
-Wno-unused
-g
# vars to compile bins that handle tokudb using libdb.so
# when one uses relative address in an rpath, the library better be located relative
# to the current directory
CPPFLAGS
=
-I
../include
LDFLAGS
=
-L
../lib
-ldb
-lpthread
-Wl
,-rpath,
$(PWD)
/../lib
ifeq
($(OSX),OSX)
#Note: OSX 10.4 needs DYLD_LIBRARY_PATH. OSX 10.5 claims to support -rpath.
TDB_LOADLIBES
=
BDB_LOADLIBES
=
SETTOKUENV
=
export
DYLD_LIBRARY_PATH
=
..
;
UNSETTOKUENV
=
export
DYLD_LIBRARY_PATH
=
$(BDBDIR)
/lib
;
else
TDB_LOADLIBES
=
-Wl
,-rpath,
$(PWD)
/../lib
BDB_LOADLIBES
=
-Wl
,-rpath,
$(BDBDIR)
/lib
SETTOKUENV
=
UNSETTOKUENV
=
endif
LDFLAGS
=
-L
../lib
-ldb
-lpthread
$(TDB_LOADLIBES)
# vars to compile bins that handle tokudb using libdb.a
STATIC_CPPFLAGS
=
-I
../include
...
...
@@ -18,7 +33,7 @@ STATIC_LDFLAGS = ../lib/libdb.a -lz
# vars to compile bins that handle bdb
BDB_CPPFLAGS
=
-I
$(BDBDIR)
/include
BDB_LDFLAGS
=
-L
$(BDBDIR)
/lib
-ldb
-lpthread
-Wl
,-rpath,
$(BDBDIR)
/lib
BDB_LDFLAGS
=
-L
$(BDBDIR)
/lib
-ldb
-lpthread
$(BDB_LOADLIBES)
UTILS
=
\
tokudb_gen
\
...
...
@@ -58,12 +73,12 @@ test_gen_hex:
echo
"Generating text input > db > text"
rm
-f
$@
.
*
.temp
./tokudb_gen
$(TEST_GEN_HEX_FLAGS)
>
$@
.gen.temp
$(BDB_LOAD)
$@
.db.temp <
$@
.gen.temp
$(BDB_DUMP)
$@
.db.temp
>
$@
.load_dump.temp
$(
UNSETTOKUENV)
$(
BDB_LOAD)
$@
.db.temp <
$@
.gen.temp
$(
UNSETTOKUENV)
$(
BDB_DUMP)
$@
.db.temp
>
$@
.load_dump.temp
./tokudb_gen
-Hf
>
$@
.gen_sorted.temp
export
LC_ALL
=
C
;
./tokudb_gen
-hf
$(TEST_GEN_HEX_FLAGS)
-d
"
\t
"
-s
"
\n
"
|
sort
-k
1,1 |
tr
-d
"
\n
"
|
tr
"
\t
"
"
\n
"
>>
$@
.gen_sorted.temp
./tokudb_gen
-Fh
>>
$@
.gen_sorted.temp
if
!
diff
-q
$@
.load_dump.temp
$@
.gen_sorted.temp
;
then
echo
"Test Failed!"
;
exit
1
;
fi
if
!
$(DIFF)
-q
$@
.load_dump.temp
$@
.gen_sorted.temp
;
then
echo
"Test Failed!"
;
exit
1
;
fi
rm
$@
.
*
.temp
test_load
:
...
...
@@ -71,32 +86,32 @@ test_load:
echo
"Generating text input > db > text"
rm
-f
$@
.
*
.temp
./tokudb_gen
$(TEST_GEN_HEX_FLAGS)
>
$@
.gen.temp
$(BDB_LOAD)
$@
.bdb.temp <
$@
.gen.temp
./tokudb_load
$@
.tokudb.temp <
$@
.gen.temp
$(BDB_DUMP)
$@
.bdb.temp
>
$@
.dump.bdb.temp
./tokudb_dump
$@
.tokudb.temp
>
$@
.dump.tokudb.temp
if
!
diff
-q
$@
.dump.bdb.temp
$@
.dump.tokudb.temp
;
then
echo
"Test Failed!"
;
exit
1
;
fi
$(
UNSETTOKUENV)
$(
BDB_LOAD)
$@
.bdb.temp <
$@
.gen.temp
$(SETTOKUENV)
./tokudb_load
$@
.tokudb.temp <
$@
.gen.temp
$(
UNSETTOKUENV)
$(
BDB_DUMP)
$@
.bdb.temp
>
$@
.dump.bdb.temp
$(SETTOKUENV)
./tokudb_dump
$@
.tokudb.temp
>
$@
.dump.tokudb.temp
if
!
$(DIFF)
-q
$@
.dump.bdb.temp
$@
.dump.tokudb.temp
;
then
echo
"Test Failed!"
;
exit
1
;
fi
test_dump
:
#Generating
$(TEST_GEN_HEX_NUMKEYS)
keys.
[
$(TEST_GEN_HEX_LENGTHMIN)
,
$(TEST_GEN_HEX_LENGTHLIMIT)
)
bytes + identifier overhead
echo
"Generating text input > db > text"
rm
-f
$@
.
*
.temp
./tokudb_gen
$(TEST_GEN_HEX_FLAGS)
>
$@
.gen.temp
$(BDB_LOAD)
$@
.bdb.temp <
$@
.gen.temp
$(BDB_DUMP)
$@
.bdb.temp
>
$@
.dump.bdb.temp
./tokudb_dump.bdb
$@
.bdb.temp
>
$@
.dump.tokudb.temp
if
!
diff
-q
$@
.dump.bdb.temp
$@
.dump.tokudb.temp
;
then
echo
"Test Failed!"
;
exit
1
;
fi
$(
UNSETTOKUENV)
$(
BDB_LOAD)
$@
.bdb.temp <
$@
.gen.temp
$(
UNSETTOKUENV)
$(
BDB_DUMP)
$@
.bdb.temp
>
$@
.dump.bdb.temp
$(UNSETTOKUENV)
./tokudb_dump.bdb
$@
.bdb.temp
>
$@
.dump.tokudb.temp
if
!
$(DIFF)
-q
$@
.dump.bdb.temp
$@
.dump.tokudb.temp
;
then
echo
"Test Failed!"
;
exit
1
;
fi
test_bdb_tokudb
:
rm
-rf
$@
.
*
.temp
./tokudb_gen
$(TEST_GEN_HEX_FLAGS)
>
$@
.gen.temp
$(BDB_LOAD)
$@
.bdb.temp <
$@
.gen.temp
$(BDB_DUMP)
$@
.bdb.temp
>
$@
.dump.bdb.temp
./tokudb_load_static
$@
.tdb.temp <
$@
.gen.temp
./tokudb_dump_static
$@
.tdb.temp
>
$@
.dump.tdb.temp
if
!
diff
-q
$@
.dump.bdb.temp
$@
.dump.tdb.temp
;
then
echo
"
$@
failed"
;
exit
1
;
fi
$(
UNSETTOKUENV)
$(
BDB_LOAD)
$@
.bdb.temp <
$@
.gen.temp
$(
UNSETTOKUENV)
$(
BDB_DUMP)
$@
.bdb.temp
>
$@
.dump.bdb.temp
$(SETTOKUENV)
./tokudb_load_static
$@
.tdb.temp <
$@
.gen.temp
$(SETTOKUENV)
./tokudb_dump_static
$@
.tdb.temp
>
$@
.dump.tdb.temp
if
!
$(DIFF)
-q
$@
.dump.bdb.temp
$@
.dump.tdb.temp
;
then
echo
"
$@
failed"
;
exit
1
;
fi
#if
diff
-q <(echo "foo") <(echo "foo") > /dev/null; then echo yes; else echo no; fi
#if
$(DIFF)
-q <(echo "foo") <(echo "foo") > /dev/null; then echo yes; else echo no; fi
clean
:
rm
-rf
*
.so
*
.o
$(UTILS)
$(BDB_UTILS)
$(STATIC_UTILS)
*
.temp
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment