param: use generate_param.py to generate loadparm_ctx_table.c
[sfrench/samba-autobuild/.git] / source3 / param / wscript_build
index 643c27eac47bdffa751f8c81ea0f17b706bf8518..34a906edcb9f37fad6c53fc5898218770cb46f91 100644 (file)
@@ -6,17 +6,19 @@ bld.SAMBA3_SUBSYSTEM('PARAM_UTIL',
 
 bld.SAMBA3_SUBSYSTEM('LOADPARM_CTX',
                      source='loadparm_ctx.c',
-                     deps='''talloc s3_param_h param''')
-
-bld.SAMBA_GENERATOR('s3_param_global_h',
-                    source= '../../script/mkparamdefs.pl loadparm.c ../../lib/param/param_functions.c',
-                    target='param_global.h',
-                    rule='${PERL} ${SRC[0].abspath(env)} ${SRC[1].abspath(env)} ${SRC[2].abspath(env)} --file ${TGT} --generate-scope=GLOBAL')
+                     deps='''talloc s3_param.h param''')
 
 bld.SAMBA_GENERATOR('s3_param_proto_h',
-                    source= '../../script/mks3param_proto.pl loadparm.c ../../lib/param/param_functions.c',
+                    source= '../../script/generate_param.py ../../docs-xml/smbdotconf/parameters.all.xml',
                     target='param_proto.h',
-                    rule='${PERL} ${SRC[0].abspath(env)} ${SRC[1].abspath(env)} ${SRC[2].abspath(env)} --file ${TGT}')
+                    group='build_source',
+                    rule='${PYTHON} ${SRC[0].abspath(env)} --file ${SRC[1].abspath(env)} --output ${TGT} --mode=S3PROTO')
+
+bld.SAMBA_GENERATOR('s3_loadparm_ctx_table_c',
+                    source= '../../script/generate_param.py ../../docs-xml/smbdotconf/parameters.all.xml',
+                    target='loadparm_ctx_table.c',
+                    group='build_source',
+                    rule='${PYTHON} ${SRC[0].abspath(env)} --file ${SRC[1].abspath(env)} --output ${TGT} --mode=S3TABLE')
 
 bld.SAMBA3_PYTHON('pys3param',
                   source='pyparam.c',