From b5b3f7627bc52cdba2e4245fac3741727613db50 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Wed, 16 Sep 2009 17:44:46 +0000 Subject: Fix tex code to handle broken nomenclature package. (Fixes test failure on centos5 slave). Code by Rob Managan. --- 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 35022dc..77715f4 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 63359f5..2aadeef 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')) -- cgit v0.12