From f89ea7b1a9bd6f81482cefe5b72b09d7e6253046 Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Mon, 27 Mar 2017 06:05:29 +0000 Subject: 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 --- Master/texmf-dist/scripts/xindy/xindy.pl | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'Master') 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); -- cgit v1.2.3