s4-waf: mark the wscript files as python so vim/emacs knows how to highlight them
[samba.git] / lib / tdb / wscript
1 #!/usr/bin/env python
2
3 VERSION='1.2.1'
4
5 srcdir = '../..'
6 blddir = 'bin'
7
8 import sys
9 sys.path.insert(0, srcdir+"/buildtools/wafsamba")
10 import wafsamba
11
12
13 LIBREPLACE_DIR= srcdir + '/lib/replace'
14
15 def set_options(opt):
16     opt.recurse(LIBREPLACE_DIR)
17
18 def configure(conf):
19     conf.sub_config(LIBREPLACE_DIR)
20     conf.SAMBA_CONFIG_H()
21
22 def build(bld):
23     bld.BUILD_SUBDIR(LIBREPLACE_DIR)
24
25     COMMON_SRC = bld.SUBDIR('common',
26                             '''check.c error.c tdb.c traverse.c
27                             freelistcheck.c lock.c dump.c freelist.c
28                             io.c open.c transaction.c''')
29
30     bld.SAMBA_LIBRARY('tdb',
31                       COMMON_SRC,
32                       deps='replace rt',
33                       includes='include',
34                       vnum=VERSION)
35
36     bld.SAMBA_BINARY('tdbtorture',
37                      'tools/tdbtorture.c',
38                      'tdb')
39
40     bld.SAMBA_BINARY('tdbdump',
41                      'tools/tdbdump.c',
42                      'tdb')
43
44     bld.SAMBA_BINARY('tdbbackup',
45                      'tools/tdbbackup.c',
46                      'tdb')
47
48     bld.SAMBA_BINARY('tdbtool',
49                      'tools/tdbtool.c',
50                      'tdb')
51
52     s4_build = getattr(bld.env, '_SAMBA_BUILD_', 0) == 4
53
54     bld.SAMBA_PYTHON('pytdb',
55                      'pytdb.c',
56                      deps='tdb',
57                      enabled=s4_build,
58                      realname='tdb.so')
59