texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: * doc/texinfo.texi (HTML Xref Configuration), tp


From: Patrice Dumas
Subject: branch master updated: * doc/texinfo.texi (HTML Xref Configuration), tp/texi2any.pl (@texinfo_language_config_dirs): prepend curdir before the call of converter, and also add the leading input file path directory if there is a leading directory and it is not the current directory.
Date: Sun, 25 Aug 2024 12:57:19 -0400

This is an automated email from the git hooks/post-receive script.

pertusus pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new b501cc926e * doc/texinfo.texi (HTML Xref Configuration), 
tp/texi2any.pl (@texinfo_language_config_dirs): prepend curdir before the call 
of converter, and also add the leading input file path directory if there is a 
leading directory and it is not the current directory.
b501cc926e is described below

commit b501cc926e6d2dd73e1e09f5668e873bae41296f
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Aug 25 18:57:19 2024 +0200

    * doc/texinfo.texi (HTML Xref Configuration), tp/texi2any.pl
    (@texinfo_language_config_dirs): prepend curdir before the call of
    converter, and also add the leading input file path directory if
    there is a leading directory and it is not the current directory.
---
 ChangeLog        |  7 +++++++
 doc/texinfo.texi |  5 +++++
 tp/texi2any.pl   | 12 ++++++++++--
 3 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 194c29c546..8d7149b3ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-08-25  Patrice Dumas  <pertusus@free.fr>
+
+       * doc/texinfo.texi (HTML Xref Configuration), tp/texi2any.pl
+       (@texinfo_language_config_dirs): prepend curdir before the call of
+       converter, and also add the leading input file path directory if
+       there is a leading directory and it is not the current directory.
+
 2024-08-25  Patrice Dumas  <pertusus@free.fr>
 
        * doc/texinfo.texi (Invoking @command{texi2any}): correct -I and -P
diff --git a/doc/texinfo.texi b/doc/texinfo.texi
index b1c901b576..cc772d93ad 100644
--- a/doc/texinfo.texi
+++ b/doc/texinfo.texi
@@ -17838,6 +17838,11 @@ is looked for in the following directories:
 @item ./
 (the current directory)
 
+@item leading input file path directory
+If there is a leading directory and it is not the current directory.
+For example, if the input file is @file{some/dir/mymanual.texi},
+@file{htmlxref.cnf} is searched for in @file{some/dir}.
+
 @item ./.texinfo/
 (under the current directory)
 
diff --git a/tp/texi2any.pl b/tp/texi2any.pl
index d8c6fcfbad..a6d9ef2332 100755
--- a/tp/texi2any.pl
+++ b/tp/texi2any.pl
@@ -383,7 +383,8 @@ my $conf_file_name = 'texi2any-config.pm';
 
 # directories for Texinfo configuration files, as far as possible
 # implementation independent.  Used as part of binary strings.
-my @texinfo_language_config_dirs = File::Spec->catdir($curdir, '.texinfo');
+# curdir and the input file path directory are prepended later on.
+my @texinfo_language_config_dirs = File::Spec->catdir('.texinfo');
 push @texinfo_language_config_dirs, File::Spec->catdir($ENV{'HOME'}, 
'.texinfo')
                                 if (defined($ENV{'HOME'}));
 push @texinfo_language_config_dirs, File::Spec->catdir($sysconfdir, 'texinfo')
@@ -405,7 +406,7 @@ push @program_config_dirs, File::Spec->catdir($datadir, 
$program_name)
   if (defined($datadir));
 
 @program_init_dirs = @program_config_dirs;
-foreach my $texinfo_config_dir (@texinfo_language_config_dirs) {
+foreach my $texinfo_config_dir ($curdir, @texinfo_language_config_dirs) {
   push @program_init_dirs, File::Spec->catdir($texinfo_config_dir, 'init');
 }
 
@@ -1767,6 +1768,13 @@ while(@input_files) {
   unshift @{$converter_options->{'INCLUDE_DIRECTORIES'}},
           @prepended_include_directories;
 
+  my @prepended_texinfo_language_directories = ($curdir);
+  push @prepended_texinfo_language_directories, $input_directory
+      if ($input_directory ne $curdir);
+
+  unshift @{$converter_options->{'TEXINFO_LANGUAGE_DIRECTORIES'},
+           @prepended_texinfo_language_directories;
+
   my $converter = &{$formats_table{$converted_format}
         ->{'converter'}}($converter_options);
   $converter->output($document);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]