On Mon, Aug 05, 2024 at 01:41:37PM +0200, Bruno Haible wrote: > Hi Gavin, > > 2) "make distcheck" fails. (Reported by the weekly CI. It was fine a week > ago.)
Thanks for the report. Regarding the patch, the change related to ModulePath.pm is incorrect, ModulePath.pm should be in builddir and we do not distribute it. For the main change, your approach is correct, but it can also be done more simply without having to list and copy all the result files by changing the --subdir such that the files are only generated in srcdir. I attach a patch. > From 09c76d3172ed0246e5a5f5bc2b1a214c65f48298 Mon Sep 17 00:00:00 2001 > From: Bruno Haible <br...@clisp.org> > Date: Mon, 5 Aug 2024 13:39:31 +0200 > Subject: [PATCH] build: Fix a "make distcheck" failure. > > * doc/tp_api/Makefile.am (texi2any_internals_byproducts): New variable. > (texi2any_internals.texi): Depend on ModulePath.pm in the source dir, > not in thebuild dir. After generating texi2any_internals.texi in the > build dir, move it and its byproducts to the source dir. > --- > doc/tp_api/Makefile.am | 45 ++++++++++++++++++++++++++++++++++++++---- > 1 file changed, 41 insertions(+), 4 deletions(-) > > diff --git a/doc/tp_api/Makefile.am b/doc/tp_api/Makefile.am > index c6124d4623..90f1919f45 100644 > --- a/doc/tp_api/Makefile.am > +++ b/doc/tp_api/Makefile.am > @@ -78,14 +78,51 @@ texi2any_internals_dependencies = \ > $(top_srcdir)/tp/Texinfo/Convert/TexinfoXML.pm \ > $(top_srcdir)/tp/Texinfo/Convert/Plaintext.pm > > +# All the .texi files generated as a byproduct of generating > +# texi2any_internals.texi, in the order in which they get generated. > +texi2any_internals_byproducts = \ > + api_includes/Texinfo-Commands.texi \ > + api_includes/Texinfo-Common.texi \ > + api_includes/Texinfo-Parser.texi \ > + api_includes/Texinfo-Document.texi \ > + api_includes/Texinfo-ManipulateTree.texi \ > + api_includes/Texinfo-Structuring.texi \ > + api_includes/Texinfo-Report.texi \ > + api_includes/Texinfo-Translations.texi \ > + api_includes/Texinfo-Transformations.texi \ > + api_includes/Texinfo-Indices.texi \ > + api_includes/Texinfo-OutputUnits.texi \ > + api_includes/Texinfo-Convert-Texinfo.texi \ > + api_includes/Texinfo-Convert-Utils.texi \ > + api_includes/Texinfo-Convert-Unicode.texi \ > + api_includes/Texinfo-Convert-NodeNameNormalization.texi \ > + api_includes/Texinfo-Convert-Text.texi \ > + api_includes/Texinfo-Convert-Converter.texi \ > + api_includes/Texinfo-Convert-Info.texi \ > + api_includes/Texinfo-Convert-HTML.texi \ > + api_includes/Texinfo-Convert-DocBook.texi \ > + api_includes/Texinfo-Convert-TexinfoMarkup.texi \ > + api_includes/Texinfo-Convert-TexinfoXML.texi \ > + api_includes/Texinfo-Convert-Plaintext.texi > + > # Needed if make has not run in the "tp" directory yet > -$(top_builddir)/tp/Texinfo/ModulePath.pm: > +$(top_srcdir)/tp/Texinfo/ModulePath.pm: > cd $(top_builddir)/tp && $(MAKE) $(AM_MAKEFLAGS) Texinfo/ModulePath.pm > > -texi2any_internals.texi: $(texi2any_internals_dependencies) > texi2any_internals_indices.texi texi2any_internals_preamble.texi > $(top_builddir)/tp/Texinfo/ModulePath.pm > +texi2any_internals.texi: $(texi2any_internals_dependencies) > texi2any_internals_indices.texi texi2any_internals_preamble.texi > $(top_srcdir)/tp/Texinfo/ModulePath.pm > if $(MAKEINFO_ENVIRONMENT) $(PERL) -I > $(top_srcdir)/Pod-Simple-Texinfo/lib/ > $(top_srcdir)/Pod-Simple-Texinfo/pod2texi.pl --base-level=section --preamble > - --subdir=api_includes $(texi2any_internals_dependencies) < > $(srcdir)/texi2any_internals_preamble.texi >$@.tmp ; then \ > - cat $@.tmp | sed -e 's/^@bye/@__bye/' | sed -e '/^@__bye/r > $(srcdir)/texi2any_internals_indices.texi' | sed -e 's/^@__bye//' > $@ ; \ > - fi ; rm -f $@.tmp > + cat $@.tmp | sed -e 's/^@bye/@__bye/' | sed -e '/^@__bye/r > $(srcdir)/texi2any_internals_indices.texi' | sed -e 's/^@__bye//' > $@ ; \ > + if test '$(srcdir)' != '.' ; then \ > + for file in $(texi2any_internals_byproducts) > texi2any_internals.texi ; do \ > + if cmp $$file $(srcdir)/$$file >/dev/null 2>&1 ; then \ > + rm -f $$file ; \ > + else \ > + mv $$file $(srcdir)/$$file ; \ > + fi ; \ > + done ; \ > + fi ; \ > + fi ; \ > + rm -f $@.tmp > > endif > > -- > 2.34.1 >
diff --git a/doc/tp_api/Makefile.am b/doc/tp_api/Makefile.am index c6124d4623..fb3a48531a 100644 --- a/doc/tp_api/Makefile.am +++ b/doc/tp_api/Makefile.am @@ -83,7 +83,7 @@ $(top_builddir)/tp/Texinfo/ModulePath.pm: cd $(top_builddir)/tp && $(MAKE) $(AM_MAKEFLAGS) Texinfo/ModulePath.pm texi2any_internals.texi: $(texi2any_internals_dependencies) texi2any_internals_indices.texi texi2any_internals_preamble.texi $(top_builddir)/tp/Texinfo/ModulePath.pm - if $(MAKEINFO_ENVIRONMENT) $(PERL) -I $(top_srcdir)/Pod-Simple-Texinfo/lib/ $(top_srcdir)/Pod-Simple-Texinfo/pod2texi.pl --base-level=section --preamble - --subdir=api_includes $(texi2any_internals_dependencies) < $(srcdir)/texi2any_internals_preamble.texi >$@.tmp ; then \ + if $(MAKEINFO_ENVIRONMENT) $(PERL) -I $(top_srcdir)/Pod-Simple-Texinfo/lib/ $(top_srcdir)/Pod-Simple-Texinfo/pod2texi.pl --base-level=section --preamble - --subdir=$(srcdir)/api_includes $(texi2any_internals_dependencies) < $(srcdir)/texi2any_internals_preamble.texi >$@.tmp ; then \ cat $@.tmp | sed -e 's/^@bye/@__bye/' | sed -e '/^@__bye/r $(srcdir)/texi2any_internals_indices.texi' | sed -e 's/^@__bye//' > $@ ; \ fi ; rm -f $@.tmp