4d213feaadc10a5951aa9cb7b1c0f2d76912c177
[samba.git] / buildtools / wafsamba / samba_autoproto.py
1 # waf build tool for building automatic prototypes from C source
2
3 from TaskGen import taskgen, before
4 import Build, os, string, Utils
5 from samba_utils import *
6
7 # rule for heimdal prototype generation
8 def HEIMDAL_AUTOPROTO(bld, header, source, options='-q -P comment -o'):
9     t = bld(rule='${PERL} -W ../heimdal/cf/make-proto.pl ${OPTIONS} ${TGT[0].abspath(env)} ${SRC}',
10             source=source,
11             target=header,
12             ext_out='.c',
13             before='cc')
14     t.env.OPTIONS = options
15 Build.BuildContext.HEIMDAL_AUTOPROTO = HEIMDAL_AUTOPROTO
16
17 # rule for private heimdal prototype generation
18 def HEIMDAL_AUTOPROTO_PRIVATE(bld, header, source):
19     bld.HEIMDAL_AUTOPROTO(header, source, options='-q -P comment -p')
20 Build.BuildContext.HEIMDAL_AUTOPROTO_PRIVATE = HEIMDAL_AUTOPROTO_PRIVATE
21
22 # rule for samba prototype generation
23 def SAMBA_AUTOPROTO(bld, header, source):
24     print "TODO: add samba autoproto rule"
25     return
26 Build.BuildContext.SAMBA_AUTOPROTO = SAMBA_AUTOPROTO
27
28
29