errors: pull out code into common file
[nivanova/samba-autobuild/.git] / libcli / util / wscript_build
index 43c6cec78732fd2667326977bfaa0a7d29df4340..00425478e8f2931042cffe2cafcf9927f98c2f9e 100644 (file)
@@ -1,11 +1,26 @@
 #!/usr/bin/env python
 
 
-bld.SAMBA_LIBRARY('errors',
-                  public_headers='error.h ntstatus.h doserr.h werror.h',
+bld.SAMBA_LIBRARY('samba-errors',
+                  public_headers='error.h ntstatus.h ntstatus_gen.h doserr.h werror.h hresult.h',
+                  private_headers='nterr_private.h',
                   header_path='core',
-                  source='doserr.c errormap.c nterr.c errmap_unix.c',
-                  public_deps='talloc samba-util',
-                  private_library=True
+                  source='doserr.c errormap.c nterr.c errmap_unix.c hresult.c',
+                  public_deps='talloc samba-debug',
+                  # private_library=True,
+                  pc_files=[],
+                  vnum='1',
                   )
 
+bld.SAMBA_GENERATOR('ntstatus_generated',
+                    source='../../source4/scripting/bin/gen_ntstatus.py ntstatus_err_table.txt ../../source4/scripting/bin/gen_error_common.py',
+                    target='ntstatus_gen.h nterr_gen.c py_ntstatus.c',
+                    group='build_source',
+                    rule='${PYTHON} ${SRC[0].abspath(env)} ${SRC[1].abspath(env)} ${TGT[0].abspath(env)} ${TGT[1].abspath(env)} ${TGT[2].abspath(env)}'
+                   )
+
+bld.SAMBA_PYTHON('python_ntstatus',
+       source='py_ntstatus.c',
+       deps='samba-errors',
+       realname='samba/ntstatus.so'
+       )