forked from kuebk/nodesvn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wscript
38 lines (31 loc) · 1.34 KB
/
wscript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
test_paths = ['/usr/', '/usr/local/', '/opt/local/']
def set_options(opt):
opt.tool_options("compiler_cxx")
def configure(conf):
conf.check_tool("compiler_cxx")
conf.check_tool("node_addon")
conf.check(lib='svn_fs-1', libpath=build_paths('lib'))
conf.check(lib='svn_fs_base-1', libpath=build_paths('lib'))
conf.check(lib='svn_fs_fs-1', libpath=build_paths('lib'))
conf.check(lib='svn_client-1', libpath=build_paths('lib'))
conf.check(lib='svn_subr-1', libpath=build_paths('lib'))
conf.check(lib='svn_repos-1', libpath=build_paths('lib'))
conf.check(lib='svn_ra-1', libpath=build_paths('lib'))
conf.check(lib='apr-1', libpath=build_paths('lib'))
conf.check(lib='aprutil-1', libpath=build_paths('lib'));
def build(bld):
obj = bld.new_task_gen("cxx", "shlib", "node_addon")
obj.cxxflags = ["-g", "-D_FILE_OFFSET_BITS=64", "-D_LARGEFILE_SOURCE", "-Wall"]
obj.lib = ['svn_client-1', 'apr-1', 'aprutil-1'];
obj.libpath = build_paths('lib') ;
obj.target = "nodesvn"
obj.source = "src/svn.cc"
obj.includes = build_paths('include') + build_paths('include/subversion-1') + build_paths('include/apr-1/') + build_paths('include/apr-1.0')
def all(bld):
configure(bld);
all(bld);
def build_paths(type):
def normal(path):
if path[-1] == '/':
return path[:-1];
return map(lambda path: normal(path)+'/'+type, test_paths[:]);