wafsamba: fix dependency calculation for SAMBA_GENERATOR()
commitae97d88bda2a40376f8703b3dbd69551de80ead1
authorStefan Metzmacher <metze@samba.org>
Tue, 26 Aug 2014 21:11:39 +0000 (26 23:11 +0200)
committerKarolin Seeger <kseeger@samba.org>
Mon, 17 Nov 2014 20:21:12 +0000 (17 21:21 +0100)
tree4a9853f4eb1bda1ec6dcf18bdc4008951a1dbfdd
parentcfbf91eb75987e6754f1fd410fcd192b73878653
wafsamba: fix dependency calculation for SAMBA_GENERATOR()

We need to checksum the rule as string command of the
sourcecode of the python function.

This is stored in the 'ruledeps' envariable on the waf Task.
See exec_rule() in wafadmin/TaskGen.py.

    dep_vars = getattr(self, 'dep_vars', ['ruledeps'])
    if dep_vars:
        tsk.dep_vars = dep_vars
    if isinstance(self.rule, str):
        tsk.env.ruledeps = self.rule
    else:
        # only works if the function is in a global module such as a waf tool
        tsk.env.ruledeps = Utils.h_fun(self.rule)

If there's no 'dep_vars' it defaults to ['ruledeps'].
As we pass our own 'dep_vars' we need to explicitly add
'ruledeps'.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit ee8fbbd41741e958e0ab6d7b9ab465d664abac60)
buildtools/wafsamba/wafsamba.py