public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [Regression] Build fail: 'doc/bfd/index.html' ($(build)/bfd/bfd.texi - no such file) – probably due to: "bfd: Properly install library and header files"
@ 2022-01-24  9:05 Tobias Burnus
  2022-01-24 13:21 ` H.J. Lu
  0 siblings, 1 reply; 10+ messages in thread
From: Tobias Burnus @ 2022-01-24  9:05 UTC (permalink / raw)
  To: binutils, H.J. Lu

Hi H.J.,

I think that's an unintended side effect of your commits:
* bfd: Properly install library and header files
* bfd: Partially revert commit 0e3839bde6f

Can you check?

Binutil build fails now (regression compared to Friday) with:

   MAKEINFO doc/bfd.html
doc/bfd.texi: warning: must specify a title with a title command or @top
could not open builds/binutils-src-mainline-0-x86_64-none-linux-gnu-x86_64-linux-gnu/bfd/bfd.texi: No such file or directory
make[3]: *** [Makefile:2528: doc/bfd/index.html] Error 1
make[3]: Leaving directory 'builds/binutils-mainline-0-x86_64-none-linux-gnu-x86_64-linux-gnu/bfd'
make[2]: *** [Makefile:1943: html-recursive] Error 1
make[2]: Leaving directory 'builds/binutils-mainline-0-x86_64-none-linux-gnu-x86_64-linux-gnu/bfd'
make[1]: *** [Makefile:3217: html-bfd] Error 1
make[1]: Leaving directory 'builds/binutils-mainline-0-x86_64-none-linux-gnu-x86_64-linux-gnu'
make: *** [Makefile:1806: do-install-html] Error 2

Tobias

-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Regression] Build fail: 'doc/bfd/index.html' ($(build)/bfd/bfd.texi - no such file) – probably due to: "bfd: Properly install library and header files"
  2022-01-24  9:05 [Regression] Build fail: 'doc/bfd/index.html' ($(build)/bfd/bfd.texi - no such file) – probably due to: "bfd: Properly install library and header files" Tobias Burnus
@ 2022-01-24 13:21 ` H.J. Lu
  2022-01-24 15:01   ` Tobias Burnus
  0 siblings, 1 reply; 10+ messages in thread
From: H.J. Lu @ 2022-01-24 13:21 UTC (permalink / raw)
  To: Tobias Burnus; +Cc: Binutils

On Mon, Jan 24, 2022 at 1:05 AM Tobias Burnus <tobias@codesourcery.com> wrote:
>
> Hi H.J.,
>
> I think that's an unintended side effect of your commits:
> * bfd: Properly install library and header files
> * bfd: Partially revert commit 0e3839bde6f
>
> Can you check?
>
> Binutil build fails now (regression compared to Friday) with:
>
>    MAKEINFO doc/bfd.html
> doc/bfd.texi: warning: must specify a title with a title command or @top
> could not open builds/binutils-src-mainline-0-x86_64-none-linux-gnu-x86_64-linux-gnu/bfd/bfd.texi: No such file or directory
> make[3]: *** [Makefile:2528: doc/bfd/index.html] Error 1
> make[3]: Leaving directory 'builds/binutils-mainline-0-x86_64-none-linux-gnu-x86_64-linux-gnu/bfd'
> make[2]: *** [Makefile:1943: html-recursive] Error 1
> make[2]: Leaving directory 'builds/binutils-mainline-0-x86_64-none-linux-gnu-x86_64-linux-gnu/bfd'
> make[1]: *** [Makefile:3217: html-bfd] Error 1
> make[1]: Leaving directory 'builds/binutils-mainline-0-x86_64-none-linux-gnu-x86_64-linux-gnu'
> make: *** [Makefile:1806: do-install-html] Error 2
>

Works for me.   Please do "git clone" again and do a clean build.

-- 
H.J.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Regression] Build fail: 'doc/bfd/index.html' ($(build)/bfd/bfd.texi - no such file) – probably due to: "bfd: Properly install library and header files"
  2022-01-24 13:21 ` H.J. Lu
@ 2022-01-24 15:01   ` Tobias Burnus
  2022-01-24 15:42     ` [PATCH] bfd: Pass -Idoc to $(MAKEINFOHTML) H.J. Lu
  0 siblings, 1 reply; 10+ messages in thread
From: Tobias Burnus @ 2022-01-24 15:01 UTC (permalink / raw)
  To: H.J. Lu; +Cc: Binutils

Hi H.J.,

On 24.01.22 14:21, H.J. Lu wrote:
> Works for me. Please do "git clone" again and do a clean build.

Still fails. I wonder why it goes wrong. I think something like:

--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -2526,7 +2526,7 @@ doc/bfdver.texi: $(srcdir)/Makefile.in
  html-local: doc/bfd/index.html
  doc/bfd/index.html: doc/bfd.texi $(bfd_TEXINFOS) doc/$(am__dirstamp)
         $(AM_V_at)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \
-         --split=node -I$(srcdir) -o doc/bfd $(srcdir)/bfd.texi
+         --split=node -I$(srcdir) -o doc/bfd $(srcdir)/doc/bfd.texi


is needed - but I did not check why that went wrong in this generated file.
And why it now is wrong - but seemingly did work on Friday.


I build here with:

   .../configure --prefix=... \
    --build=x86_64-linux-gnu --target=x86_64-none-linux-gnu --host=x86_64-linux-gnu \
    --with-static-standard-libraries --disable-gdb --disable-libdecnumber --disable-readline \
    --disable-sim --disable-gdbserver --disable-nls \
    --with-sysroot=... --enable-plugins

   make prefix=... libdir=... htmldir=... install-html

which fails with:
makeinfo --split-size=5000000 --html --no-split  \
   --split=node ...
could not open  ...srdir.../bfd/bfd.texi: No such file or directory
make: *** [Makefile:2528: doc/bfd/index.html] Error 1


Tobias

-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH] bfd: Pass -Idoc to $(MAKEINFOHTML)
  2022-01-24 15:01   ` Tobias Burnus
@ 2022-01-24 15:42     ` H.J. Lu
  2022-01-24 16:52       ` Tobias Burnus
  0 siblings, 1 reply; 10+ messages in thread
From: H.J. Lu @ 2022-01-24 15:42 UTC (permalink / raw)
  To: Tobias Burnus; +Cc: Binutils

[-- Attachment #1: Type: text/plain, Size: 1501 bytes --]

On Mon, Jan 24, 2022 at 7:01 AM Tobias Burnus <tobias@codesourcery.com> wrote:
>
> Hi H.J.,
>
> On 24.01.22 14:21, H.J. Lu wrote:
> > Works for me. Please do "git clone" again and do a clean build.
>
> Still fails. I wonder why it goes wrong. I think something like:
>
> --- a/bfd/Makefile.in
> +++ b/bfd/Makefile.in
> @@ -2526,7 +2526,7 @@ doc/bfdver.texi: $(srcdir)/Makefile.in
>   html-local: doc/bfd/index.html
>   doc/bfd/index.html: doc/bfd.texi $(bfd_TEXINFOS) doc/$(am__dirstamp)
>          $(AM_V_at)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \
> -         --split=node -I$(srcdir) -o doc/bfd $(srcdir)/bfd.texi
> +         --split=node -I$(srcdir) -o doc/bfd $(srcdir)/doc/bfd.texi
>
>
> is needed - but I did not check why that went wrong in this generated file.
> And why it now is wrong - but seemingly did work on Friday.
>
>
> I build here with:
>
>    .../configure --prefix=... \
>     --build=x86_64-linux-gnu --target=x86_64-none-linux-gnu --host=x86_64-linux-gnu \
>     --with-static-standard-libraries --disable-gdb --disable-libdecnumber --disable-readline \
>     --disable-sim --disable-gdbserver --disable-nls \
>     --with-sysroot=... --enable-plugins
>
>    make prefix=... libdir=... htmldir=... install-html
>
> which fails with:
> makeinfo --split-size=5000000 --html --no-split  \
>    --split=node ...
> could not open  ...srdir.../bfd/bfd.texi: No such file or directory
> make: *** [Makefile:2528: doc/bfd/index.html] Error 1
>
>

Try this.

-- 
H.J.

[-- Attachment #2: 0001-bfd-Pass-Idoc-to-MAKEINFOHTML.patch --]
[-- Type: text/x-patch, Size: 1591 bytes --]

From f6d30cea2581e9a293400e63df84a6e40b3119b6 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Mon, 24 Jan 2022 07:39:44 -0800
Subject: [PATCH] bfd: Pass -Idoc to $(MAKEINFOHTML)

	PR binutils/28807
	* Makefile.in: Regenerate.
	* doc/local.mk (doc/bfd/index.html): Pass -Idoc to $(MAKEINFOHTML).
---
 bfd/Makefile.in  | 2 +-
 bfd/doc/local.mk | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index e48a0b87bc9..7be3831551d 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -2526,7 +2526,7 @@ doc/bfdver.texi: $(srcdir)/Makefile.in
 html-local: doc/bfd/index.html
 doc/bfd/index.html: doc/bfd.texi $(bfd_TEXINFOS) doc/$(am__dirstamp)
 	$(AM_V_at)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \
-	  --split=node -I$(srcdir) -o doc/bfd $(srcdir)/bfd.texi
+	  --split=node -I$(srcdir) -Idoc -o doc/bfd $(srcdir)/doc/bfd.texi
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/bfd/doc/local.mk b/bfd/doc/local.mk
index 18a2af1b01d..9c3b32f7076 100644
--- a/bfd/doc/local.mk
+++ b/bfd/doc/local.mk
@@ -147,6 +147,6 @@ MAINTAINERCLEANFILES += $(DOCFILES)
 html-local: %D%/bfd/index.html
 %D%/bfd/index.html: %D%/bfd.texi $(bfd_TEXINFOS) %D%/$(am__dirstamp)
 	$(AM_V_at)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \
-	  --split=node -I$(srcdir) -o %D%/bfd $(srcdir)/bfd.texi
+	  --split=node -I$(srcdir) -Idoc -o %D%/bfd $(srcdir)/doc/bfd.texi
 
 MAINTAINERCLEANFILES += %D%/bfd.info
-- 
2.34.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] bfd: Pass -Idoc to $(MAKEINFOHTML)
  2022-01-24 15:42     ` [PATCH] bfd: Pass -Idoc to $(MAKEINFOHTML) H.J. Lu
@ 2022-01-24 16:52       ` Tobias Burnus
  2022-01-24 17:48         ` [PATCH v2] bfd: Update doc/local.mk H.J. Lu
  0 siblings, 1 reply; 10+ messages in thread
From: Tobias Burnus @ 2022-01-24 16:52 UTC (permalink / raw)
  To: H.J. Lu, Mike Frysinger; +Cc: Binutils

Hi H.J., hi Mike,

On 24.01.22 16:42, H.J. Lu wrote:

> Try this.

That does not fail - but it creates an empty <body> HTML file.
I think it is the same reason as the one why creating the PDF
file fails hard.

Namely, for the 'doc/bfd.pdf' (or 'install-pdf') is does as first
step:
    touch doc/bfd.texi
which creates an empty file. The 'test -f doc/bfd.texi' then succeeds
and uses that empty file - instead of $(src)/bfd/doc/bfd.texi :-(



On the Makefile level, that's due to the following (Makefile{,.in} + bfd/doc/local.mk):

   # Avoid the %.stamp generating a builddir/bfd.texi that overrides the srcdir/.
   doc/bfd.texi doc/bfd.stamp: doc/$(am__dirstamp) ; $(AM_V_at)touch $@

And the the 'touch' at the end *is* run for 'doc/bfd.texi' via (Makefile{,.in}):

(Actually, it does the opposite to what comment states: It does create that file!)


I think that target is invoked via:

doc/bfd.pdf: doc/bfd.texi $(doc_bfd_TEXINFOS) doc/$(am__dirstamp)
        .... $(TEXI2PDF) ...

due to the bfd.texi dependency.




The "make doc/bfd.pdf" shows/fails with:

touch doc/bfd.texi
TEXINPUTS="$(build)/bfd:$TEXINPUTS" \
MAKEINFO='makeinfo --split-size=5000000 --split-size=5000000 --no-split  -I doc -I $(src)/bfd/doc' \
texi2dvi --pdf --batch  --build-dir=doc/bfd.t2p -o doc/bfd.pdf  \
`test -f 'doc/bfd.texi' || echo '$(src)/bfd/'`doc/bfd.texi

This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdfetex)
  restricted \write18 enabled.
entering extended mode

(../../../../.././doc/bfd.texi)
! Emergency stop.
<*> ...opmode \input ../../../../.././doc/bfd.texi

!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on bfd.log.
/usr/bin/texi2dvi: pdfetex exited with bad status, quitting.
make[3]: *** [Makefile:1807: doc/bfd.pdf] Error 1

The .log file is in '$(build)/bfd/doc/bfd.t2p/doc!bfd.t2d/pdf/build' and it contains:

**\nonstopmode \input ../../../../.././doc/bfd.texi
(../../../../.././doc/bfd.texi)
! Emergency stop.
<*> ...opmode \input ../../../../.././doc/bfd.texi

which is the empty 'touched' $(build)/bfd/bfd.texi.

Tobias

-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2] bfd: Update doc/local.mk
  2022-01-24 16:52       ` Tobias Burnus
@ 2022-01-24 17:48         ` H.J. Lu
  2022-01-24 18:38           ` Tobias Burnus
  0 siblings, 1 reply; 10+ messages in thread
From: H.J. Lu @ 2022-01-24 17:48 UTC (permalink / raw)
  To: Tobias Burnus; +Cc: Mike Frysinger, Binutils

[-- Attachment #1: Type: text/plain, Size: 2309 bytes --]

On Mon, Jan 24, 2022 at 8:52 AM Tobias Burnus <tobias@codesourcery.com> wrote:
>
> Hi H.J., hi Mike,
>
> On 24.01.22 16:42, H.J. Lu wrote:
>
> > Try this.
>
> That does not fail - but it creates an empty <body> HTML file.
> I think it is the same reason as the one why creating the PDF
> file fails hard.
>
> Namely, for the 'doc/bfd.pdf' (or 'install-pdf') is does as first
> step:
>     touch doc/bfd.texi
> which creates an empty file. The 'test -f doc/bfd.texi' then succeeds
> and uses that empty file - instead of $(src)/bfd/doc/bfd.texi :-(
>
>
>
> On the Makefile level, that's due to the following (Makefile{,.in} + bfd/doc/local.mk):
>
>    # Avoid the %.stamp generating a builddir/bfd.texi that overrides the srcdir/.
>    doc/bfd.texi doc/bfd.stamp: doc/$(am__dirstamp) ; $(AM_V_at)touch $@
>
> And the the 'touch' at the end *is* run for 'doc/bfd.texi' via (Makefile{,.in}):
>
> (Actually, it does the opposite to what comment states: It does create that file!)
>
>
> I think that target is invoked via:
>
> doc/bfd.pdf: doc/bfd.texi $(doc_bfd_TEXINFOS) doc/$(am__dirstamp)
>         .... $(TEXI2PDF) ...
>
> due to the bfd.texi dependency.
>
>
>
>
> The "make doc/bfd.pdf" shows/fails with:
>
> touch doc/bfd.texi
> TEXINPUTS="$(build)/bfd:$TEXINPUTS" \
> MAKEINFO='makeinfo --split-size=5000000 --split-size=5000000 --no-split  -I doc -I $(src)/bfd/doc' \
> texi2dvi --pdf --batch  --build-dir=doc/bfd.t2p -o doc/bfd.pdf  \
> `test -f 'doc/bfd.texi' || echo '$(src)/bfd/'`doc/bfd.texi
>
> This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdfetex)
>   restricted \write18 enabled.
> entering extended mode
>
> (../../../../.././doc/bfd.texi)
> ! Emergency stop.
> <*> ...opmode \input ../../../../.././doc/bfd.texi
>
> !  ==> Fatal error occurred, no output PDF file produced!
> Transcript written on bfd.log.
> /usr/bin/texi2dvi: pdfetex exited with bad status, quitting.
> make[3]: *** [Makefile:1807: doc/bfd.pdf] Error 1
>
> The .log file is in '$(build)/bfd/doc/bfd.t2p/doc!bfd.t2d/pdf/build' and it contains:
>
> **\nonstopmode \input ../../../../.././doc/bfd.texi
> (../../../../.././doc/bfd.texi)
> ! Emergency stop.
> <*> ...opmode \input ../../../../.././doc/bfd.texi
>
> which is the empty 'touched' $(build)/bfd/bfd.texi.

Try this.

-- 
H.J.

[-- Attachment #2: v2-0001-bfd-Update-doc-local.mk.patch --]
[-- Type: text/x-patch, Size: 2569 bytes --]

From 2f9afa34397f476dc8ba4a7e40bc39b299e569a7 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Mon, 24 Jan 2022 07:39:44 -0800
Subject: [PATCH v2] bfd: Update doc/local.mk

1. Remove %D%/bfd.texi.
2. Pass -Idoc to $(MAKEINFOHTML).
3. Replace bfd.texi with %D%/bfd.texi.

	PR binutils/28807
	* Makefile.in: Regenerate.
	* doc/local.mk (%D%/bfd.texi): Removed.
	(doc/bfd/index.html): Pass -Idoc to $(MAKEINFOHTML) and replace
	bfd.texi with %D%/bfd.texi.
---
 bfd/Makefile.in  | 4 ++--
 bfd/doc/local.mk | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index e48a0b87bc9..c203e8d8f22 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -2505,7 +2505,7 @@ doc/%.stamp: $(srcdir)/%.c $(srcdir)/doc/doc.str $(MKDOC) doc/$(am__dirstamp)
 	$(AM_V_GEN)$(REGEN_TEXI)
 
 # Avoid the %.stamp generating a builddir/bfd.texi that overrides the srcdir/.
-doc/bfd.texi doc/bfd.stamp: doc/$(am__dirstamp) ; $(AM_V_at)touch $@
+doc/bfd.stamp: doc/$(am__dirstamp) ; $(AM_V_at)touch $@
 
 # We use bfdt.texi, rather than bfd.texi, to avoid conflicting with
 # bfd.texi on an 8.3 filesystem.
@@ -2526,7 +2526,7 @@ doc/bfdver.texi: $(srcdir)/Makefile.in
 html-local: doc/bfd/index.html
 doc/bfd/index.html: doc/bfd.texi $(bfd_TEXINFOS) doc/$(am__dirstamp)
 	$(AM_V_at)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \
-	  --split=node -I$(srcdir) -o doc/bfd $(srcdir)/bfd.texi
+	  --split=node -I$(srcdir) -Idoc -o doc/bfd $(srcdir)/doc/bfd.texi
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/bfd/doc/local.mk b/bfd/doc/local.mk
index 18a2af1b01d..511457145ac 100644
--- a/bfd/doc/local.mk
+++ b/bfd/doc/local.mk
@@ -118,7 +118,7 @@ REGEN_TEXI = \
 	$(AM_V_GEN)$(REGEN_TEXI)
 
 # Avoid the %.stamp generating a builddir/bfd.texi that overrides the srcdir/.
-%D%/bfd.texi %D%/bfd.stamp: %D%/$(am__dirstamp) ; $(AM_V_at)touch $@
+%D%/bfd.stamp: %D%/$(am__dirstamp) ; $(AM_V_at)touch $@
 
 # We use bfdt.texi, rather than bfd.texi, to avoid conflicting with
 # bfd.texi on an 8.3 filesystem.
@@ -147,6 +147,6 @@ MAINTAINERCLEANFILES += $(DOCFILES)
 html-local: %D%/bfd/index.html
 %D%/bfd/index.html: %D%/bfd.texi $(bfd_TEXINFOS) %D%/$(am__dirstamp)
 	$(AM_V_at)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \
-	  --split=node -I$(srcdir) -o %D%/bfd $(srcdir)/bfd.texi
+	  --split=node -I$(srcdir) -Idoc -o %D%/bfd $(srcdir)/%D%/bfd.texi
 
 MAINTAINERCLEANFILES += %D%/bfd.info
-- 
2.34.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2] bfd: Update doc/local.mk
  2022-01-24 17:48         ` [PATCH v2] bfd: Update doc/local.mk H.J. Lu
@ 2022-01-24 18:38           ` Tobias Burnus
  2022-01-24 18:53             ` [PATCH v3] " H.J. Lu
  0 siblings, 1 reply; 10+ messages in thread
From: Tobias Burnus @ 2022-01-24 18:38 UTC (permalink / raw)
  To: H.J. Lu; +Cc: Mike Frysinger, Binutils

Hi H.J.,

that works – but not completely as texi2dvi itself does not get passed the -I path.

Thus TEXI2PDF doc/bfd.pdf fails because:
   bfd/doc/bfd.texi:219: I can't find file `bfdt.texi'.

   l.219 @include bfdt.texi



I wonder whether part of your changes could/should be replaced
by the following, which mimics what binutils/doc/local.mk does:

--- a/bfd/doc/local.mk
+++ b/bfd/doc/local.mk
@@ -80 +80,3 @@ info_TEXINFOS = %D%/bfd.texi
-AM_MAKEINFOFLAGS = --no-split
+AM_MAKEINFOFLAGS = -I "$(srcdir)/%D%" -I ../bfd/doc \
+                  --no-split
+TEXI2DVI = texi2dvi -I "$(srcdir)/%D%" -I ../bfd/doc



At least it seems to work when manually adding '-I doc -I $(srcdir)/doc'
to the 'doc/bfd.pdf' target's texi2pdf call.

Seems as we are almost there and as if the rest seems to work :-)

Thanks,

Tobias

On 24.01.22 18:48, H.J. Lu wrote:
> 1. Remove %D%/bfd.texi.
> 2. Pass -Idoc to $(MAKEINFOHTML).
> 3. Replace bfd.texi with %D%/bfd.texi.
>
>       PR binutils/28807
>       * Makefile.in: Regenerate.
>       * doc/local.mk (%D%/bfd.texi): Removed.
>       (doc/bfd/index.html): Pass -Idoc to $(MAKEINFOHTML) and replace
>       bfd.texi with %D%/bfd.texi.
...
> --- a/bfd/doc/local.mk
> +++ b/bfd/doc/local.mk
> @@ -118,7 +118,7 @@ REGEN_TEXI = \
>       $(AM_V_GEN)$(REGEN_TEXI)
>
>   # Avoid the %.stamp generating a builddir/bfd.texi that overrides the srcdir/.
> -%D%/bfd.texi %D%/bfd.stamp: %D%/$(am__dirstamp) ; $(AM_V_at)touch $@
> +%D%/bfd.stamp: %D%/$(am__dirstamp) ; $(AM_V_at)touch $@
>
>   # We use bfdt.texi, rather than bfd.texi, to avoid conflicting with
>   # bfd.texi on an 8.3 filesystem.
> @@ -147,6 +147,6 @@ MAINTAINERCLEANFILES += $(DOCFILES)
>   html-local: %D%/bfd/index.html
>   %D%/bfd/index.html: %D%/bfd.texi $(bfd_TEXINFOS) %D%/$(am__dirstamp)
>       $(AM_V_at)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \
> -       --split=node -I$(srcdir) -o %D%/bfd $(srcdir)/bfd.texi
> +       --split=node -I$(srcdir) -Idoc -o %D%/bfd $(srcdir)/%D%/bfd.texi
>
>   MAINTAINERCLEANFILES += %D%/bfd.info
-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v3] bfd: Update doc/local.mk
  2022-01-24 18:38           ` Tobias Burnus
@ 2022-01-24 18:53             ` H.J. Lu
  2022-01-24 20:35               ` Tobias Burnus
  0 siblings, 1 reply; 10+ messages in thread
From: H.J. Lu @ 2022-01-24 18:53 UTC (permalink / raw)
  To: Tobias Burnus; +Cc: Mike Frysinger, Binutils

[-- Attachment #1: Type: text/plain, Size: 993 bytes --]

On Mon, Jan 24, 2022 at 10:38 AM Tobias Burnus <tobias@codesourcery.com> wrote:
>
> Hi H.J.,
>
> that works – but not completely as texi2dvi itself does not get passed the -I path.
>
> Thus TEXI2PDF doc/bfd.pdf fails because:
>    bfd/doc/bfd.texi:219: I can't find file `bfdt.texi'.
>
>    l.219 @include bfdt.texi
>
>
>
> I wonder whether part of your changes could/should be replaced
> by the following, which mimics what binutils/doc/local.mk does:
>
> --- a/bfd/doc/local.mk
> +++ b/bfd/doc/local.mk
> @@ -80 +80,3 @@ info_TEXINFOS = %D%/bfd.texi
> -AM_MAKEINFOFLAGS = --no-split
> +AM_MAKEINFOFLAGS = -I "$(srcdir)/%D%" -I ../bfd/doc \
> +                  --no-split
> +TEXI2DVI = texi2dvi -I "$(srcdir)/%D%" -I ../bfd/doc
>
>
>
> At least it seems to work when manually adding '-I doc -I $(srcdir)/doc'
> to the 'doc/bfd.pdf' target's texi2pdf call.
>
> Seems as we are almost there and as if the rest seems to work :-)
>

Try this one.

-- 
H.J.

[-- Attachment #2: v3-0001-bfd-Update-doc-local.mk.patch --]
[-- Type: text/x-patch, Size: 3475 bytes --]

From b32be53f7a398e4aa9b5726db2d7d87c46fa1192 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Mon, 24 Jan 2022 07:39:44 -0800
Subject: [PATCH v3] bfd: Update doc/local.mk

	PR binutils/28807
	* Makefile.in: Regenerate.
	* doc/local.mk (AM_MAKEINFOFLAGS): Add -I "$(srcdir)/%D%" -I %D%.
	(TEXI2DVI): New.
	(%D%/bfd.texi): Removed.
	(doc/bfd/index.html): Remove -I$(srcdir).  Replace bfd.texi with
	%D%/bfd.texi.
---
 bfd/Makefile.in  | 8 ++++----
 bfd/doc/local.mk | 7 ++++---
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index e48a0b87bc9..b06c0c98e9b 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -271,7 +271,6 @@ PDFS = doc/bfd.pdf
 PSS = doc/bfd.ps
 HTMLS = doc/bfd.html
 TEXINFOS = doc/bfd.texi
-TEXI2DVI = texi2dvi
 TEXI2PDF = $(TEXI2DVI) --pdf --batch
 MAKEINFOHTML = $(MAKEINFO) --html
 AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
@@ -1304,7 +1303,8 @@ 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
+AM_MAKEINFOFLAGS = --no-split -I "$(srcdir)/doc" -I doc
+TEXI2DVI = texi2dvi -I "$(srcdir)/doc" -I doc
 MKDOC = doc/chew$(EXEEXT_FOR_BUILD)
 
 # We can't replace these rules with an implicit rule, because
@@ -2505,7 +2505,7 @@ doc/%.stamp: $(srcdir)/%.c $(srcdir)/doc/doc.str $(MKDOC) doc/$(am__dirstamp)
 	$(AM_V_GEN)$(REGEN_TEXI)
 
 # Avoid the %.stamp generating a builddir/bfd.texi that overrides the srcdir/.
-doc/bfd.texi doc/bfd.stamp: doc/$(am__dirstamp) ; $(AM_V_at)touch $@
+doc/bfd.stamp: doc/$(am__dirstamp) ; $(AM_V_at)touch $@
 
 # We use bfdt.texi, rather than bfd.texi, to avoid conflicting with
 # bfd.texi on an 8.3 filesystem.
@@ -2526,7 +2526,7 @@ doc/bfdver.texi: $(srcdir)/Makefile.in
 html-local: doc/bfd/index.html
 doc/bfd/index.html: doc/bfd.texi $(bfd_TEXINFOS) doc/$(am__dirstamp)
 	$(AM_V_at)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \
-	  --split=node -I$(srcdir) -o doc/bfd $(srcdir)/bfd.texi
+	  --split=node -o doc/bfd $(srcdir)/doc/bfd.texi
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/bfd/doc/local.mk b/bfd/doc/local.mk
index 18a2af1b01d..f57897ff682 100644
--- a/bfd/doc/local.mk
+++ b/bfd/doc/local.mk
@@ -77,7 +77,8 @@ TEXIDIR = $(srcdir)/../texinfo/fsf
 info_TEXINFOS = %D%/bfd.texi
 %C%_bfd_TEXINFOS = $(DOCFILES) %D%/bfdsumm.texi
 
-AM_MAKEINFOFLAGS = --no-split
+AM_MAKEINFOFLAGS = --no-split -I "$(srcdir)/%D%" -I %D%
+TEXI2DVI = texi2dvi -I "$(srcdir)/%D%" -I %D%
 
 MKDOC = %D%/chew$(EXEEXT_FOR_BUILD)
 
@@ -118,7 +119,7 @@ REGEN_TEXI = \
 	$(AM_V_GEN)$(REGEN_TEXI)
 
 # Avoid the %.stamp generating a builddir/bfd.texi that overrides the srcdir/.
-%D%/bfd.texi %D%/bfd.stamp: %D%/$(am__dirstamp) ; $(AM_V_at)touch $@
+%D%/bfd.stamp: %D%/$(am__dirstamp) ; $(AM_V_at)touch $@
 
 # We use bfdt.texi, rather than bfd.texi, to avoid conflicting with
 # bfd.texi on an 8.3 filesystem.
@@ -147,6 +148,6 @@ MAINTAINERCLEANFILES += $(DOCFILES)
 html-local: %D%/bfd/index.html
 %D%/bfd/index.html: %D%/bfd.texi $(bfd_TEXINFOS) %D%/$(am__dirstamp)
 	$(AM_V_at)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \
-	  --split=node -I$(srcdir) -o %D%/bfd $(srcdir)/bfd.texi
+	  --split=node -o %D%/bfd $(srcdir)/%D%/bfd.texi
 
 MAINTAINERCLEANFILES += %D%/bfd.info
-- 
2.34.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3] bfd: Update doc/local.mk
  2022-01-24 18:53             ` [PATCH v3] " H.J. Lu
@ 2022-01-24 20:35               ` Tobias Burnus
  2022-01-24 20:56                 ` H.J. Lu
  0 siblings, 1 reply; 10+ messages in thread
From: Tobias Burnus @ 2022-01-24 20:35 UTC (permalink / raw)
  To: H.J. Lu; +Cc: Mike Frysinger, Binutils

Hi H.J.,

On 24.01.22 19:53, H.J. Lu wrote:
> Try this one.

good news - that patch works with the build script and also with 'make
install-{html,info,pdf}' :-)

Thanks,

Tobias

-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3] bfd: Update doc/local.mk
  2022-01-24 20:35               ` Tobias Burnus
@ 2022-01-24 20:56                 ` H.J. Lu
  0 siblings, 0 replies; 10+ messages in thread
From: H.J. Lu @ 2022-01-24 20:56 UTC (permalink / raw)
  To: Tobias Burnus; +Cc: Mike Frysinger, Binutils

On Mon, Jan 24, 2022 at 12:35 PM Tobias Burnus <tobias@codesourcery.com> wrote:
>
> Hi H.J.,
>
> On 24.01.22 19:53, H.J. Lu wrote:
> > Try this one.
>
> good news - that patch works with the build script and also with 'make
> install-{html,info,pdf}' :-)
>

I am checking it in.

Thanks.

-- 
H.J.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-01-24 20:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-24  9:05 [Regression] Build fail: 'doc/bfd/index.html' ($(build)/bfd/bfd.texi - no such file) – probably due to: "bfd: Properly install library and header files" Tobias Burnus
2022-01-24 13:21 ` H.J. Lu
2022-01-24 15:01   ` Tobias Burnus
2022-01-24 15:42     ` [PATCH] bfd: Pass -Idoc to $(MAKEINFOHTML) H.J. Lu
2022-01-24 16:52       ` Tobias Burnus
2022-01-24 17:48         ` [PATCH v2] bfd: Update doc/local.mk H.J. Lu
2022-01-24 18:38           ` Tobias Burnus
2022-01-24 18:53             ` [PATCH v3] " H.J. Lu
2022-01-24 20:35               ` Tobias Burnus
2022-01-24 20:56                 ` H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).