tests/krb5: Calculate correct gMSA password to fix flapping test
[samba.git] / source4 / param / wscript_build
index 91e128f916c16a1c6ab35627f40672c4e461791f..d1b852c0c73d177b53180c5776c459d85af9865c 100644 (file)
@@ -1,32 +1,16 @@
 #!/usr/bin/env python
+name = bld.pyembed_libname('PROVISION')
+pytalloc_util = bld.pyembed_libname('pytalloc-util')
+pyparam_util = bld.pyembed_libname('pyparam_util')
+libpython = bld.pyembed_libname('LIBPYTHON')
 
-bld.SAMBA_GENERATOR('s3_param_h',
-                    source= 'loadparm.c ../script/mks3param.pl',
-                    target='s3_param.h',
-                    rule='${PERL} ${SRC[1].abspath(env)} ${SRC[0].abspath(env)} --file ${TGT}')
-
-bld.SAMBA_GENERATOR('param_global_h',
-                    source= 'loadparm.c ../../script/mkparamdefs.pl',
-                    target='param_global.h',
-                    rule='${PERL} ${SRC[1].abspath(env)} ${SRC[0].abspath(env)} --file ${TGT} --generate-scope=GLOBAL')
-
-bld.SAMBA_LIBRARY('samba-hostconfig',
-       source='loadparm.c generic.c util.c',
-       pc_files='samba-hostconfig.pc',
-       vnum='0.0.1',
-       deps='DYNCONFIG',
-       public_deps='samba-util param_local_h',
-       public_headers='param.h',
-       autoproto='param_proto.h',
-       autoproto_extra_source='../../lib/param/param_functions.c'
-       )
-
-
-bld.SAMBA_SUBSYSTEM('PROVISION',
-       source='provision.c pyparam.c',
-       deps='LIBPYTHON pyparam_util ldb pytalloc-util pyldb-util',
-       pyext=True,
-       )
+pyldb_util = bld.pyembed_libname('pyldb-util')
+bld.SAMBA_SUBSYSTEM(name,
+                   source='provision.c pyparam.c',
+                   deps='%s %s ldb %s %s' % (libpython, pyparam_util, pytalloc_util, pyldb_util),
+                   pyext=True,
+                   enabled=bld.PYTHON_BUILD_IS_ENABLED(),
+)
 
 
 bld.SAMBA_SUBSYSTEM('share',
@@ -40,36 +24,36 @@ bld.SAMBA_MODULE('share_classic',
        source='share_classic.c',
        subsystem='share',
        init_function='share_classic_init',
-       deps='samba-util'
-       )
-
-
-bld.SAMBA_MODULE('share_ldb',
-       source='share_ldb.c',
-       subsystem='share',
-       init_function='share_ldb_init',
-       deps='ldbsamba auth_system_session'
+       deps='samba-util samba-hostconfig'
        )
 
 
 bld.SAMBA_SUBSYSTEM('SECRETS',
        source='secrets.c',
-       deps='ldb tdb-wrap UTIL_TDB NDR_SECURITY tevent ldbwrap'
+       deps='ldb tdb-wrap util_tdb NDR_SECURITY tevent ldbwrap'
        )
 
+pytalloc_util = bld.pyembed_libname('pytalloc-util')
+pyparam_util = bld.pyembed_libname('pyparam_util')
+libpython = bld.pyembed_libname('LIBPYTHON')
 
 bld.SAMBA_PYTHON('pyparam',
-       source='pyparam.c',
-       deps='samba-hostconfig pytalloc-util',
-       realname='samba/param.so'
-       )
-
+                source='pyparam.c',
+                deps='samba-hostconfig %s' % pytalloc_util,
+                realname='samba/param.so'
+                )
+
+bld.SAMBA_SUBSYSTEM(pyparam_util,
+                   source='pyparam_util.c',
+                   deps='%s samba-hostconfig %s' % (libpython, pytalloc_util),
+                   pyext=True,
+                   enabled=bld.PYTHON_BUILD_IS_ENABLED()
+                   )
+
+bld.SAMBA_SUBSYSTEM('param_options',
+       source='loadparm.c',
+       deps='samba-hostconfig')
 
-bld.SAMBA_SUBSYSTEM('pyparam_util',
-       source='pyparam_util.c',
-       deps='LIBPYTHON samba-hostconfig',
-       pyext=True,
-       )
 
 bld.SAMBA_LIBRARY('shares',
                   source=[],