sgmldoc check now works but only if not cached by scons
This commit is contained in:
parent
6040ac798a
commit
58cfef2258
|
|
@ -7,18 +7,22 @@
|
||||||
|
|
||||||
from SCons.Script import ARGUMENTS,Touch,Delete
|
from SCons.Script import ARGUMENTS,Touch,Delete
|
||||||
import os
|
import os
|
||||||
|
import SCons.Action
|
||||||
|
|
||||||
def checkForSGMLFMT(check):
|
def checkForSGMLFMT(check):
|
||||||
"""Returns True if we have working sgmlfmt executable for building documentation."""
|
"""Returns True if we have working sgmlfmt executable for building documentation."""
|
||||||
check.Message("Checking for working sgmlfmt... ")
|
check.Message("Checking for working sgmlfmt... ")
|
||||||
Touch('empty')
|
oldp=SCons.Action.print_actions
|
||||||
Delete('empty.html')
|
SCons.Action.print_actions = 0
|
||||||
|
check.env.Execute(Touch('empty'))
|
||||||
|
check.env.Execute(Delete('empty.html'))
|
||||||
rc,out=check.TryAction("sgmlfmt -d docbook -f html empty")
|
rc,out=check.TryAction("sgmlfmt -d docbook -f html empty")
|
||||||
if os.path.isfile('empty.html'):
|
if os.path.isfile('empty.html'):
|
||||||
rc = 0
|
rc = 0
|
||||||
else:
|
else:
|
||||||
rc = 127
|
rc = 127
|
||||||
Delete(['empty','empty.html'])
|
check.env.Execute(Delete(['empty','empty.html']))
|
||||||
|
SCons.Action.print_actions = oldp
|
||||||
if rc == 0:
|
if rc == 0:
|
||||||
check.Result(True)
|
check.Result(True)
|
||||||
return True
|
return True
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user