Browse Source

wscript: Fix waf syntax for svnversion.h

tags/1.9.9.5
Adrian Knoth 13 years ago
parent
commit
d601ef3156
1 changed files with 9 additions and 9 deletions
  1. +9
    -9
      wscript

+ 9
- 9
wscript View File

@@ -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


Loading…
Cancel
Save