diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2012-08-25 09:55:20 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2012-08-25 09:55:20 +0000 |
commit | ec5a37d9d354d9027f8a0c1500324c68dccb7f14 (patch) | |
tree | 8504c2c043d7d228154321202ba7ee94b3f7ed42 /Master/texmf/scripts | |
parent | fa2e99a34911b75e0ef78fb9f6dee43476b2312b (diff) |
use current directory for temporary files in xindy on Windows
git-svn-id: svn://tug.org/texlive/trunk@27520 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf/scripts')
-rwxr-xr-x | Master/texmf/scripts/xindy/xindy.pl | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/Master/texmf/scripts/xindy/xindy.pl b/Master/texmf/scripts/xindy/xindy.pl index fa87bf8a333..a1fecf65a29 100755 --- a/Master/texmf/scripts/xindy/xindy.pl +++ b/Master/texmf/scripts/xindy/xindy.pl @@ -348,6 +348,17 @@ our $cmd = basename($0); our ($lib_dir, $modules_dir); +# xindy-lisp.exe for Windows seems to be unable to interpret the short-name +# format which is a default for the variables TEMP and TMP in Windows OS. +# As a workaround, we create temporary files in the current directory +# in xindy on Windows. + +if ( $is_w32 ) { +use Env qw(TMPDIR); +Env::import(); +$TMPDIR = "."; +} + # We have different installation structures for TeX-Live and a # standalone installation. In TeX-Live, the user command is a symlink # in some bin directory, and the actual script is in the library @@ -643,6 +654,7 @@ sub handle_signals () { sub create_raw_index () { my ($output, $outfile) = tempfile(); push (@temp_files, $outfile); + $outfile=quotify($outfile); while ( <> ) { print $output $_; } @@ -661,9 +673,8 @@ sub create_raw_index () { sub filter_index ( $$ ) { my ($filter, $input) = @_; my $output = tmpnam(); - $output=quotify($output); - $input=quotify($input); push (@temp_files, $output); + $output=quotify($output); print "Running filter: $filter <$input >$output\n" if $verbose; system "$filter <$input >$output"; print "filtered xindy input file: $output\n" if $debug{script}; @@ -739,13 +750,13 @@ sub xindy_expression () { my $sf; ($sf, $style_file) = tempfile(); push (@temp_files, $style_file); + $style_file=quotify($style_file); foreach my $module ( @modules ) { print $sf "(require \"$module\")\n"; } close ($sf); } - $style_file = quotify($style_file); $outfile = quotify($outfile); $logging = ':logfile ' . quotify($logfile) if $logfile; $tracing = ':markup-trace :on' if $debug{markup}; @@ -781,6 +792,7 @@ sub call_xindy ( $$ ) { } elsif ($is_w32) { my ($output, $outfile) = tempfile(); push (@temp_files, $outfile); + $outfile=quotify($outfile); print $output $xindy_exp; close ($output); print "xindy startup file: $outfile\n" if $debug{script}; |