mirror of https://gitlab.com/ita1024/waf.git
extras: rst: also build rst2html from the folder in which the target is built
This commit is contained in:
parent
b170b314ad
commit
dcea4231ef
|
@ -121,8 +121,9 @@ class rst2html(docutils):
|
||||||
return nodes, names
|
return nodes, names
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
src = self.inputs[0].bldpath()
|
cwdn = self.outputs[0].parent
|
||||||
dst = self.outputs[0].bldpath()
|
src = self.inputs[0].path_from(cwdn)
|
||||||
|
dst = self.outputs[0].path_from(cwdn)
|
||||||
|
|
||||||
cmd = self.command + [src, dst]
|
cmd = self.command + [src, dst]
|
||||||
cmd += Utils.to_list(getattr(self.generator, 'options', []))
|
cmd += Utils.to_list(getattr(self.generator, 'options', []))
|
||||||
|
@ -130,9 +131,9 @@ class rst2html(docutils):
|
||||||
stylesheet = getattr(self.generator, attribute, None)
|
stylesheet = getattr(self.generator, attribute, None)
|
||||||
if stylesheet is not None:
|
if stylesheet is not None:
|
||||||
stylesheet = self.generator.to_nodes(stylesheet)[0]
|
stylesheet = self.generator.to_nodes(stylesheet)[0]
|
||||||
cmd += ['--%s' % attribute, stylesheet.bldpath()]
|
cmd += ['--%s' % attribute, stylesheet.path_from(cwdn)]
|
||||||
|
|
||||||
return self.exec_command(cmd)
|
return self.exec_command(cmd, cwd=cwdn.abspath())
|
||||||
|
|
||||||
class rst2s5(rst2html):
|
class rst2s5(rst2html):
|
||||||
def __init__(self, *args, **kw):
|
def __init__(self, *args, **kw):
|
||||||
|
|
Loading…
Reference in New Issue