diff --git a/wscript b/wscript index 61ec190a..d17c11f9 100644 --- a/wscript +++ b/wscript @@ -37,24 +37,24 @@ def display_feature(msg, build): display_msg(msg, "no", 'YELLOW') def create_svnversion_task(bld, header='svnversion.h', define=None): - import Constants, Build - cmd = '../svnversion_regenerate.sh ${TGT}' if define: cmd += " " + define - cls = Task.simple_task_type('svnversion', cmd, color='BLUE', before='cc') - cls.runnable_status = lambda self: Constants.RUN_ME - def post_run(self): sg = Utils.h_file(self.outputs[0].abspath(self.env)) #print sg.encode('hex') Build.bld.node_sigs[self.env.variant()][self.outputs[0].id] = sg - cls.post_run = post_run - tsk = cls(bld.env.copy()) - tsk.inputs = [] - tsk.outputs = [bld.path.find_or_declare(header)] + bld( + rule = cmd, + name = 'svnversion', + runnable_status = Task.RUN_ME, + before = 'cc', + color = 'BLUE', + post_run = post_run, + target = [bld.path.find_or_declare(header)] + ) def options(opt): # options provided by the modules