s3: Pass the rhost through smb_pam_accountcheck
[Samba/ita.git] / buildtools / wafsamba / samba_patterns.py
blob4307bf2585948c1bc8c189e0a60a12076f561949
1 # a waf tool to add extension based build patterns for Samba
3 import Task
4 from TaskGen import extension
5 from samba_utils import *
6 from wafsamba import samba_version_file
8 def write_version_header(task):
9 '''print version.h contents'''
10 src = task.inputs[0].srcpath(task.env)
11 tgt = task.outputs[0].bldpath(task.env)
13 have_git = 'GIT' in task.env
15 version = samba_version_file(src, have_git=have_git)
16 string = str(version)
18 f = open(tgt, 'w')
19 s = f.write(string)
20 f.close()
21 return 0
24 def SAMBA_MKVERSION(bld, target):
25 '''generate the version.h header for Samba'''
26 t = bld.SAMBA_GENERATOR('VERSION',
27 rule=write_version_header,
28 source= 'VERSION',
29 target=target,
30 always=True)
31 Build.BuildContext.SAMBA_MKVERSION = SAMBA_MKVERSION