1 # waf build tool for building automatic prototypes from C source
4 from samba_utils
import *
6 def HEIMDAL_AUTOPROTO(bld
, header
, source
, options
=None, group
='prototypes'):
7 '''rule for heimdal prototype generation'''
8 bld
.SET_BUILD_GROUP(group
)
10 options
='-q -P comment -o'
11 SET_TARGET_TYPE(bld
, header
, 'PROTOTYPE')
12 t
= bld(rule
='${PERL} ${HEIMDAL}/cf/make-proto.pl ${OPTIONS} ${TGT[0].abspath(env)} ${SRC}',
18 t
.env
.HEIMDAL
= os
.path
.join(bld
.srcnode
.abspath(), 'source4/heimdal')
19 t
.env
.OPTIONS
= options
20 Build
.BuildContext
.HEIMDAL_AUTOPROTO
= HEIMDAL_AUTOPROTO
23 def HEIMDAL_AUTOPROTO_PRIVATE(bld
, header
, source
):
24 '''rule for private heimdal prototype generation'''
25 bld
.HEIMDAL_AUTOPROTO(header
, source
, options
='-q -P comment -p')
26 Build
.BuildContext
.HEIMDAL_AUTOPROTO_PRIVATE
= HEIMDAL_AUTOPROTO_PRIVATE
29 def SAMBA_AUTOPROTO(bld
, header
, source
):
30 '''rule for samba prototype generation'''
31 bld
.SET_BUILD_GROUP('prototypes')
32 SET_TARGET_TYPE(bld
, header
, 'PROTOTYPE')
39 rule
= '${SCRIPT}/mkproto.pl --srcdir=.. --builddir=. --public=/dev/null --private=${TGT} ${SRC}'
41 t
.env
.SCRIPT
= os
.path
.join(bld
.srcnode
.abspath(), 'source4/script')
42 Build
.BuildContext
.SAMBA_AUTOPROTO
= SAMBA_AUTOPROTO