Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sqlite3
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
node-sqlite3
Commits
02049499
Commit
02049499
authored
Feb 01, 2011
by
Will White
Committed by
Konstantin Käfer
Feb 14, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change build script and layout to be more consistent with other node C++ modules.
parent
942b2f69
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
22 deletions
+23
-22
index.js
lib/index.js
+0
-0
wscript
wscript
+23
-22
No files found.
sqlite
.js
→
lib/index
.js
View file @
02049499
File moved
wscript
View file @
02049499
#
vim
:
ft
=
javascript
#
vim
:
ft
=
javascript
import
Options
import
Options
from
os
import
unlink
,
sy
mlink
,
sy
stem
from
os
import
unlink
,
system
from
os
.
path
import
exists
,
abspath
from
os
.
path
import
exists
,
abspath
from
shutil
import
copy2
as
copy
srcdir
=
"."
TARGET
=
'sqlite3_bindings'
blddir
=
"build"
TARGET_FILE
=
'%s.node'
%
TARGET
VERSION
=
"0.0.1"
built
=
'build/default/%s'
%
TARGET_FILE
dest
=
'lib/%s'
%
TARGET_FILE
def
set_options
(
opt
):
def
set_options
(
opt
):
opt
.
tool_options
(
"compiler_cxx"
)
opt
.
tool_options
(
"compiler_cxx"
)
...
@@ -15,6 +17,10 @@ def configure(conf):
...
@@ -15,6 +17,10 @@ def configure(conf):
conf
.
check_tool
(
"compiler_cxx"
)
conf
.
check_tool
(
"compiler_cxx"
)
conf
.
check_tool
(
"compiler_cc"
)
conf
.
check_tool
(
"compiler_cc"
)
conf
.
check_tool
(
"node_addon"
)
conf
.
check_tool
(
"node_addon"
)
if
not
conf
.
check_cfg
(
package
=
'sqlite3'
,
args
=
'--cflags --libs'
,
uselib_store
=
'SQLITE3'
):
if
not
conf
.
check
(
lib
=
"sqlite3"
,
libpath
=
[
'/usr/local/lib'
,
'/opt/local/lib'
],
uselib_store
=
"SQLITE3"
):
conf
.
fatal
(
'Missing sqlite3'
);
conf
.
env
.
append_value
(
'LIBPATH_SQLITE3'
,
'/opt/local/lib'
);
conf
.
env
.
append_value
(
"LIBPATH_MPOOL"
,
abspath
(
"./deps/mpool-2.1.0/"
))
conf
.
env
.
append_value
(
"LIBPATH_MPOOL"
,
abspath
(
"./deps/mpool-2.1.0/"
))
conf
.
env
.
append_value
(
"LIB_MPOOL"
,
"mpool"
)
conf
.
env
.
append_value
(
"LIB_MPOOL"
,
"mpool"
)
...
@@ -26,28 +32,23 @@ def configure(conf):
...
@@ -26,28 +32,23 @@ def configure(conf):
def
build
(
bld
):
def
build
(
bld
):
system
(
"cd deps/mpool-2.1.0/; make"
);
system
(
"cd deps/mpool-2.1.0/; make"
);
obj
=
bld
.
new_task_gen
(
"cxx"
,
"shlib"
,
"node_addon"
,
install_path
=
None
)
sqlite
=
bld
.
new_task_gen
(
'cc'
,
'staticlib'
)
sqlite
.
ccflags
=
[
"-g"
,
"-fPIC"
,
"-D_FILE_OFFSET_BITS=64"
,
"-D_LARGEFILE_SOURCE"
,
"-Wall"
]
sqlite
.
source
=
"deps/sqlite/sqlite3.c"
sqlite
.
target
=
"deps/sqlite/sqlite3-bundled"
sqlite
.
name
=
"sqlite3"
obj
=
bld
.
new_task_gen
(
"cxx"
,
"shlib"
,
"node_addon"
)
obj
.
cxxflags
=
[
"-g"
,
"-D_FILE_OFFSET_BITS=64"
,
"-D_LARGEFILE_SOURCE"
,
"-Wall"
]
obj
.
cxxflags
=
[
"-g"
,
"-D_FILE_OFFSET_BITS=64"
,
"-D_LARGEFILE_SOURCE"
,
"-Wall"
]
obj
.
target
=
"sqlite3_bindings"
obj
.
target
=
TARGET
obj
.
source
=
"src/sqlite3_bindings.cc src/database.cc src/statement.cc"
obj
.
source
=
"src/sqlite3_bindings.cc"
obj
.
uselib
=
"MPOOL"
obj
.
source
+=
" src/database.cc"
obj
.
uselib_local
=
"sqlite3"
obj
.
source
+=
" src/statement.cc"
obj
.
uselib
=
"SQLITE3 PROFILER MPOOL"
start_dir
=
bld
.
path
.
find_dir
(
'lib'
)
#
http
:
//www.freehackers.org/~tnagy/wafbook/index.html#_installing_files
bld
.
install_files
(
'${PREFIX}/lib/node/sqlite'
,
start_dir
.
ant_glob
(
'*'
),
cwd
=
start_dir
,
relative_trick
=
True
)
t
=
'sqlite3_bindings.node'
def
shutdown
():
def
shutdown
():
#
HACK
to
get
binding
.
node
out
of
build
directory
.
#
better
way
to
do
this
?
if
Options
.
commands
[
'clean'
]:
if
Options
.
commands
[
'clean'
]:
if
exists
(
t
):
unlink
(
t
)
if
exists
(
TARGET_FILE
):
unlink
(
TARGET_FILE
)
system
(
"cd deps/mpool-2.1.0/; make clean"
);
system
(
"cd deps/mpool-2.1.0/; make clean"
);
else
:
else
:
if
exists
(
'build/default/'
+
t
)
and
not
exists
(
t
):
if
exists
(
buil
t
):
symlink
(
'build/default/'
+
t
,
t
)
copy
(
built
,
des
t
)
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