From 58cfef2258758ecc0d863078b20d60b63d387008 Mon Sep 17 00:00:00 2001 From: Radim Kolar <> Date: Thu, 10 Sep 2009 19:46:50 +0200 Subject: [PATCH] sgmldoc check now works but only if not cached by scons --- site_scons/sgmldoc.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/site_scons/sgmldoc.py b/site_scons/sgmldoc.py index 4bcf710..7c04ed6 100644 --- a/site_scons/sgmldoc.py +++ b/site_scons/sgmldoc.py @@ -7,18 +7,22 @@ from SCons.Script import ARGUMENTS,Touch,Delete import os +import SCons.Action def checkForSGMLFMT(check): """Returns True if we have working sgmlfmt executable for building documentation.""" check.Message("Checking for working sgmlfmt... ") - Touch('empty') - Delete('empty.html') + oldp=SCons.Action.print_actions + 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") if os.path.isfile('empty.html'): rc = 0 else: rc = 127 - Delete(['empty','empty.html']) + check.env.Execute(Delete(['empty','empty.html'])) + SCons.Action.print_actions = oldp if rc == 0: check.Result(True) return True