From c0f1df39058f822ae95731f5fa300131c4e0010e Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Sun, 6 Nov 2011 12:58:26 +0100 Subject: [PATCH] uncontroversial changes of #1040 --- waflib/Tools/tex.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/waflib/Tools/tex.py b/waflib/Tools/tex.py index 835ed576..1efafcfb 100644 --- a/waflib/Tools/tex.py +++ b/waflib/Tools/tex.py @@ -67,6 +67,9 @@ def bibunitscan(self): exts_deps_tex = ['', '.ltx', '.tex', '.bib', '.pdf', '.png', '.eps', '.ps'] """List of typical file extensions included in latex files""" +exts_tex = ['.ltx', '.tex'] +"""List of typical file extensions that contain latex""" + re_tex = re.compile(r'\\(?Pinclude|bibliography|putbib|includegraphics|input|import|bringin|lstinputlisting)(\[[^\[\]]*\])?{(?P[^{}]*)}',re.M) """Regexp for expressions that may include latex files""" @@ -107,7 +110,6 @@ class tex(Task.Task): classes['latex'].scan = myscanfunction """ node = self.inputs[0] - env = self.env nodes = [] names = [] @@ -131,8 +133,10 @@ class tex(Task.Task): if found and not found in self.outputs: nodes.append(found) add_name = False - if found.name.endswith('.tex') or found.name.endswith('.ltx'): - parse_node(found) + for ext in exts_tex: + if found.name.endswith(ext): + parse_node(found) + break # no break, people are crazy if add_name: names.append(path)