diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2017-03-27 06:05:29 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2017-03-27 06:05:29 +0000 |
commit | f89ea7b1a9bd6f81482cefe5b72b09d7e6253046 (patch) | |
tree | fb05d0d8fd24f011d3586176c8b5002be268da2b /Master | |
parent | cc8c506a5a9c968f0e59726d879f2cd4fa19a1f8 (diff) |
xindy.pl: if module name contains directory separators, don't call kpsewhich to obtain better performance
git-svn-id: svn://tug.org/texlive/trunk@43614 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-x | Master/texmf-dist/scripts/xindy/xindy.pl | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/Master/texmf-dist/scripts/xindy/xindy.pl b/Master/texmf-dist/scripts/xindy/xindy.pl index 7f7254aeadc..7b964f15277 100755 --- a/Master/texmf-dist/scripts/xindy/xindy.pl +++ b/Master/texmf-dist/scripts/xindy/xindy.pl @@ -803,12 +803,20 @@ sub xindy_expression () { push (@temp_files, $style_file); $style_file=quotify($style_file); foreach my $module ( @modules ) { - my $fnmodule=`kpsewhich -progname=xindy -format=othertext $module`; - if ($fnmodule) { - chomp($fnmodule); - print $sf "(require \"$fnmodule\")\n"; - } else { + if (($module =~ /\//) || ($module =~ /\\/)) { + # If $module contains directory separators, the module must be a system + # module, So we don't call kpsewhich. print $sf "(require \"$module\")\n"; + } else { + # Here we call kpsewhich to search for a module. Thus modules can be under + # (anytexmf)/xindy/modules/ + my $fnmodule=`kpsewhich -progname=xindy -format=othertext $module`; + if ($fnmodule) { + chomp($fnmodule); + print $sf "(require \"$fnmodule\")\n"; + } else { + print $sf "(require \"$module\")\n"; + } } } close ($sf); |