summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Tool/tex.py
diff options
context:
space:
mode:
authorRobert Managan <managan1@llnl.gov>2008-09-30 22:54:35 (GMT)
committerRobert Managan <managan1@llnl.gov>2008-09-30 22:54:35 (GMT)
commitc0e7371604c74acdb3e6e941f3356328d240ca3d (patch)
treebf3423151d461ca7fb77b1bf4e0910ac4daf443c /src/engine/SCons/Tool/tex.py
parente86a0c1c6d7cb02ddca28ffd6fc1a945e5446d22 (diff)
downloadSCons-c0e7371604c74acdb3e6e941f3356328d240ca3d.zip
SCons-c0e7371604c74acdb3e6e941f3356328d240ca3d.tar.gz
SCons-c0e7371604c74acdb3e6e941f3356328d240ca3d.tar.bz2
This patch removes setting the variable TEXPICTS in the tex tools and
sets it in tee dvi2ps and dvipdf tools where it is needed. This means that we can reset it to the original value at the end of the tool. This is done by storing the .tex source file's path in the .dvi file's Node .attribute slot and retrieving it in the dvi2ps and dvipdf tools from the source. I also updated the list of graphics extensions in the Latex scanner I set up one function that gets called to run either dvi2ps or dvipdf after setting TEXPICTS.
Diffstat (limited to 'src/engine/SCons/Tool/tex.py')
-rw-r--r--src/engine/SCons/Tool/tex.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/engine/SCons/Tool/tex.py b/src/engine/SCons/Tool/tex.py
index 3e577fb..43df235 100644
--- a/src/engine/SCons/Tool/tex.py
+++ b/src/engine/SCons/Tool/tex.py
@@ -171,7 +171,7 @@ def InternalLaTeXAuxAction(XXXLaTeXAction, target = None, source= None, env=None
for var in SCons.Scanner.LaTeX.LaTeX.env_variables:
saved_env[var] = modify_env_var(env, var, abspath)
- # Create base file names with the target directory since the auxiliary files
+ # Create a base file names with the target directory since the auxiliary files
# will be made there. That's because the *COM variables have the cd
# command in the prolog. We check
# for the existence of files before opening them--even ones like the
@@ -395,6 +395,10 @@ def tex_emitter(target, source, env):
targetbase = SCons.Util.splitext(str(target[0]))[0]
basename = SCons.Util.splitext(str(source[0]))[0]
basefile = os.path.split(str(basename))[1]
+
+ basedir = os.path.split(str(source[0]))[0]
+ abspath = os.path.abspath(basedir)
+ target[0].attributes.path = abspath
#
# file names we will make use of in searching the sources and log file