texlive[43614] Master/texmf-dist/scripts/xindy/xindy.pl: xindy.pl: if

commits+kakuto at tug.org commits+kakuto at tug.org
Mon Mar 27 08:05:29 CEST 2017


Revision: 43614
          http://tug.org/svn/texlive?view=revision&revision=43614
Author:   kakuto
Date:     2017-03-27 08:05:29 +0200 (Mon, 27 Mar 2017)
Log Message:
-----------
xindy.pl: if module name contains directory separators, don't call kpsewhich to obtain better performance

Modified Paths:
--------------
    trunk/Master/texmf-dist/scripts/xindy/xindy.pl

Modified: trunk/Master/texmf-dist/scripts/xindy/xindy.pl
===================================================================
--- trunk/Master/texmf-dist/scripts/xindy/xindy.pl	2017-03-27 00:05:46 UTC (rev 43613)
+++ trunk/Master/texmf-dist/scripts/xindy/xindy.pl	2017-03-27 06:05:29 UTC (rev 43614)
@@ -803,12 +803,20 @@
 	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";
+	    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 {
-		print $sf "(require \"$module\")\n";
+    # 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);



More information about the tex-live-commits mailing list