source: vendor/current/testsuite/headers/wscript_build

Last change on this file was 988, checked in by Silvan Scherrer, 9 years ago

Samba Server: update vendor to version 4.4.3

File size: 1.2 KB
Line 
1import os
2from samba_utils import os_path_relpath
3
4def build_test_headers(task):
5 '''symlink a header in the build tree'''
6 tgt = task.outputs[0].bldpath(task.env)
7 f = open(tgt, mode='w')
8 f.write('/* generated header test */\n')
9 hlist = task.env.public_headers_list[:]
10 hlist.sort()
11
12 for h in hlist:
13 f.write('#include "%s"\n' % os.path.normpath(h))
14 f.close()
15
16relpath1 = os_path_relpath(bld.srcnode.abspath(), bld.curdir)
17public_headers = []
18for h in bld.env.public_headers_list:
19 public_headers.append(os.path.join(relpath1, bld.env.build_public_headers, h))
20
21bld.SAMBA_GENERATOR('test_headers.h',
22 group='main',
23 rule=build_test_headers,
24 source=public_headers,
25 target='test_headers.h')
26
27if bld.env.DEVELOPER_MODE:
28 bld.SAMBA_BINARY('test_headers',
29 source='test_headers.c',
30 includes="#include/public",
31 pyembed=True,
32 local_include=True,
33 global_include=False,
34 use_global_deps=False,
35 install=False,
36 deps='talloc tdb ldb tevent popt')
Note: See TracBrowser for help on using the repository browser.