summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorVladimir Volovich <vvv@vsu.ru>2008-05-10 09:14:29 +0000
committerVladimir Volovich <vvv@vsu.ru>2008-05-10 09:14:29 +0000
commite305bacf7942f17f6ab75aaa769d205462cd4015 (patch)
tree735bf5af87276d3876895ca2c0e5c04e1428a3ed /Build
parent3a838dd7accc6aa0c0b90623bca681fb12fbafb3 (diff)
stop if the input file(s) do not exist; otherwise xindy showed a warning in create_raw_index() and continued.
======================================== workaround for a woe32 problem (it is yet unclear how to solve it): apparently the "nul" file, when opened multiple times, causes a problem. when no logfile is given, it defaulted to nul file, which caused error in xindy-lisp.exe. still reproducible by specifying "-t nul", e.g.: xindy -t nul -M texindy x.idx [...] ERROR: OPEN: #<OUTPUT UNBUFFERED FILE-STREAM CHARACTER #P"nul"> already points to file "Z:\\Master\\texmf\\xindy\\base\\latex.xdy", opening the file again for :INPUT-IMMUTABLE may produce unexpected results so we set the log file to *.ilg on woe32 unless it is explicitly specified. another contributor factor to this problem is the "-q" option which also tries to use "nul" and this causes a problem: xindy -q -M texindy x.idx ERROR: OPEN: #<OUTPUT UNBUFFERED FILE-STREAM CHARACTER> already points to file "Z:\\Master\\texmf\\xindy\\base\\numeric-sort.xdy", opening the file again for :INPUT-IMMUTABLE may produce unexpected results ======================================== workaround for a woe32 problem: delete the output file if it already exists prior to calling xindy, otherwise it is unable to overwrite it. (this does not happen with the log file which it is able to overwrite) ======================================== strangely, i did not see the last 2 problems in my previous tests. it may be caused by a clisp bug. git-svn-id: svn://tug.org/texlive/trunk@8008 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/utils/xindy/user-commands/xindy.in8
1 files changed, 6 insertions, 2 deletions
diff --git a/Build/source/utils/xindy/user-commands/xindy.in b/Build/source/utils/xindy/user-commands/xindy.in
index 997d5613eb1..34563aac476 100644
--- a/Build/source/utils/xindy/user-commands/xindy.in
+++ b/Build/source/utils/xindy/user-commands/xindy.in
@@ -424,6 +424,7 @@ END {
our $raw_index = File::Spec->devnull;
unless ( $interactive ) {
+ for my $f (@ARGV) { die "$f does not exist" if ! -f $f }
$raw_index = create_raw_index(); # processes @ARGV
my $filter_cmd = '';
if ( $input_markup eq 'latex' ) {
@@ -511,6 +512,8 @@ sub parse_options() {
}
my ($name, $path, $suffix) = fileparse ($ARGV[0], '\.[^\.]+');
$outfile = "$path$name.ind";
+ # FIXME opening "nul" multiple times causes a problem on woe32
+ $logfile = "$path$name.ilg" if $^O eq "MSWin32" && ! defined $logfile;
}
# FIXME: xindy wants a log file. Really?
@@ -670,7 +673,7 @@ sub xindy_expression () {
}
$style_file = quotify($style_file);
- $outfile = quotify($outfile);
+ my $outfile_q = quotify($outfile);
$raw_index = quotify($raw_index);
$logging = ':logfile ' . quotify($logfile) if $logfile;
$tracing = ':markup-trace :on' if $debug{markup};
@@ -683,7 +686,7 @@ sub xindy_expression () {
(xindy:startup
:idxstyle $style_file
:rawindex $raw_index
- :output $outfile
+ :output $outfile_q
$logging
$tracing
$trace_level)
@@ -722,6 +725,7 @@ sub call_xindy ( $$ ) {
if ( $quiet && ! $interactive ) {
open (STDOUT, '>', File::Spec->devnull);
}
+ unlink($outfile) if $^O eq "MSWin32" && -f $outfile;
system @command;
if ( $? == -1 ) {
print STDERR "$cmd: Could not execute xindy kernel: $!\n";