diff options
author | Karl Berry <karl@freefriends.org> | 2009-11-13 16:23:27 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-11-13 16:23:27 +0000 |
commit | 6cc2c89243924fb671f0ad637ed718b99933fbde (patch) | |
tree | 6a827d14bb8c3089e7525b43a81c2510167848fb /Master/texmf-dist/scripts | |
parent | 9f6934cabc90af62c40c7ed913cf91f6a9c6f61a (diff) |
glossaries 2.4 (10nov09)
git-svn-id: svn://tug.org/texlive/trunk@16008 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts')
-rwxr-xr-x | Master/texmf-dist/scripts/glossaries/makeglossaries | 41 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/glossaries/makeglossaries.bat | 6 |
2 files changed, 31 insertions, 16 deletions
diff --git a/Master/texmf-dist/scripts/glossaries/makeglossaries b/Master/texmf-dist/scripts/glossaries/makeglossaries index 827ec71a1db..58077a46a42 100755 --- a/Master/texmf-dist/scripts/glossaries/makeglossaries +++ b/Master/texmf-dist/scripts/glossaries/makeglossaries @@ -2,7 +2,7 @@ # File : makeglossaries # Author : Nicola Talbot -# Version : 1.7 (2009/09/23) +# Version : 1.8 (2009/11/03) # Description: simple Perl script that calls makeindex or xindy. # Intended for use with "glossaries.sty" (saves having to remember # all the various switches) @@ -30,6 +30,9 @@ my $version="1.7 (2009-09-23)"; # History: +# v1.8 (2009-11-03) : +# * Create an empty output file if the input file is empty +# without calling xindy/makeindex # v1.7 (2009-09-23) : # * Issue warning rather than error when empty/non existant file # checks fail @@ -334,6 +337,17 @@ else my $inputfile = "$name.$thistype{in}"; + my $outfile; + + if ($opt_o eq "") + { + $outfile = "$name.$thistype{out}"; + } + else + { + $outfile = $opt_o; + } + # v1.7 print warnings to STDOUT instead of STDERR # v1.6 added file existance test @@ -355,20 +369,21 @@ else if (-z $inputfile) { print "Warning: File '$inputfile' is empty.\n", - "Have you used any entries defined in glossary '$type'?\n", - "*** Skipping glossary '$type'. ***\n"; - next; - } + "Have you used any entries defined in glossary '$type'?\n"; - my $outfile; + # create an empty output file and move on to the next glossary - if ($opt_o eq "") - { - $outfile = "$name.$thistype{out}"; - } - else - { - $outfile = $opt_o; + if (open OFD, ">$outfile") + { + print OFD "\\null\n"; + close OFD; + } + else + { + print STDERR "Unable to create '$outfile' $!\n"; + } + + next; } my $transcript; diff --git a/Master/texmf-dist/scripts/glossaries/makeglossaries.bat b/Master/texmf-dist/scripts/glossaries/makeglossaries.bat index 64a6a20750c..d91f67bd3e9 100755 --- a/Master/texmf-dist/scripts/glossaries/makeglossaries.bat +++ b/Master/texmf-dist/scripts/glossaries/makeglossaries.bat @@ -1,3 +1,3 @@ -@rem = '-*- Perl -*-
-@echo off
-perl -S "%~dp0makeglossaries" %*
+@rem = '-*- Perl -*- +@echo off +perl -S "%~dp0makeglossaries" %* |