vfs_full_audit: Rename kernel_flock to filesystem_sharemode
[Samba.git] / testsuite / headers / wscript_build
blob190fe69681057a2219b2c4c2cce04549e27436cc
1 import os
3 def build_test_headers(task):
4     '''symlink a header in the build tree'''
5     tgt = task.outputs[0].bldpath(task.env)
6     f = open(tgt, mode='w')
7     f.write('/* generated header test */\n')
8     hlist = task.env.public_headers_list[:]
9     hlist.sort()
11     for h in hlist:
12         f.write('#include "%s"\n' % os.path.normpath(h))
13     f.close()
15 relpath1 = os.path.relpath(bld.srcnode.abspath(), bld.path.abspath())
16 public_headers = []
17 for h in bld.env.public_headers_list:
18     public_headers.append(os.path.join(relpath1, bld.env.build_public_headers, h))
20 bld.SAMBA_GENERATOR('test_headers.h',
21                     group='main',
22                     rule=build_test_headers,
23                     source=public_headers,
24                     target='test_headers.h')
26 if bld.env.DEVELOPER_MODE:
27     bld.SAMBA_BINARY('test_headers',
28                      source='test_headers.c',
29                      includes="#include/public",
30                      pyembed=True,
31                      local_include=True,
32                      global_include=False,
33                      use_global_deps=False,
34                      install=False,
35                      deps='talloc tdb ldb tevent popt')