]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
bfd: fix generation of bfd.texi in out-of-tree builds
authorJose E. Marchesi <jose.marchesi@oracle.com>
Thu, 23 Jan 2025 19:16:09 +0000 (20:16 +0100)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Thu, 23 Jan 2025 19:16:09 +0000 (20:16 +0100)
[In the sequel TS means $(top_srcdir) and TB means $(top_builddir)]

The Texinfo file TS/bfd/doc/bfd.texi @includes many other .texi files
such as:

   bfdt.texi
   bfdio.texi
   section.texi
   ...

These .texi files are generated from the bfd/*.c source files, by a
program called `chew' that is distributed along with BFD, via some
default rules and macro magic in TS/bfd/doc/local.mk.  Important
point: the .texi files are generated in TB/bfd/doc/, not TS/bfd/doc.

Now, AM_MAKEINFOFLAGS in local.mk is defined as:

  AM_MAKEINFOFLAGS = --no-split -I "$(srcdir)/%D%" -I %D%

Where %D% is 'doc/' in this case.  Now, it looks like the directory
containing the .texi file is automatically inserted in the @include
search path, so the -I %D% above places TB/bfd/doc _after_ TS/bfd/doc.

Since currently TS/bfd/doc/bfdt.texi is outdated and is missing some
nodes, the error above happens.

This patch changes bfd/doc/local.mk to use -P to prepend the current
build directory to the @include search path, rather than -I, which
appends it.

bfd/ChangeLog:

2025-01-23  Jose E. Marchesi  <jose.marchesi@oracle.com>

* doc/local.mk (AM_MAKEINFOFLAGS): Prepend the build directory to
the @include search path.
* Makefile.in: Regenerate.

bfd/ChangeLog
bfd/Makefile.in
bfd/doc/local.mk

index da27f8c3f313b9af0ec3b24fb7d255d4c537ad39..d8facc241c9adf45592528807db3a4259e4df2d9 100644 (file)
@@ -1,3 +1,9 @@
+2025-01-23  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+       * doc/local.mk (AM_MAKEINFOFLAGS): Prepend the build directory to
+       the @include search path.
+       * Makefile.in: Regenerate.
+
 2025-01-19  Nick Clifton  <nickc@redhat.com>
 
        * 2.44 Branch point.
index ee674a36c5be323de3ec9d6a51079f19c53911d1..1543af7984a61e11b1fcedae14bc178c89a1da97 100644 (file)
@@ -1301,7 +1301,7 @@ SRCIPROT = $(srcdir)/cache.c $(srcdir)/libbfd.c \
 TEXIDIR = $(srcdir)/../texinfo/fsf
 info_TEXINFOS = doc/bfd.texi
 doc_bfd_TEXINFOS = $(DOCFILES) doc/bfdsumm.texi
-AM_MAKEINFOFLAGS = --no-split -I "$(srcdir)/doc" -I doc
+AM_MAKEINFOFLAGS = --no-split -I "$(srcdir)/doc" -P doc
 TEXI2DVI = texi2dvi -I "$(srcdir)/doc" -I doc
 MKDOC = doc/chew$(EXEEXT_FOR_BUILD)
 
index 9b75402387c21b376b69955210edc34c3f7a2c53..515efbf72c9d491957a9d560c3f2ede27f769a26 100644 (file)
@@ -72,7 +72,7 @@ TEXIDIR = $(srcdir)/../texinfo/fsf
 info_TEXINFOS = %D%/bfd.texi
 %C%_bfd_TEXINFOS = $(DOCFILES) %D%/bfdsumm.texi
 
-AM_MAKEINFOFLAGS = --no-split -I "$(srcdir)/%D%" -I %D%
+AM_MAKEINFOFLAGS = --no-split -I "$(srcdir)/%D%" -P %D%
 TEXI2DVI = texi2dvi -I "$(srcdir)/%D%" -I %D%
 
 MKDOC = %D%/chew$(EXEEXT_FOR_BUILD)