Commits

Rob Managan committed 276f0e4

Add missing command strings and a few other things.

  • Participants
  • Parent commits 75d3095

Comments (0)

Files changed (1)

 import SCons.Util
 import SCons.Tool.pdf
 import SCons.Tool.tex
+import platform
 
 XeTeXAction = None
 XETEXBuilder = None
 
     SCons.Tool.tex.generate_common(env)
 
+    CDCOM = 'cd '
+    if platform.system() == 'Windows':
+        # allow cd command to change drives on Windows
+        CDCOM = 'cd /D '
+
+    env['XETEX']      = 'xetex'
+    env['XETEXFLAGS'] = SCons.Util.CLVar('-interaction=nonstopmode -recorder')
+    env['XETEXCOM']   = CDCOM + '${TARGET.dir} && $XETEX $XETEXFLAGS ${SOURCE.file}'
+
+    env['XELATEX']        = 'xelatex'
+    env['XELATEXFLAGS']   = SCons.Util.CLVar('-interaction=nonstopmode -recorder')
+    env['XELATEXCOM']     = CDCOM + '${TARGET.dir} && $XELATEX $XELATEXFLAGS ${SOURCE.file}'
+
 def exists(env):
     return env.Detect(['xelatex','xetex'])