s4:scripting: Generate HRESULT definitions as part of the build process
[Samba.git] / libcli / util / wscript_build
blob0afce5a33fbaca620661e445be27b7ab27fc3bf6
1 #!/usr/bin/env python
4 bld.SAMBA_LIBRARY('samba-errors',
5 public_headers='error.h ntstatus.h ntstatus_gen.h doserr.h werror.h werror_gen.h hresult.h',
6 private_headers='nterr_private.h',
7 header_path='core',
8 source='doserr.c errormap.c nterr.c errmap_unix.c hresult.c',
9 public_deps='talloc samba-debug',
10 deps='gnutls',
11 # private_library=True,
12 pc_files=[],
13 vnum='1.0.0',
16 bld.SAMBA_GENERATOR('hresult_generated',
17 source='../../source4/scripting/bin/gen_hresult.py hresult_err_table.txt ../../source4/scripting/bin/gen_error_common.py',
18 target='hresult.h hresult.c',
19 group='build_source',
20 rule='${PYTHON} ${SRC[0].abspath(env)} ${SRC[1].abspath(env)} ${TGT[0].abspath(env)} ${TGT[1].abspath(env)}'
23 bld.SAMBA_GENERATOR('ntstatus_generated',
24 source='../../source4/scripting/bin/gen_ntstatus.py ntstatus_err_table.txt ../../source4/scripting/bin/gen_error_common.py',
25 target='ntstatus_gen.h nterr_gen.c py_ntstatus.c',
26 group='build_source',
27 rule='${PYTHON} ${SRC[0].abspath(env)} ${SRC[1].abspath(env)} ${TGT[0].abspath(env)} ${TGT[1].abspath(env)} ${TGT[2].abspath(env)}'
30 bld.SAMBA_GENERATOR('werror_generated',
31 source='../../source4/scripting/bin/gen_werror.py werror_err_table.txt ../../source4/scripting/bin/gen_error_common.py',
32 target='''
33 werror_gen.h
34 werror_gen.c
35 werror_friendly_gen.c
36 py_werror.c
37 ''',
38 group='build_source',
39 rule='${PYTHON} ${SRC[0].abspath(env)} ${SRC[1].abspath(env)} ${TGT[0].abspath(env)} ${TGT[1].abspath(env)} ${TGT[2].abspath(env)} ${TGT[3].abspath(env)}'
42 bld.SAMBA_PYTHON('python_ntstatus',
43 source='py_ntstatus.c',
44 deps='samba-errors',
45 realname='samba/ntstatus.so'
48 bld.SAMBA_PYTHON('python_werror',
49 source='py_werror.c',
50 deps='samba-errors',
51 realname='samba/werror.so'