From 8daa83a594a2e98f39d764422bfbdbc62c9efd44 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 19:20:00 +0200 Subject: Adding upstream version 2:4.20.0+dfsg. Signed-off-by: Daniel Baumann --- libcli/wsp/wscript_build | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 libcli/wsp/wscript_build (limited to 'libcli/wsp/wscript_build') diff --git a/libcli/wsp/wscript_build b/libcli/wsp/wscript_build new file mode 100644 index 0000000..2d34879 --- /dev/null +++ b/libcli/wsp/wscript_build @@ -0,0 +1,41 @@ +#!/usr/bin/env python + +#default flex recepie doesn't create a header file +bld.SAMBA_GENERATOR('wsp_flex', + source='wsp_aqs_lexer.l', + target='wsp_aqs_lexer.h wsp_aqs_lexer.c', + group='build_source', + rule='${FLEX} --header-file=${TGT[0].abspath(env)} --outfile=${TGT[1].abspath(env)} ${SRC[0].abspath(env)}', + enabled=bld.env.with_wsp + ) + +# With centos7-o3 CI job (and gcc 4.8.5) we get +# an error with -Wstrict-overflow. +# Same code is good with gcc version +# gcc 8.5.0 (centos8) and whatever versions of +# gcc we have in the other XXXX-o3 images. +# We turn off strict-overflow just for this generated +# file +parser_cflags='' +if bld.CONFIG_SET('HAVE_WNO_STRICT_OVERFLOW'): + parser_cflags += ' -Wno-strict-overflow' + +bld.SAMBA_SUBSYSTEM('LIBSAMBA_WSP_PARSER', + source='wsp_aqs_parser.y', + deps='talloc wsp_flex', + cflags_end=parser_cflags, + enabled=bld.env.with_wsp + ) +bld.SAMBA_SUBSYSTEM('LIBSAMBA_WSP', + source='wsp_aqs.c wsp_aqs_lexer.c', + public_deps='LIBSAMBA_WSP_PARSER', + enabled=bld.env.with_wsp + ) + +bld.SAMBA_BINARY('test_wsp_parser', + source='test_wsp_parser.c', + deps= 'dcerpc CMDLINE_S3 LIBSAMBA_WSP NDR_WSP NDR_WSP_DATA WSP_UTIL cmocka', + enabled=bld.env.with_wsp, + install=False + ) + -- cgit v1.2.3