bug-texinfo
[Top][All Lists]
Advanced

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

Re: Directory names hard-coded in Texinfo Perl scripts


From: Eli Zaretskii
Subject: Re: Directory names hard-coded in Texinfo Perl scripts
Date: Fri, 17 Dec 2021 08:58:04 +0200

> From: Gavin Smith <gavinsmith0123@gmail.com>
> Date: Thu, 16 Dec 2021 23:12:15 +0000
> Cc: bug-texinfo@gnu.org
> 
> On Thu, Dec 16, 2021 at 11:52:19AM +0200, Eli Zaretskii wrote:
> > Hi,
> > 
> > I routinely make my MS-Windows/MinGW builds of Texinfo for others to
> > use, here:
> > 
> >   https://sourceforge.net/projects/ezwinports/
> > 
> > Recently, a user complained to me that starting with Texinfo 6.7, the
> > Texinfo Perl scripts won't work unless the binary distro is installed
> > in the same directory for which I configured it.  This is unfortunate,
> > since it requires users to modify their installation trees and/or PATH
> > variables to follow my local conventions.
> 
> Can you be clearer as to what is meant by "binary distro"?  Is it the
> files like /usr/lib/texinfo/XSParagraph.so?

No, I mean the Perl scripts that are installed with makeinfo, as part
of a Texinfo installation.  The distribution I'm talking about
includes everything that "make install" installs, in a tree whose
structure is according to the various configure variables: execdir,
datadir, etc., which are all derived from --prefix.

> I don't understand how the program can find these files if they are
> moved from their installed locations.

The installed tree is moved as a whole.  E.g., instead of being under
/usr, with directories like bin/, share/, lib/, etc., this whole tree
is move to /foo/bar/somewhere/else with the same subdirectories.  So
the relative path from bin/makeinfo to, say, share/texinfo/Texinfo is
the same as it is in the original installation, only the absolute file
names are different.

> > Would it be possible to restore the capability we evidently had in
> > Texinfo 6.6 and before, whereby the Perl scripts could use directory
> > names relative to their invocation directory?  I believe that code was
> > changed for unrelated reasons (perhaps to support better the use-case
> > of running Texinfo uninstalled?), but the ability to relocate the
> > installation root of the scripts is IMO also valuable, regardless.
> 
> I can't remember the details of the changes.  Looking at
> "git log tp/Texinfo/ModulePath.pm.in" it appears that there were some changes
> shortly after 6.7 was released.  Are these the changes that were responsible?

No, I think this was before 6.7.  If I compare makeinfo between 6.6
and 6.7, I see that these parts were modified:

    # To find Texinfo::ModulePath
    if (!defined($ENV{'top_builddir'})) {
      $ENV{'top_builddir'} = File::Spec->catdir($command_directory, $updir);
      $ENV{'top_srcdir'} = File::Spec->catdir($command_directory, $updir);
    }
[...]
  my $srcdir;
  if (defined($ENV{'top_srcdir'})) {
    $srcdir = File::Spec->catdir($ENV{'top_srcdir'}, 'tp');
  } else {
    $srcdir = $command_directory;
  }

I'm not sure my understanding is correct, but it looks like makeinfo
6.6 was using the directory where makeinfo resides to find the other
files and directories, and that enabled relocation of the installed
tree to be rooted at a directory different from what was specified as
the value of --prefix at configure time.

I hope I explained the situation; if not, please ask more questions.

Thanks.



reply via email to

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