summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba/samba_patterns.py
blob: fa1b70de7a71068d806c28180bd5b2fc7424f179 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# a waf tool to add extension based build patterns for Samba

import Task
from TaskGen import extension
from samba_utils import *

def SAMBA_MKVERSION(bld, target):
    '''generate the version.h header for Samba'''
    bld.SET_BUILD_GROUP('setup')
    t = bld(rule="cd .. && ${SRC[0].abspath(env)} VERSION ${TGT[0].abspath(env)}",
            source= [ "script/mkversion.sh", 'VERSION' ],
            target=target,
            shell=True,
            before="cc")
    # force this rule to be constructed now
    t.post()
Build.BuildContext.SAMBA_MKVERSION = SAMBA_MKVERSION