summaryrefslogtreecommitdiffstats
path: root/libcli/wsp/wscript_build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 17:20:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 17:20:00 +0000
commit8daa83a594a2e98f39d764422bfbdbc62c9efd44 (patch)
tree4099e8021376c7d8c05bdf8503093d80e9c7bad0 /libcli/wsp/wscript_build
parentInitial commit. (diff)
downloadsamba-8daa83a594a2e98f39d764422bfbdbc62c9efd44.tar.xz
samba-8daa83a594a2e98f39d764422bfbdbc62c9efd44.zip
Adding upstream version 2:4.20.0+dfsg.upstream/2%4.20.0+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libcli/wsp/wscript_build')
-rw-r--r--libcli/wsp/wscript_build41
1 files changed, 41 insertions, 0 deletions
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
+ )
+