summaryrefslogtreecommitdiffstats
path: root/third_party/scons/scons-local/SCons/Tool/dvips.py
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/scons/scons-local/SCons/Tool/dvips.py')
-rw-r--r--third_party/scons/scons-local/SCons/Tool/dvips.py21
1 files changed, 20 insertions, 1 deletions
diff --git a/third_party/scons/scons-local/SCons/Tool/dvips.py b/third_party/scons/scons-local/SCons/Tool/dvips.py
index 435adc8..74820ab 100644
--- a/third_party/scons/scons-local/SCons/Tool/dvips.py
+++ b/third_party/scons/scons-local/SCons/Tool/dvips.py
@@ -31,13 +31,28 @@ selection method.
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/dvips.py 3424 2008/09/15 11:22:20 scons"
+__revision__ = "src/engine/SCons/Tool/dvips.py 3603 2008/10/10 05:46:45 scons"
import SCons.Action
import SCons.Builder
+import SCons.Tool.dvipdf
import SCons.Util
+def DviPsFunction(target = None, source= None, env=None):
+ result = SCons.Tool.dvipdf.DviPdfPsFunction(PSAction,target,source,env)
+ return result
+
+def DviPsStrFunction(target = None, source= None, env=None):
+ """A strfunction for dvipdf that returns the appropriate
+ command string for the no_exec options."""
+ if env.GetOption("no_exec"):
+ result = env.subst('$PSCOM',0,target,source)
+ else:
+ result = ''
+ return result
+
PSAction = None
+DVIPSAction = None
PSBuilder = None
def generate(env):
@@ -46,6 +61,10 @@ def generate(env):
if PSAction is None:
PSAction = SCons.Action.Action('$PSCOM', '$PSCOMSTR')
+ global DVIPSAction
+ if DVIPSAction is None:
+ DVIPSAction = SCons.Action.Action(DviPsFunction, strfunction = DviPsStrFunction)
+
global PSBuilder
if PSBuilder is None:
PSBuilder = SCons.Builder.Builder(action = PSAction,