autobuild: enable ccache
[Samba.git] / buildtools / wafsamba / samba_errtable.py
blob78480221b6901de241c17d4d791f2fad8bceb41b
1 # waf build tool for building .et files with compile_et
2 import Build
3 from samba_utils import *
5 def SAMBA_ERRTABLE(bld, name, source):
6 '''Build a heimdal errtable from a .et file'''
8 bname = source[0:-3]; # strip off the .et suffix
10 if not SET_TARGET_TYPE(bld, name, 'ET'):
11 return
13 bld.SET_BUILD_GROUP('build_source')
15 out_files = []
16 out_files.append('%s.c' % bname)
17 out_files.append('%s.h' % bname)
19 t = bld(rule='${SRC[1].abspath(env)} . ${TGT[0].parent.abspath(env)} default/source4/heimdal_build/compile_et ${SRC[0].abspath(env)} ${TGT[0].bldpath(env)}',
20 ext_out = '.c',
21 before = 'cc',
22 on_results = True,
23 shell = True,
24 source = [source, 'et_compile_wrapper.sh', 'compile_et'],
25 target = out_files,
26 name = name)
27 Build.BuildContext.SAMBA_ERRTABLE = SAMBA_ERRTABLE