texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: Explicit data dir for modules in ModulePath


From: Patrice Dumas
Subject: branch master updated: Explicit data dir for modules in ModulePath
Date: Sat, 30 Jul 2022 08:05:16 -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 478ace0f14 Explicit data dir for modules in ModulePath
478ace0f14 is described below

commit 478ace0f1498ce8ba766b4bffb1530c9eb3d83b2
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Jul 30 14:05:01 2022 +0200

    Explicit data dir for modules in ModulePath
    
    * tp/texi2any.pl (BEGIN), tp/Texinfo/ModulePath.pm.in (init),
    tp/Texinfo/Convert/HTML.pm (output): add a third argument to
    ModulePath init() to be able to distinguish data dir from modules
    library dir and XS object files directory.  Do not use our for
    directory name variables that are not supposed to be reused in
    other code, but only used to add to @INC.  If uninstalled, do
    not add to @INC directories that are only needed when installed.
    use pkgdatadir for js $jssrcdir.
    
    * tp/texi2any.pl: changes in spacing.
---
 ChangeLog                                      | 15 ++++++++++++
 tp/Texinfo/Common.pm                           |  2 +-
 tp/Texinfo/Convert/HTML.pm                     |  2 +-
 tp/Texinfo/ModulePath.pm.in                    | 27 ++++++++++++--------
 tp/t/01use.t                                   |  7 +-----
 tp/t/02coverage.t                              |  2 +-
 tp/t/03coverage_braces.t                       |  2 +-
 tp/t/04verb.t                                  |  2 +-
 tp/t/05paragraph.t                             |  2 +-
 tp/t/06columnfractions.t                       |  2 +-
 tp/t/08misc_commands.t                         |  2 +-
 tp/t/09indices.t                               |  2 +-
 tp/t/10menu.t                                  |  2 +-
 tp/t/16raw.t                                   |  2 +-
 tp/t/181quotation.t                            |  2 +-
 tp/t/18itemize.t                               |  2 +-
 tp/t/19def.t                                   |  2 +-
 tp/t/20preformatted.t                          |  2 +-
 tp/t/21multitable.t                            |  2 +-
 tp/t/22xtable.t                                |  2 +-
 tp/t/25regions.t                               |  2 +-
 tp/t/27float.t                                 |  2 +-
 tp/t/28heading.t                               |  2 +-
 tp/t/30sectioning.t                            |  2 +-
 tp/t/50value.t                                 |  2 +-
 tp/t/55conditionals.t                          |  2 +-
 tp/t/57invalid_nestings.t                      |  2 +-
 tp/t/58alias.t                                 |  2 +-
 tp/t/60macro.t                                 |  2 +-
 tp/t/70value_and_macro.t                       |  2 +-
 tp/t/80include.t                               |  2 +-
 tp/t/91morecoverage.t                          |  2 +-
 tp/t/92formatting.t                            |  2 +-
 tp/t/93layout.t                                |  2 +-
 tp/t/94htmlxref.t                              |  2 +-
 tp/t/95moreindices.t                           |  2 +-
 tp/t/96moresectioning.t                        |  2 +-
 tp/t/accents.t                                 |  2 +-
 tp/t/automatic_menus.t                         |  2 +-
 tp/t/automatic_nodes.t                         |  2 +-
 tp/t/converters_tests.t                        |  2 +-
 tp/t/do_master_menu.t                          |  2 +-
 tp/t/docbook_tests.t                           |  2 +-
 tp/t/formats_encodings.t                       |  2 +-
 tp/t/html_tests.t                              |  2 +-
 tp/t/index_before_item.t                       |  2 +-
 tp/t/info_tests.t                              |  2 +-
 tp/t/init_files_tests.t                        |  2 +-
 tp/t/languages.t                               |  2 +-
 tp/t/latex_tests.t                             |  2 +-
 tp/t/nodenormalization.t                       |  2 +-
 tp/t/paragraph.t                               |  2 +-
 tp/t/plaintext_tests.t                         |  2 +-
 tp/t/protect_character_in_texinfo.t            |  2 +-
 tp/t/reference_to_text_in_tree.t               |  2 +-
 tp/t/test_brace_count.t                        |  2 +-
 tp/t/test_fill_gaps_in_sectioning.t            |  2 +-
 tp/t/test_is_content_empty.t                   |  2 +-
 tp/t/test_parse_texi_line.t                    |  2 +-
 tp/t/test_parser_registrar.t                   |  2 +-
 tp/t/test_protect_contents.t                   |  2 +-
 tp/t/test_protect_hashchar_at_line_beginning.t |  2 +-
 tp/t/test_sort.t                               |  2 +-
 tp/t/test_tree_copy.t                          |  2 +-
 tp/t/xml_tests.t                               |  2 +-
 tp/texi2any.pl                                 | 34 ++++++++++++++++----------
 66 files changed, 116 insertions(+), 91 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index bd0f19f5cd..791b4b5864 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2022-07-30  Patrice Dumas  <pertusus@free.fr>
+
+       Explicit data dir for modules in ModulePath
+
+       * tp/texi2any.pl (BEGIN), tp/Texinfo/ModulePath.pm.in (init),
+       tp/Texinfo/Convert/HTML.pm (output): add a third argument to
+       ModulePath init() to be able to distinguish data dir from modules
+       library dir and XS object files directory.  Do not use our for
+       directory name variables that are not supposed to be reused in
+       other code, but only used to add to @INC.  If uninstalled, do
+       not add to @INC directories that are only needed when installed.
+       use pkgdatadir for js $jssrcdir.
+
+       * tp/texi2any.pl: changes in spacing.
+
 2022-07-29  Patrice Dumas  <pertusus@free.fr>
 
        Document that &word should be marked explicitly on @def* lines
diff --git a/tp/Texinfo/Common.pm b/tp/Texinfo/Common.pm
index a078ab93f6..198c28f356 100644
--- a/tp/Texinfo/Common.pm
+++ b/tp/Texinfo/Common.pm
@@ -1158,7 +1158,7 @@ foreach my $formattable_or_formatted_misc_command (
 
 
 # functions for main program.  Should not be called in user-defined code.
-# locate_init_file() is called in HTML Converter for htmlxref files.
+# locate_init_file() is also called in HTML Converter for htmlxref files.
 
 # file:        file name to locate. It can be a file path. Binary string.
 # directories: a reference on a array containing a list of directories to
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 3b83217fb2..16adb69388 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -9855,7 +9855,7 @@ sub output($$)
         my $jssrcdir;
         if (!$Texinfo::ModulePath::texinfo_uninstalled) {
           $jssrcdir = File::Spec->catdir(
-            $Texinfo::ModulePath::lib_dir, 'js');
+            $Texinfo::ModulePath::pkgdatadir, 'js');
         } else {
           $jssrcdir = File::Spec->catdir(
             $Texinfo::ModulePath::top_srcdir, 'js');
diff --git a/tp/Texinfo/ModulePath.pm.in b/tp/Texinfo/ModulePath.pm.in
index 52282b0455..c87ed9bde8 100644
--- a/tp/Texinfo/ModulePath.pm.in
+++ b/tp/Texinfo/ModulePath.pm.in
@@ -20,6 +20,7 @@ use File::Spec;
 # locations.
 our $texinfo_uninstalled = 0;
 
+# uninstalled locations paths, if $Texinfo::ModulePath::texinfo_uninstalled
 # Pathname of the tp/ build directory.  Used to find the locale
 # data.
 our $builddir = '';
@@ -27,8 +28,8 @@ our $builddir = '';
 our $top_builddir;
 our $top_srcdir;
 
-our $lib_dir;
-our $libexec_dir;
+# installed locations paths, if not $Texinfo::ModulePath::texinfo_uninstalled
+our $pkgdatadir;
 
 # If $LIB_DIR and $LIBEXEC_DIR are given,
 # (likely the installation directories)
@@ -37,12 +38,14 @@ our $libexec_dir;
 #
 # LIB_DIR is for bundled libraries.
 # LIBEXEC_DIR is for XS modules.
+# PKGDATADIR is for HTML extensions, javascript
 #
 # otherwise use 'top_srcdir'
 # and 'top_builddir' environment variables.
 sub init {
-  $lib_dir = shift;
-  $libexec_dir = shift;
+  my $lib_dir = shift;
+  my $libexec_dir = shift;
+  $pkgdatadir = shift;
   my %named_args = @_;
 
   if (!$named_args{'installed'}) {
@@ -66,7 +69,6 @@ sub init {
     if (defined($top_srcdir)) {
       # For Texinfo::Parser and the rest.
       unshift @INC, File::Spec->catdir($top_srcdir, 'tp');
-
       $lib_dir = File::Spec->catdir($top_srcdir, 'tp', 'maintain');
     }
 
@@ -85,11 +87,19 @@ sub init {
       $builddir = File::Spec->catdir($top_builddir, 'tp');
     }
 
+  } else {
+    # for the Texinfo modules
+    if (defined($lib_dir)) {
+      unshift @INC, $lib_dir;
+    }
+    # for the XS libraries
+    if (defined($libexec_dir)) {
+      unshift @INC, $libexec_dir;
+    }
   }
 
   if (defined($lib_dir)) {
-    unshift @INC, $lib_dir;
-
+    # Bundled libraries
     # '@USE_EXTERNAL_LIBINTL @' and similar are substituted
     if ('@USE_EXTERNAL_LIBINTL@' ne 'yes') {
       unshift @INC, (File::Spec->catdir($lib_dir, 'lib', 'libintl-perl', 
'lib'));
@@ -102,9 +112,6 @@ sub init {
     }
   }
 
-  if (defined($libexec_dir)) {
-    unshift @INC, $libexec_dir;
-  }
 }
 
 sub import { 
diff --git a/tp/t/01use.t b/tp/t/01use.t
index 4d2664be88..1e62f48de5 100644
--- a/tp/t/01use.t
+++ b/tp/t/01use.t
@@ -1,14 +1,9 @@
-# Before `make install' is performed this script should be runnable with
-# `make test'. After `make install' it should work as `perl 01use.t'
-
-#########################
-
 use strict;
 
 use Test::More;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 use Texinfo::Convert::Texinfo;
 
diff --git a/tp/t/02coverage.t b/tp/t/02coverage.t
index 40d7ebcde7..845f7e44d8 100644
--- a/tp/t/02coverage.t
+++ b/tp/t/02coverage.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/03coverage_braces.t b/tp/t/03coverage_braces.t
index 7a80ea6f9a..aaf66cbfc6 100644
--- a/tp/t/03coverage_braces.t
+++ b/tp/t/03coverage_braces.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/04verb.t b/tp/t/04verb.t
index d28e429a97..12a6bccb31 100644
--- a/tp/t/04verb.t
+++ b/tp/t/04verb.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/05paragraph.t b/tp/t/05paragraph.t
index 8b4ee63b21..7139e4021f 100644
--- a/tp/t/05paragraph.t
+++ b/tp/t/05paragraph.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/06columnfractions.t b/tp/t/06columnfractions.t
index 0d3dc18208..71fc8c89c9 100644
--- a/tp/t/06columnfractions.t
+++ b/tp/t/06columnfractions.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/08misc_commands.t b/tp/t/08misc_commands.t
index 5440c5391d..09d65bbb79 100644
--- a/tp/t/08misc_commands.t
+++ b/tp/t/08misc_commands.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/09indices.t b/tp/t/09indices.t
index e739603a87..3990223d2a 100644
--- a/tp/t/09indices.t
+++ b/tp/t/09indices.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/10menu.t b/tp/t/10menu.t
index b80bb62784..7109628e3c 100644
--- a/tp/t/10menu.t
+++ b/tp/t/10menu.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/16raw.t b/tp/t/16raw.t
index a4f68edfa9..2b62180d85 100644
--- a/tp/t/16raw.t
+++ b/tp/t/16raw.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/181quotation.t b/tp/t/181quotation.t
index 58bbc970d7..6d136b51d5 100644
--- a/tp/t/181quotation.t
+++ b/tp/t/181quotation.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/18itemize.t b/tp/t/18itemize.t
index 60738cb583..2bd5a22c9a 100644
--- a/tp/t/18itemize.t
+++ b/tp/t/18itemize.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/19def.t b/tp/t/19def.t
index 0d752fe844..b48d8de493 100644
--- a/tp/t/19def.t
+++ b/tp/t/19def.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/20preformatted.t b/tp/t/20preformatted.t
index 2d82a0f278..d76e50e828 100644
--- a/tp/t/20preformatted.t
+++ b/tp/t/20preformatted.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/21multitable.t b/tp/t/21multitable.t
index c1c0f76e1e..2494bcaf2c 100644
--- a/tp/t/21multitable.t
+++ b/tp/t/21multitable.t
@@ -3,7 +3,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/22xtable.t b/tp/t/22xtable.t
index e50f4c22db..ad29fc3573 100644
--- a/tp/t/22xtable.t
+++ b/tp/t/22xtable.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/25regions.t b/tp/t/25regions.t
index ee58ad44e1..75c1b4d6a4 100644
--- a/tp/t/25regions.t
+++ b/tp/t/25regions.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/27float.t b/tp/t/27float.t
index cd19b2996d..46a54c1765 100644
--- a/tp/t/27float.t
+++ b/tp/t/27float.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/28heading.t b/tp/t/28heading.t
index 551074425d..ed9ebec602 100644
--- a/tp/t/28heading.t
+++ b/tp/t/28heading.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/30sectioning.t b/tp/t/30sectioning.t
index d5dfa9299d..04f56062a3 100644
--- a/tp/t/30sectioning.t
+++ b/tp/t/30sectioning.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/50value.t b/tp/t/50value.t
index 243fd1df9a..4e5d8ce802 100644
--- a/tp/t/50value.t
+++ b/tp/t/50value.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/55conditionals.t b/tp/t/55conditionals.t
index 7e9062c4dc..4e7e13ef4e 100644
--- a/tp/t/55conditionals.t
+++ b/tp/t/55conditionals.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/57invalid_nestings.t b/tp/t/57invalid_nestings.t
index bc24919ac4..7b7db02e9c 100644
--- a/tp/t/57invalid_nestings.t
+++ b/tp/t/57invalid_nestings.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/58alias.t b/tp/t/58alias.t
index 7e328fb08c..6d64456b1b 100644
--- a/tp/t/58alias.t
+++ b/tp/t/58alias.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/60macro.t b/tp/t/60macro.t
index 96e9ac8487..5cae474483 100644
--- a/tp/t/60macro.t
+++ b/tp/t/60macro.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/70value_and_macro.t b/tp/t/70value_and_macro.t
index 6b14fcf9ac..1a8560e532 100644
--- a/tp/t/70value_and_macro.t
+++ b/tp/t/70value_and_macro.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/80include.t b/tp/t/80include.t
index 4b997e5cee..e410deb7b9 100644
--- a/tp/t/80include.t
+++ b/tp/t/80include.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/91morecoverage.t b/tp/t/91morecoverage.t
index 93bbc04b91..7f1cc9090f 100644
--- a/tp/t/91morecoverage.t
+++ b/tp/t/91morecoverage.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/92formatting.t b/tp/t/92formatting.t
index f7b3a17d88..e5205a4efd 100644
--- a/tp/t/92formatting.t
+++ b/tp/t/92formatting.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/93layout.t b/tp/t/93layout.t
index 3e46771b0d..a0fdcfc4c7 100644
--- a/tp/t/93layout.t
+++ b/tp/t/93layout.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/94htmlxref.t b/tp/t/94htmlxref.t
index bd64a30152..19a0fbcd2e 100644
--- a/tp/t/94htmlxref.t
+++ b/tp/t/94htmlxref.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/95moreindices.t b/tp/t/95moreindices.t
index 50f07315c2..79dec40dc7 100644
--- a/tp/t/95moreindices.t
+++ b/tp/t/95moreindices.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/96moresectioning.t b/tp/t/96moresectioning.t
index 0a42fd33e3..45474b6ba4 100644
--- a/tp/t/96moresectioning.t
+++ b/tp/t/96moresectioning.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/accents.t b/tp/t/accents.t
index b7f0a8a766..c18d183659 100644
--- a/tp/t/accents.t
+++ b/tp/t/accents.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 use Test::More;
 
diff --git a/tp/t/automatic_menus.t b/tp/t/automatic_menus.t
index 6202e7abd9..1058b795d2 100644
--- a/tp/t/automatic_menus.t
+++ b/tp/t/automatic_menus.t
@@ -3,7 +3,7 @@ use strict;
 use Test::More;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 BEGIN { plan tests => 8; }
 
diff --git a/tp/t/automatic_nodes.t b/tp/t/automatic_nodes.t
index 3210ebe923..8d13fd4a5d 100644
--- a/tp/t/automatic_nodes.t
+++ b/tp/t/automatic_nodes.t
@@ -3,7 +3,7 @@ use strict;
 use Test::More;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 BEGIN { plan tests => 24; }
 
diff --git a/tp/t/converters_tests.t b/tp/t/converters_tests.t
index 6aa92523b3..a525ce53ec 100644
--- a/tp/t/converters_tests.t
+++ b/tp/t/converters_tests.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/do_master_menu.t b/tp/t/do_master_menu.t
index 95db9ae5bc..9ea5153251 100644
--- a/tp/t/do_master_menu.t
+++ b/tp/t/do_master_menu.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 use Test::More;
 
diff --git a/tp/t/docbook_tests.t b/tp/t/docbook_tests.t
index b3498b28df..0639603539 100644
--- a/tp/t/docbook_tests.t
+++ b/tp/t/docbook_tests.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/formats_encodings.t b/tp/t/formats_encodings.t
index 3e85f1efcd..7f5b88a9c5 100644
--- a/tp/t/formats_encodings.t
+++ b/tp/t/formats_encodings.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/html_tests.t b/tp/t/html_tests.t
index 3726bfd5f4..b6c2abadb0 100644
--- a/tp/t/html_tests.t
+++ b/tp/t/html_tests.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/index_before_item.t b/tp/t/index_before_item.t
index 845b6aaa44..89a74df546 100644
--- a/tp/t/index_before_item.t
+++ b/tp/t/index_before_item.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 use Test::More;
 
diff --git a/tp/t/info_tests.t b/tp/t/info_tests.t
index 7c16d39422..3b30bc41a5 100644
--- a/tp/t/info_tests.t
+++ b/tp/t/info_tests.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/init_files_tests.t b/tp/t/init_files_tests.t
index 3bb126019e..9d0502f51c 100644
--- a/tp/t/init_files_tests.t
+++ b/tp/t/init_files_tests.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/languages.t b/tp/t/languages.t
index fff3180e9c..b7a0a80100 100644
--- a/tp/t/languages.t
+++ b/tp/t/languages.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/latex_tests.t b/tp/t/latex_tests.t
index a8500dae74..b8fa64cda9 100644
--- a/tp/t/latex_tests.t
+++ b/tp/t/latex_tests.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/nodenormalization.t b/tp/t/nodenormalization.t
index 805c7cf5a7..40bbb88975 100644
--- a/tp/t/nodenormalization.t
+++ b/tp/t/nodenormalization.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 use Test::More;
 
diff --git a/tp/t/paragraph.t b/tp/t/paragraph.t
index 0a739be8cb..2ad62da5ff 100644
--- a/tp/t/paragraph.t
+++ b/tp/t/paragraph.t
@@ -5,7 +5,7 @@ use File::Spec;
 use File::Basename;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 BEGIN { plan tests => 119 ; }
 
diff --git a/tp/t/plaintext_tests.t b/tp/t/plaintext_tests.t
index b5e4724d79..86e6ec943a 100644
--- a/tp/t/plaintext_tests.t
+++ b/tp/t/plaintext_tests.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/t/protect_character_in_texinfo.t 
b/tp/t/protect_character_in_texinfo.t
index f76a3679b2..0a7c05391d 100644
--- a/tp/t/protect_character_in_texinfo.t
+++ b/tp/t/protect_character_in_texinfo.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 use Test::More;
 
diff --git a/tp/t/reference_to_text_in_tree.t b/tp/t/reference_to_text_in_tree.t
index a9577ae340..dba2e65db4 100644
--- a/tp/t/reference_to_text_in_tree.t
+++ b/tp/t/reference_to_text_in_tree.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 use Test::More;
 
diff --git a/tp/t/test_brace_count.t b/tp/t/test_brace_count.t
index 8caf64832b..56264bd565 100644
--- a/tp/t/test_brace_count.t
+++ b/tp/t/test_brace_count.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 use Test::More;
 
diff --git a/tp/t/test_fill_gaps_in_sectioning.t 
b/tp/t/test_fill_gaps_in_sectioning.t
index 0fc1e47f7d..5aba2e9df3 100644
--- a/tp/t/test_fill_gaps_in_sectioning.t
+++ b/tp/t/test_fill_gaps_in_sectioning.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 use Test::More;
 
diff --git a/tp/t/test_is_content_empty.t b/tp/t/test_is_content_empty.t
index 02e5688657..bd870a5f40 100644
--- a/tp/t/test_is_content_empty.t
+++ b/tp/t/test_is_content_empty.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 use Test::More;
 
diff --git a/tp/t/test_parse_texi_line.t b/tp/t/test_parse_texi_line.t
index 2ed3b2331e..26630ae48e 100644
--- a/tp/t/test_parse_texi_line.t
+++ b/tp/t/test_parse_texi_line.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 use Test::More;
 
diff --git a/tp/t/test_parser_registrar.t b/tp/t/test_parser_registrar.t
index a41764a4ef..125e138e56 100644
--- a/tp/t/test_parser_registrar.t
+++ b/tp/t/test_parser_registrar.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 use Test::More;
 
diff --git a/tp/t/test_protect_contents.t b/tp/t/test_protect_contents.t
index 1ae3f07be8..52a754e55f 100644
--- a/tp/t/test_protect_contents.t
+++ b/tp/t/test_protect_contents.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 use Test::More;
 
diff --git a/tp/t/test_protect_hashchar_at_line_beginning.t 
b/tp/t/test_protect_hashchar_at_line_beginning.t
index f5cc2cbb5f..27102fd41f 100644
--- a/tp/t/test_protect_hashchar_at_line_beginning.t
+++ b/tp/t/test_protect_hashchar_at_line_beginning.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 use Test::More;
 
diff --git a/tp/t/test_sort.t b/tp/t/test_sort.t
index cbc4660685..0ae46393a2 100644
--- a/tp/t/test_sort.t
+++ b/tp/t/test_sort.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 use Test::More;
 BEGIN { plan tests => 6; };
diff --git a/tp/t/test_tree_copy.t b/tp/t/test_tree_copy.t
index d88dcb41ee..66541ea5ff 100644
--- a/tp/t/test_tree_copy.t
+++ b/tp/t/test_tree_copy.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 use Test::More;
 
diff --git a/tp/t/xml_tests.t b/tp/t/xml_tests.t
index 7e2e2f9fdb..86c4a79198 100644
--- a/tp/t/xml_tests.t
+++ b/tp/t/xml_tests.t
@@ -1,7 +1,7 @@
 use strict;
 
 use lib '.';
-use Texinfo::ModulePath (undef, undef, 'updirs' => 2);
+use Texinfo::ModulePath (undef, undef, undef, 'updirs' => 2);
 
 require 't/test_utils.pl';
 
diff --git a/tp/texi2any.pl b/tp/texi2any.pl
index 86d53a84a7..0acccf3a43 100755
--- a/tp/texi2any.pl
+++ b/tp/texi2any.pl
@@ -46,8 +46,8 @@ Getopt::Long::Configure("gnu_getopt");
 
 my ($real_command_name, $command_directory, $command_suffix);
 
-# This big BEGIN block deals with finding modules and 
-# some dependencies that we ship 
+# This big BEGIN block deals with finding modules and
+# some dependencies that we ship
 # * in source or
 # * installed or
 # * installed relative to the script
@@ -55,14 +55,14 @@ BEGIN
 {
   # emulate -w
   $^W = 1;
-  ($real_command_name, $command_directory, $command_suffix) 
+  ($real_command_name, $command_directory, $command_suffix)
      = fileparse($0, '.pl');
   my $updir = File::Spec->updir();
 
   # These are substituted by the Makefile to create "texi2any".
   my $datadir = '@datadir@';
   my $package = '@PACKAGE@';
-  my $packagedir = '@pkglibdir@';
+  my $xsdir = '@pkglibdir@';
 
   if ($datadir eq '@' .'datadir@'
       or defined($ENV{'TEXINFO_DEV_SOURCE'})
@@ -78,26 +78,33 @@ BEGIN
     }
 
     require Texinfo::ModulePath;
-    Texinfo::ModulePath::init(undef, undef, 'updirs' => 1);
+    Texinfo::ModulePath::init(undef, undef, undef, 'updirs' => 1);
   } else {
     # Look for modules in their installed locations.
     my $lib_dir = File::Spec->catdir($datadir, $package);
+    # look for package data in the installed location.
+    # actually the same as $pkgdatadir in main program below, but use
+    # another name to avoid confusion.
+    my $modules_pkgdatadir = $lib_dir;
 
     # try to make package relocatable, will only work if
     # standard relative paths are used
     if (! -f File::Spec->catfile($lib_dir, 'Texinfo', 'Parser.pm')
-        and -f File::Spec->catfile($command_directory, $updir, 'share', 
+        and -f File::Spec->catfile($command_directory, $updir, 'share',
                                    $package, 'Texinfo', 'Parser.pm')) {
-      $lib_dir = File::Spec->catdir($command_directory, $updir, 
+      $lib_dir = File::Spec->catdir($command_directory, $updir,
                                           'share', $package);
-      $packagedir = File::Spec->catdir($command_directory, $updir, 
+      $modules_pkgdatadir = File::Spec->catdir($command_directory, $updir,
+                                          'share', $package);
+      $xsdir = File::Spec->catdir($command_directory, $updir,
                                           'lib', $package);
     }
 
     unshift @INC, $lib_dir;
 
     require Texinfo::ModulePath;
-    Texinfo::ModulePath::init($lib_dir, $packagedir, 'installed' => 1);
+    Texinfo::ModulePath::init($lib_dir, $xsdir, $modules_pkgdatadir,
+                              'installed' => 1);
   }
 } # end BEGIN
 
@@ -183,23 +190,24 @@ if ($Texinfo::ModulePath::texinfo_uninstalled) {
   my $locales_dir = File::Spec->catdir($Texinfo::ModulePath::builddir,
                                        'LocaleData');
   if (-d $locales_dir) {
-    Locale::Messages::bindtextdomain ($strings_textdomain, $locales_dir);
+    Locale::Messages::bindtextdomain($strings_textdomain, $locales_dir);
   } else {
     warn "Locales dir for document strings not found\n";
   }
 } else {
-  Locale::Messages::bindtextdomain ($strings_textdomain, 
+  Locale::Messages::bindtextdomain($strings_textdomain,
                                     File::Spec->catdir($datadir, 'locale'));
 }
 
 # Note: this uses installed messages even when the program is uninstalled
-Locale::Messages::bindtextdomain ($messages_textdomain,
+Locale::Messages::bindtextdomain($messages_textdomain,
                                 File::Spec->catdir($datadir, 'locale'));
 
 
 # Version setting is complicated, because we cope with 
 # * script with configure values substituted or not
 # * script shipped as part of texinfo or as a standalone perl module
+#   (although standalone module infrastructure was removed in 2019)
 
 # When shipped as a perl modules, $hardcoded_version is set to undef here
 # by a sed one liner.  The consequence is that configure.ac is not used
@@ -253,7 +261,7 @@ $configured_package = 'Texinfo' if ($configured_package eq 
'@' . 'PACKAGE@');
 my $configured_name = '@PACKAGE_NAME@';
 $configured_name = $configured_package 
   if ($configured_name eq '@' .'PACKAGE_NAME@');
-my $configured_name_version = "$configured_name $configured_version"; 
+my $configured_name_version = "$configured_name $configured_version";
 my $configured_url = '@PACKAGE_URL@';
 $configured_url = 'http://www.gnu.org/software/texinfo/'
   if ($configured_url eq '@' .'PACKAGE_URL@');



reply via email to

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