summaryrefslogtreecommitdiffstats
path: root/libcli/wsp/wscript_build
blob: 2d34879a68f4880040dfb9404683ce03bea0b060 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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
    )