Fixes to the LaTeX scanner for Python version differences.
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Sat, 19 Nov 2005 17:20:59 +0000 (17:20 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Sat, 19 Nov 2005 17:20:59 +0000 (17:20 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@1393 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/engine/SCons/Scanner/LaTeX.py

index 945102316f1512abeba1f7be4a07d00b6e10e53c..22a5e871cca2ce50f618ad4c59244878b2f93f0b 100644 (file)
@@ -5,7 +5,7 @@ This module implements the dependency scanner for LaTeX code.
 """
 
 #
-# Copyright (c) 2005 The SCons Foundation
+# __COPYRIGHT__
 #
 # Permission is hereby granted, free of charge, to any person obtaining
 # a copy of this software and associated documentation files (the
@@ -27,7 +27,7 @@ This module implements the dependency scanner for LaTeX code.
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 
-__revision__ = ""
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
 
 
 import SCons.Scanner
@@ -37,15 +37,13 @@ def LaTeXScanner(fs = SCons.Node.FS.default_fs):
     ds = LaTeX(name = "LaTeXScanner",
            suffixes =  '$LATEXSUFFIXES',
            path_variable = 'TEXINPUTS',
-           regex = '\\\\(include|input){([^}]*)}',
+           regex = '\\\\(?:include|input){([^}]*)}',
            recursive = 0)
     return ds
 
 class LaTeX(SCons.Scanner.Classic):
     def find_include(self, include, source_dir, path):
         if callable(path): path=path()
-        # find (2nd result reg expr) + extension
-        # print 'looking for latex includes: ' + include[1]
-        i = SCons.Node.FS.find_file(include[1] + '.tex',
+        i = SCons.Node.FS.find_file(include + '.tex',
                                     (source_dir,) + path)
         return i, include