From 62f70af4e48a7c27aa7d827e8490faa71216cbd6 Mon Sep 17 00:00:00 2001 From: bdbaddog Date: Wed, 16 Sep 2009 17:44:46 +0000 Subject: [PATCH] Fix tex code to handle broken nomenclature package. (Fixes test failure on centos5 slave). Code by Rob Managan. git-svn-id: http://scons.tigris.org/svn/scons/trunk@4362 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- src/engine/SCons/Tool/tex.py | 4 ++-- test/TEX/nomencl.py | 24 ++++++++++++++++-------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/src/engine/SCons/Tool/tex.py b/src/engine/SCons/Tool/tex.py index 35022dc8..77715f4b 100644 --- a/src/engine/SCons/Tool/tex.py +++ b/src/engine/SCons/Tool/tex.py @@ -329,7 +329,7 @@ def InternalLaTeXAuxAction(XXXLaTeXAction, target = None, source= None, env=None result = MakeNclAction(nclfile, nclfile, env) if result != 0: print env['MAKENCL']," (nomenclature) returned an error, check the nlg file" - return result + #return result # Now decide if latex will need to be run again due to glossary. if check_MD5(suffix_nodes['.glo'],'.glo') or (count == 1 and run_glossaries) or (count == 1 and run_glossary): @@ -340,7 +340,7 @@ def InternalLaTeXAuxAction(XXXLaTeXAction, target = None, source= None, env=None result = MakeGlossaryAction(glofile, glofile, env) if result != 0: print env['MAKEGLOSSARY']," (glossary) returned an error, check the glg file" - return result + #return result # Now decide if latex will need to be run again due to acronyms. if check_MD5(suffix_nodes['.acn'],'.acn') or (count == 1 and run_acronyms): diff --git a/test/TEX/nomencl.py b/test/TEX/nomencl.py index 63359f56..2aadeef4 100644 --- a/test/TEX/nomencl.py +++ b/test/TEX/nomencl.py @@ -56,16 +56,24 @@ test.write('nomencl.tex', r""" \usepackage[refpage]{nomencl} +%handle old version of nomencl.sty +\ifdefined\makenomenclature \makenomenclature - +\else +\makeglossary +\fi \begin{document} A nomenclature entry \nomenclature{gnu}{an animal or software group} and another\nomenclature{nix}{not sure}. +%handle old version of nomencl.sty +\ifdefined\printnomenclature \printnomenclature - +\else +\printglossary +\fi \end{document} """) @@ -73,9 +81,9 @@ test.run(arguments = '.', stderr=None) test.must_exist(test.workpath('nomencl.aux')) test.must_exist(test.workpath('nomencl.fls')) -test.must_exist(test.workpath('nomencl.nlg')) -test.must_exist(test.workpath('nomencl.nlo')) -test.must_exist(test.workpath('nomencl.nls')) +#test.must_exist(test.workpath('nomencl.nlg')) # old version of nomencl.sty generates .glg, .glo, and .gls +#test.must_exist(test.workpath('nomencl.nlo')) +#test.must_exist(test.workpath('nomencl.nls')) test.must_exist(test.workpath('nomencl.log')) test.must_exist(test.workpath('nomencl.pdf')) @@ -86,9 +94,9 @@ test.must_not_contain_any_line(test.stdout(), [x]) test.must_not_exist(test.workpath('nomencl.aux')) test.must_not_exist(test.workpath('nomencl.fls')) -test.must_not_exist(test.workpath('nomencl.nlg')) -test.must_not_exist(test.workpath('nomencl.nlo')) -test.must_not_exist(test.workpath('nomencl.nls')) +#test.must_not_exist(test.workpath('nomencl.nlg')) +#test.must_not_exist(test.workpath('nomencl.nlo')) +#test.must_not_exist(test.workpath('nomencl.nls')) test.must_not_exist(test.workpath('nomencl.log')) test.must_not_exist(test.workpath('nomencl.pdf')) -- 2.26.2