1 # waf build tool for building automatic prototypes from C source
4 from waflib
import Build
5 from samba_utils
import SET_TARGET_TYPE
7 def SAMBA_AUTOPROTO(bld
, header
, source
):
8 '''rule for samba prototype generation'''
9 bld
.SET_BUILD_GROUP('prototypes')
10 relpath
= os
.path
.relpath(bld
.path
.abspath(), bld
.srcnode
.abspath())
11 name
= os
.path
.join(relpath
, header
)
12 SET_TARGET_TYPE(bld
, name
, 'PROTOTYPE')
20 rule
= '${PERL} "${SCRIPT}/mkproto.pl" --srcdir=.. --builddir=. --public=/dev/null --private="${TGT}" ${SRC}'
22 t
.env
.SCRIPT
= os
.path
.join(bld
.srcnode
.abspath(), 'source4/script')
23 Build
.BuildContext
.SAMBA_AUTOPROTO
= SAMBA_AUTOPROTO