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: Patrice Dumas
Subject: Re: Fix an error during "./configure; make dist"
Date: Fri, 9 Aug 2024 17:31:32 +0200

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

My analysis is the following.  doc/tp_api/texi2any_internals.texi is
generated and distributed, but it is not under version control.  It is
removed by make maintainer-clean, rightly I think, but it is not
reinstated by the git diff reverse 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.


As a side note, if doc/tp_api/texi2any_internals.texi had been under
version control, then it would have been more visible that the files
changed in a problematic way (the po files change too, but not in a
meaningful way).


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.

My reading of
https://www.gnu.org/prep/standards/html_node/Standard-Targets.html
maintainer-clean is that doc/tp_api/texi2any_internals.texi should be
removed by maintainer-clean.


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.




rm -f texinfo-7.*.*.tar.gz
./autogen.sh
./configure
make maintainer-clean
./autogen.sh
./configure
make dist
rm -rf in_source_dist_contents
mkdir in_source_dist_contents
(cd in_source_dist_contents && tar xvf ../texinfo-7.*.*.tar.gz)
make maintainer-clean
rm -rf bb
mkdir bb
cd bb
../configure
make dist
tar xvf texinfo-7.*.*.tar.gz
diff -u -r ../in_source_dist_contents/texinfo-7.*.*/ texinfo-7.*.*/ > 
../build_in_out_source_differences.diff


-- 
Pat



reply via email to

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