build: make use on_results=True for some build rules
[Samba.git] / buildtools / wafsamba / samba_patterns.py
blobccd82159a97197efe9822a3b4ee081b0e67cac95
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 *
7 def SAMBA_MKVERSION(bld, target):
8 '''generate the version.h header for Samba'''
9 bld.SET_BUILD_GROUP('setup')
10 t = bld(rule="cd .. && ${SRC[0].abspath(env)} VERSION ${TGT[0].abspath(env)}",
11 source= [ "script/mkversion.sh", 'VERSION' ],
12 target=target,
13 shell=True,
14 on_results=True,
15 before="cc")
16 # force this rule to be constructed now
17 t.post()
18 Build.BuildContext.SAMBA_MKVERSION = SAMBA_MKVERSION