Fred Drake avatar Fred Drake committed a53eabe

Make sure LaTeX2HTML's $TEXINPUTS variable is initialized to include
directories identified in the TEXINPUTS environment variable.
I think this is the last part of the fix for the version number
problems seen in the documentation for the 2.3.1 release.

Comments (0)

Files changed (1)

Doc/perl/l2hinit.perl

     # seems to be sufficiently general that it should be fine for HOWTO
     # processing.
     #
+    # XXX This still isn't quite right; we should actually be inserting
+    # $mytexinputs just before any empty entry in TEXINPUTS is one
+    # exists instead of just concatenating the pieces like we do here.
+    #
     my $file = $_[0];
     my($jobname, $dir, $ext) = fileparse($file, '\..*');
     $dir = L2hos->Make_directory_absolute($dir);
     $dir =~ s/$dd$//;
     $TEXINPUTS = "$dir$envkey$mytexinputs";
-    print "\nAdding $dir to \$TEXINPUTS\n";
+    # Push everything into $TEXINPUTS since LaTeX2HTML doesn't pick
+    # this up on it's own; we clear $ENV{'TEXINPUTS'} so the value set
+    # for this by the main LaTeX2HTML script doesn't contain duplicate
+    # directories.
+    if ($ENV{'TEXINPUTS'}) {
+        $TEXINPUTS .= "$envkey$ENV{'TEXINPUTS'}";
+        $ENV{'TEXINPUTS'} = undef;
+    }
+    print "\nSetting \$TEXINPUTS to $TEXINPUTS\n";
 }
 
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.