hash subst_fun

This commit is contained in:
Thomas Nagy 2012-10-10 22:52:30 +02:00
parent 57b555b5fe
commit c85678dc4a
1 changed files with 5 additions and 1 deletions

View File

@ -670,7 +670,8 @@ class subst_pc(Task.Task):
if getattr(self.generator, 'subst_fun', None):
code = self.generator.subst_fun(self, code)
self.outputs[0].write(code, encoding=getattr(self.generator, 'encoding', 'ISO8859-1'))
if code:
self.outputs[0].write(code, encoding=getattr(self.generator, 'encoding', 'ISO8859-1'))
return
# replace all % by %% to prevent errors by % signs
@ -713,6 +714,9 @@ class subst_pc(Task.Task):
env = self.env
upd = self.m.update
if getattr(self.generator, 'subst_fun', None):
upd(Utils.h_fun(self.generator.subst_fun))
# raw_deps: persistent custom values returned by the scanner
vars = self.generator.bld.raw_deps.get(self.uid(), [])