bug-texinfo
[Top][All Lists]
Advanced

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

Re: Fix an error during "./configure; make dist"


From: Gavin Smith
Subject: Re: Fix an error during "./configure; make dist"
Date: Fri, 9 Aug 2024 23:08:02 +0100

On Fri, Aug 09, 2024 at 05:31:32PM +0200, Patrice Dumas wrote:
> Hello,
> 
> The other cases raised by Bruno have been fixed, but this one still
> fails:
> 
> On Tue, Aug 06, 2024 at 06:59:28AM +0200, Bruno Haible wrote:
> > Here's the recipe that currently still fails:
> > 
> > $ ./autogen.sh
> > $ ./configure
> > $ make maintainer-clean
> > $ git diff -- doc/html_default_commands_args.texi doc/pod2texi.texi 
> > man/pod2texi.1 po_document/texinfo_document.pot 
> > tp/Texinfo/XS/gnulib/lib/unicase/special-casing-table.h 
> > tp/Texinfo/XS/gnulib/lib/uninorm/composition-table.h 
> > tp/Texinfo/XS/main/command_ids.h tp/Texinfo/XS/main/element_types.c 
> > tp/Texinfo/XS/main/element_types.h | patch -p1 -R
> > $ mkdir bb
> > $ cd bb
> > $ ../configure
> > $ make distcheck

This passed for me with the attached patch.

> Therefore, when make distcheck in bb calls make dist,
> texi2any_internals.texi is generated in the main doc/tp_api/ directory.
> The --subdir option passed to pod2texi.pl is
> --subdir=../../../doc/tp_api/api_includes, which allows to put the
> generated files in $(srcdir)/api_includes, and looks right.
> 
> However, the --subdir option value is also used in pod2texi.pl for the
> generated @include in texi2any_internals.texi.  Therefore, At this
> point, we have a distributed file with includes like
> 
>   @include ../../../doc/tp_api/api_includes/Texinfo-Convert-Plaintext.texi
> 
> which is different from what would have been generated from an in source
> build, which would be along
> 
>   @include api_includes/Texinfo-Convert-Plaintext.texi
> 
> Having a distributed file with differences is incorrect.  And it leads
> to the error in make distcheck.

With the attached patch, it cd's to srcdir before running pod2texi.
This way pod2texi with --subdir works correctly.

In order for the change of working directory to work correctly, I had
to make a few changes.  texi2any_internals.texi is listed as a Makefile
target without the "$(srcdir)/" prefix.  This still works correctly
due to the VPATH mechanism.  This allows correct use of $@ in the Makefile
rule in the new working directory.

The files in $(texi2any_internals_dependencies) are now listed without the
"$(top_srcdir)/" prefix; rather, they are given a "../../" prefix.  Again,
the VPATH mechanism should allow these files to be found in the srcdir.
The "../../" prefix is still correct for these files after "cd $(srcdir)",
allowing the list of files to be passed to pod2texi correctly.

(I checked that, after running "touch ../../../tp/Texinfo/Common.pm"
in bb/doc/tp_api, that "make" rebuilt texi2any_internals.texi,
even though the dependency is listed as "../../tp/Texinfo/Common.pm".)

Finally, I had to use absolute directory names (abs_top_srcdir and
abs_top_builddir) in MAKEINFO_ENVIRONMENT so that they would still
be still correct after the change of directory; otherwise, ModulePath.pm
wouldn't be found.


> At that point, I am not sure where the problem is.  I could be that
> the testing procedure needs to be modified to complete the git reverse
> patch with a copy of the files removed by maintainer clean but
> distributed.  It could also be that it is not a good idea to remove
> distributed generated files with make maintainer-clean.  It could be
> that the generated includes by pod2texi.pl should be done differently.
> It could be that make dist should only be done from the source directory
> if one want reproducible distributions.

It's possible that the behaviour of pod2texi is wrong here but I don't
have any suggestions as to how it should be changed.

> Here is a recipe to get differences between in source and out of source
> distributions.  There are some changes for generated files, which seem
> innocuous, but may be an issue for reproductibility, as well as the
> difference for texi2any_internals.texi.

Thanks, I'll try it.

Attachment: texi2any_internals-build-patch
Description: Text document


reply via email to

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