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
42505a20
Commit
42505a20
authored
May 06, 2008
by
Bradley C. Kuszmaul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hacking makefiles. Addresses #782.
git-svn-id:
file:///svn/tokudb@3813
c7de825b-a66e-492c-adef-691d508d4ae1
parent
7e32d642
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
56 deletions
+54
-56
Makefile.new
Makefile.new
+4
-50
newbrt/Makefile.include
newbrt/Makefile.include
+3
-3
src/Makefile.include
src/Makefile.include
+1
-1
src/tests/Makefile.include
src/tests/Makefile.include
+41
-0
src/tests/test.h
src/tests/test.h
+4
-1
src/tests/test_weakxaction.c
src/tests/test_weakxaction.c
+1
-1
No files found.
Makefile.new
View file @
42505a20
# -*- Mode: Makefile -*-
# ROOT is the the name of the root of the tokudb make directory heirarchy, starting at the cwd
ROOT
=
default
:
build
VGRIND
=
valgrind
OPTFLAGS
=
-O3
CFLAGS
=
$(OPTFLAGS)
-Wall
-W
-Wcast-align
-Wbad-function-cast
-Wextra
-Wmissing-noreturn
-Wmissing-format-attribute
-g3
-ggdb3
-Werror
-fPIC
-Wshadow
-fvisibility
=
hidden
CPPFLAGS
=
-D_FILE_OFFSET_BITS
=
64
-D_LARGEFILE64_SOURCE
-D_XOPEN_SOURCE
=
500
LDFLAGS
=
-lz
DIRS
=
newbrt src
# src cxx utils db-benchmark-test db-benchmark-test-cxx
include
$(patsubst %,%/Makefile.include,$(DIRS))
include
Makefile.include
build
:
$(BINS) $(LIBS)
check
:
$(CHECKS)
ifeq
($(VERBOSE),2)
VERBVERBOSE
=
-v
MAYBEATSIGN
=
else
ifeq
($(VERBOSE),1)
VERBVERBOSE
=
-q
MAYBEATSIGN
=
else
VERBVERBOSE
=
-q
MAYBEATSIGN
=
@
endif
endif
ifneq
($(OSX),)
LIBRARY
=
$(LIBNAME)
.dylib
TLIBRARY
=
$(TLIBNAME)
.dylib
SHARED
=
-dynamiclib
RPATHNAME
=
-install_name
@rpath/
$(LIBRARY)
CFLAGS
+=
-fno-common
else
LIBRARY
=
$(LIBNAME)
.so
TLIBRARY
=
$(TLIBNAME)
.so
SHARED
=
-shared
$(EXPORTMAP)
RPATHNAME
=
endif
ifeq
($(CYGWIN),cygwin)
else
FPICFLAGS
=
-fPIC
# valgrind is not present on cygwin
VGRIND
=
valgrind
--quiet
--error-exitcode
=
1
--leak-check
=
yes
endif
%.check
:
%
$(VGRIND)
./
$<
$(VERBVERBOSE)
check
:
$(patsubst %
,
%.checkdir
,
$(DIRS))
newbrt/Makefile.include
View file @
42505a20
...
...
@@ -83,13 +83,13 @@ NEWBRT_CHECKS = \
$(NEWBRT_REGRESSION_TESTS)
\
# This line intentially kept commented so I can have a
\
on the previous line
CHECKS
+=
$(
patsubst
%,
$(NEWBRT_HERE)
/%.check,
$(NEWBRT_CHECKS)
)
newbrt.checkdir
:
$(patsubst %
,
$(NEWBRT_HERE)/%.check
,
$(NEWBRT_CHECKS))
$(NEWBRT_HERE)/benchmarktest_256.check
:
$(NEWBRT_HERE)/benchmark-test
cd
$(NEWBRT_HERE)
/
;
$(VGRIND)
./benchmark-test
$(VERBVERBOSE)
--valsize
256
--verify
1
foo
:
echo
$(NEWBRT_HERE)
/benchmarktest_256.check
#
foo:
#
echo $(NEWBRT_HERE)/benchmarktest_256.check
$(NEWBRT_HERE)/test-assert.check
:
$(NEWBRT_HERE)/test-assert
@
# no arguments, should err
...
...
src/Makefile.include
View file @
42505a20
...
...
@@ -20,5 +20,5 @@ $(ROOT)src/%.o: CPPFLAGS += -I$(ROOT)include -I$(ROOT)newbrt -I$(ROOT)src/lock_t
$(ROOT)lib/libtokudb.a
:
$(SRC_OFILES)
$(AR)
rv
$@
$^
$(ROOT)lib/libtokudb.
so
:
$(SRC_OFILES)
$(ROOT)lib/libtokudb.
$(LIBEXT)
:
$(SRC_OFILES)
cc
$^
$(SHARED)
-o
$@
$(CFLAGS)
-lz
$(RPATHNAME)
src/tests/Makefile.include
View file @
42505a20
SRC_TESTS_HERE
=
$(ROOT)
src/tests
SRC_TESTS_SRCS
=
$(
sort
$(
wildcard
$(SRC_TESTS_HERE)
/
*
.c
))
SRC_TESTS_TDB_TESTS
=
$(
patsubst
%.c,%.tdb,
$(SRC_TESTS_SRCS)
)
SRC_TESTS_BDB_DONTRUN
=
bug627 test_abort1
SRC_TESTS_BDB_TESTS
=
$(
patsubst
%.c,%.bdb,
$(
filter-out
$(
patsubst
%,%.c,
$(SRC_TESTS_BDB_DONTRUN)
)
,
$(SRC_TEST_SRCS)
))
SRC_TESTS_TDB_TESTS_THAT_SHOULD_FAIL
=
test_groupcommit_count
SRC_TESTS_ALL_TESTS
=
$(SRC_TESTS_TDB_TESTS)
$(SRC_TESTS_BDB_TESTS)
SRC_TESTS_RUN_TDB_TESTS
=
$(
patsubst
%.tdb,%.tdbrun,
$(SRC_TESTS_TDB_TESTS)
)
SRC_TESTS_RUN_BDB_TESTS
=
$(
patsubst
%.bdb,%.bdbrun,
$(SRC_TESTS_BDB_TESTS)
)
SRC_TESTS_RUN_ALL_TESTS
=
$(SRC_TESTS_RUN_TDB_TESTS)
$(SRC_TESTS_RUN_BDB_TESTS)
SRC_TESTS_TDB_LOADLIBES
=
-L
$(ROOT)
lib
-ltokudb
-Wl
,-rpath,..
-lpthread
SRC_TESTS_TDB_CPPFLAGS
=
-I
$(ROOT)
include
foo
:
echo
$(SRC_OFILES)
echo
$(ROOT)
lib/libtokudb.
$(LIBEXT)
src/tests.checkdir
:
$(SRC_TESTS_RUN_ALL_TESTS)
src/tests.builddir
:
$(SRC_TESTS_ALL_TESTS)
$(SRC_TESTS_ALL_TESTS)
:
$(SRC_TESTS_HERE)/test.h
.PHONY
:
$(SRC_TESTS_RUN_ALL_TESTS)
%.bdbrun
:
%.bdb
$(MAYBEATSIGN)
$(UNSETTOKUENV)
./
$<
$(VERBVERBOSE)
# %.tdbrun: %.tdb $(ROOT)lib/libtokudb.$(LIBEXT)
%.tdbrun
:
%.tdb
$(MAYBEATSIGN)
$(SETTOKUENV)
$(VGRIND)
./
$<
$(VERBVERBOSE)
$(MAYBEINVERTERR)
%.bdb
:
%.c
$(UNSETTOKUENV)
cc
-DENVDIR
=
\"
$<
.bdbdir
\"
$(BDB_CPPFLAGS)
-DUSE_BDB
-DIS_TDB
=
0
$(CFLAGS)
$<
$(BDB_LDFLAGS)
-ldb
-o
$@
%.tdb
:
%.c
$(SETTOKUENV)
cc
-DENVDIR
=
\"
$<
.tdbdir
\"
-DUSE_TDB
-DIS_TDB
=
1
$(CFLAGS)
$(CPPFLAGS)
$(SRC_TESTS_TDB_CPPFLAGS)
$(SRC_TESTS_TDB_LOADLIBES)
$<
-o
$@
%.tdbt
:
%.c
$(SETTOKUENV)
cc
-DENVDIR
=
\"
$<
.tdbdir
\"
-DUSE_TDB
-DIS_TDB
=
1
$(CFLAGS)
$(CPPFLAGS)
$(SRC_TESTS_TDB_CPPFLAGS)
$(TDB_TRACELOADLIBES)
$<
-o
$@
src/tests/test.h
View file @
42505a20
...
...
@@ -24,9 +24,12 @@ void parse_args (int argc, const char *argv[]) {
int
resultcode
=
0
;
if
(
strcmp
(
argv
[
1
],
"-v"
)
==
0
)
{
verbose
++
;
}
else
if
(
strcmp
(
argv
[
1
],
"-q"
)
==
0
)
{
verbose
--
;
if
(
verbose
<
0
)
verbose
=
0
;
}
else
if
(
strcmp
(
argv
[
1
],
"-h"
)
==
0
)
{
do_usage:
fprintf
(
stderr
,
"Usage:
\n
%s [-v|-h]
\n
"
,
argv0
);
fprintf
(
stderr
,
"Usage:
\n
%s [-v|-
q] [-
h]
\n
"
,
argv0
);
exit
(
resultcode
);
}
else
{
resultcode
=
1
;
...
...
src/tests/test_weakxaction.c
View file @
42505a20
...
...
@@ -60,7 +60,7 @@ void test_autotxn(u_int32_t env_flags, u_int32_t db_flags) {
r
=
env
->
close
(
env
,
0
);
assert
(
r
==
0
);
}
int
main
(
int
argc
,
char
*
argv
[]
)
{
int
main
(
int
argc
__attribute__
((
__unused__
)),
char
*
argv
[]
__attribute__
((
__unused__
))
)
{
test_autotxn
(
DB_AUTO_COMMIT
,
DB_AUTO_COMMIT
);
test_autotxn
(
0
,
DB_AUTO_COMMIT
);
test_autotxn
(
DB_AUTO_COMMIT
,
0
);
...
...
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