bug-texinfo
[Top][All Lists]
Advanced

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

Re: Texinfo 7.1.0.90 pretest results [OpenBSD 7.5]


From: Gavin Smith
Subject: Re: Texinfo 7.1.0.90 pretest results [OpenBSD 7.5]
Date: Sun, 9 Jun 2024 20:06:52 +0100

On Sun, Jun 09, 2024 at 11:40:15AM +0100, Gavin Smith wrote:
> It may be an issue with perl not having the right directory in its search
> list (@INC).  I will investigate more.

I tried to fix one problem on the master branch (commit 2ae196b9807a,
2024-06-09).  Hopefully the process of outputting to a temporary file
and then deleting the temporary file works correctly.  We can commit
something similar for the release/7.1 branch once we have a better
idea of what is going on.  This is in the build of texi2any_internals.texi:

diff --git a/ChangeLog b/ChangeLog
index ae05cc6529..bad2a2a32c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-06-09  Gavin Smith <gavinsmith0123@gmail.com>
+
+       Fix out-of-source build of texi2any_internals.texi
+
+       * doc/tp_api/Makefile.am (texi2any_internals.texi):
+       Pass  "-I $(top_builddir)/tp" to perl to find generated modules.
+       Filter output through sed by outputting a temporary file rather
+       than piping output - this allows detecting if perl run failed.
+
 2024-06-06  Patrice Dumas  <pertusus@free.fr>
 
        * Makefile.am (po_document-check): Check for cdt, pcdt, cdt_string
diff --git a/doc/tp_api/Makefile.am b/doc/tp_api/Makefile.am
index e4acd5ce46..4a7332c620 100644
--- a/doc/tp_api/Makefile.am
+++ b/doc/tp_api/Makefile.am
@@ -74,6 +74,8 @@ texi2any_internals_dependencies = \
   $(top_srcdir)/tp/Texinfo/Convert/Plaintext.pm
 
 texi2any_internals.texi: $(texi2any_internals_dependencies) 
texi2any_internals_indices.texi texi2any_internals_preamble.texi
-       $(PERL) -I $(top_srcdir)/Pod-Simple-Texinfo/lib/ -I $(top_srcdir)/tp/ 
-I $(top_srcdir)/tp/maintain/lib/Text-Unidecode/lib/ -I 
$(top_srcdir)/tp/maintain/lib/libintl-perl/lib/ -I 
$(top_srcdir)/tp/maintain/lib/Unicode-EastAsianWidth/lib/ 
$(top_srcdir)/Pod-Simple-Texinfo/pod2texi.pl --base-level=section --preamble - 
--subdir=api_includes $(texi2any_internals_dependencies) < 
$(srcdir)/texi2any_internals_preamble.texi | sed -e 's/^@bye/@__bye/' | sed -e 
'/^@__bye/r $(srcdir)/texi2any_internals_indices.texi' | sed -e 's/^@__bye//' > 
$@
+       if $(PERL) -I $(top_builddir)/tp -I 
$(top_srcdir)/Pod-Simple-Texinfo/lib/ -I $(top_srcdir)/tp/ -I 
$(top_srcdir)/tp/maintain/lib/Text-Unidecode/lib/ -I 
$(top_srcdir)/tp/maintain/lib/libintl-perl/lib/ -I 
$(top_srcdir)/tp/maintain/lib/Unicode-EastAsianWidth/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 $@.tmp
 
 endif

However, the rule for pod2texi.texi is mysterious, as it outputs to
/dev/null:

# we setup the conversion to Texinfo for inclusion in a document,
# but we ignore the resulting document, as we include from the
# Texinfo manual.  The file name for the included section
# is therefore determined by the information in the Pod file NAME
# section.
pod2texi.texi: $(pod2texi_pl)
        $(PERL) -I $(top_srcdir)/Pod-Simple-Texinfo/lib/ -I $(top_srcdir)/tp/ 
$(top_srcdir)/Pod-Simple-Texinfo/pod2texi.pl --base-level=subsubsection 
--no-section-nodes --headings-as-sections $(pod2texi_pl) > /dev/null
endif

The comment does not make a lot of sense to me.

Despite the > /dev/null, this does succeed in creating pod2texi.texi if I
add an -I option:

diff --git a/doc/Makefile.am b/doc/Makefile.am
index 511c51490e..a09d548b68 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -40,7 +40,7 @@ if BUILD_PERL_API_TEXI
 # is therefore determined by the information in the Pod file NAME
 # section.
 pod2texi.texi: $(pod2texi_pl)
-       $(PERL) -I $(top_srcdir)/Pod-Simple-Texinfo/lib/ -I $(top_srcdir)/tp/ 
$(top_srcdir)/Pod-Simple-Texinfo/pod2texi.pl --base-level=subsubsection 
--no-section-nodes --headings-as-sections $(pod2texi_pl) > /dev/null
+       $(PERL) -I $(top_builddir)/tp -I $(top_srcdir)/Pod-Simple-Texinfo/lib/ 
-I $(top_srcdir)/tp/ $(top_srcdir)/Pod-Simple-Texinfo/pod2texi.pl 
--base-level=subsubsection --no-section-nodes --headings-as-sections 
$(pod2texi_pl) > /dev/null
 endif
 
 TXI_MODULES_ENV = srcdir="$(srcdir)"; export srcdir;

However, this is output in the build directory, not the source directory.
(pod2texi.texi is under version control and distributed as part of a
release).

I want this to be:

diff --git a/doc/Makefile.am b/doc/Makefile.am
index 511c51490e..0dc4dd11d5 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -39,8 +39,8 @@ if BUILD_PERL_API_TEXI
 # Texinfo manual.  The file name for the included section
 # is therefore determined by the information in the Pod file NAME
 # section.
-pod2texi.texi: $(pod2texi_pl)
-       $(PERL) -I $(top_srcdir)/Pod-Simple-Texinfo/lib/ -I $(top_srcdir)/tp/ 
$(top_srcdir)/Pod-Simple-Texinfo/pod2texi.pl --base-level=subsubsection 
--no-section-nodes --headings-as-sections $(pod2texi_pl) > /dev/null
+$(srcdir)/pod2texi.texi: $(pod2texi_pl)
+       $(PERL) -I $(top_builddir)/tp -I $(top_srcdir)/Pod-Simple-Texinfo/lib/ 
-I $(top_srcdir)/tp/ $(top_srcdir)/Pod-Simple-Texinfo/pod2texi.pl 
--base-level=subsubsection --no-section-nodes --headings-as-sections 
$(pod2texi_pl) > $@
 endif
 
 TXI_MODULES_ENV = srcdir="$(srcdir)"; export srcdir;

but this does not work.  This outputs two files called "pod2texi.texi",
one in the build directory (with the correct contents), and one in the
source directory, the contents whereof are:


\input texinfo
@settitle top
@shorttitlepage top
@headings on

@contents

@node Top
@top top

@include pod2texi.texi

@bye

Patrice, could you advise?  Do we just need to add commands to move
pod2texi.texi to the source directory?




reply via email to

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