summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Tool/pdflatex.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2005-11-07 03:44:30 (GMT)
committerSteven Knight <knight@baldmt.com>2005-11-07 03:44:30 (GMT)
commit9c10969e399eeef7bbeed949a66f3c7a543c18cf (patch)
tree57c19a423016e8fdddbb3b697eaacfd81d24063c /src/engine/SCons/Tool/pdflatex.py
parent6e913271bb52eb06a4221f008325ecbb5fde450a (diff)
downloadSCons-9c10969e399eeef7bbeed949a66f3c7a543c18cf.zip
SCons-9c10969e399eeef7bbeed949a66f3c7a543c18cf.tar.gz
SCons-9c10969e399eeef7bbeed949a66f3c7a543c18cf.tar.bz2
Make all relevant builders of .tex and .ltx files consistent with respect to handling generating bibliographies and re-running LaTeX to resolve undefined references. (Joel B. Mohler) Add a $LATEXRETRIES to configure the number of undefined reference re-runs.
Diffstat (limited to 'src/engine/SCons/Tool/pdflatex.py')
-rw-r--r--src/engine/SCons/Tool/pdflatex.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/engine/SCons/Tool/pdflatex.py b/src/engine/SCons/Tool/pdflatex.py
index 3af09ed..ce3ba67 100644
--- a/src/engine/SCons/Tool/pdflatex.py
+++ b/src/engine/SCons/Tool/pdflatex.py
@@ -36,9 +36,15 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import SCons.Action
import SCons.Defaults
import SCons.Util
+import SCons.Tool.tex
PDFLaTeXAction = SCons.Action.Action('$PDFLATEXCOM', '$PDFLATEXCOMSTR')
+def PDFLaTeXAuxFunction(target = None, source= None, env=None):
+ SCons.Tool.tex.InternalLaTeXAuxAction( PDFLaTeXAction, target, source, env )
+
+PDFLaTeXAuxAction = SCons.Action.Action(PDFLaTeXAuxFunction, strfunction=None)
+
def generate(env):
"""Add Builders and construction variables for pdflatex to an Environment."""
try:
@@ -47,12 +53,13 @@ def generate(env):
bld = SCons.Defaults.PDF()
env['BUILDERS']['PDF'] = bld
- bld.add_action('.ltx', PDFLaTeXAction)
- bld.add_action('.latex', PDFLaTeXAction)
+ bld.add_action('.ltx', PDFLaTeXAuxAction)
+ bld.add_action('.latex', PDFLaTeXAuxAction)
env['PDFLATEX'] = 'pdflatex'
env['PDFLATEXFLAGS'] = SCons.Util.CLVar('')
env['PDFLATEXCOM'] = '$PDFLATEX $PDFLATEXFLAGS $SOURCE'
+ env['LATEXRETRIES'] = 3
def exists(env):
return env.Detect('pdflatex')