ctdb-failover: Split statd_callout add-client/del-client
[Samba.git] / buildtools / wafsamba / samba_autoproto.py
blob87fb8ef25c57c75e945864028f20fe1a3ee06f8a
1 # waf build tool for building automatic prototypes from C source
3 import os
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')
13 t = bld(
14 name = name,
15 source = source,
16 target = header,
17 update_outputs=True,
18 ext_out='.c',
19 before ='c',
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