From: managan Date: Wed, 22 Jul 2009 21:24:37 +0000 (+0000) Subject: Turns out that in my revamped TeX builder I was listing the .dvi or X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c1c4fe36e2e3ad2dff9afeafd0c648391f35f68d;p=scons.git Turns out that in my revamped TeX builder I was listing the .dvi or .pdf output file as a sideeffect since it is listed as an output file in the .fls file. This caused the message that there were two ways to build the file. In fixing it I have to exclude both the .dvi and .pdf target because some test decks produce both... THat hsoudl rarely happen in practice but It is better to handle that case. git-svn-id: http://scons.tigris.org/svn/scons/trunk@4305 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/src/engine/SCons/Tool/tex.py b/src/engine/SCons/Tool/tex.py index e1ecd81a..2fc13d14 100644 --- a/src/engine/SCons/Tool/tex.py +++ b/src/engine/SCons/Tool/tex.py @@ -481,7 +481,7 @@ def tex_emitter_core(target, source, env, graphics_extensions): targetdir = os.path.split(str(target[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 # @@ -566,13 +566,13 @@ def tex_emitter_core(target, source, env, graphics_extensions): env.Clean(target[0],targetbase + suffix) # read fls file to get all other files that latex creates and will read on the next pass + # remove files from list that we explicitly dealt with above if os.path.exists(flsfilename): content = open(flsfilename, "rb").read() out_files = openout_re.findall(content) - mysuffixes = ['.log' , '.fls' , targetext] - for filename in out_files: - base,ext = SCons.Util.splitext(filename) - if ext in mysuffixes: + myfiles = [auxfilename, logfilename, flsfilename, targetbase+'.dvi',targetbase+'.pdf'] + for filename in out_files[:]: + if filename in myfiles: out_files.remove(filename) env.SideEffect(out_files,target[0]) env.Clean(target[0],out_files)