From: "H.J. Lu" <hjl.tools@gmail.com>
To: Tobias Burnus <tobias@codesourcery.com>
Cc: Mike Frysinger <vapier@gentoo.org>, Binutils <binutils@sourceware.org>
Subject: [PATCH v2] bfd: Update doc/local.mk
Date: Mon, 24 Jan 2022 09:48:44 -0800 [thread overview]
Message-ID: <CAMe9rOq=UN7J80HVxkN+sOsJYF=qhxBVZhy_9iNDA9MY77mEuQ@mail.gmail.com> (raw)
In-Reply-To: <e95de882-450c-7834-7c74-efaaa3a91a9d@codesourcery.com>
[-- 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
next prev parent reply other threads:[~2022-01-24 17:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` H.J. Lu [this message]
2022-01-24 18:38 ` [PATCH v2] bfd: Update doc/local.mk 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMe9rOq=UN7J80HVxkN+sOsJYF=qhxBVZhy_9iNDA9MY77mEuQ@mail.gmail.com' \
--to=hjl.tools@gmail.com \
--cc=binutils@sourceware.org \
--cc=tobias@codesourcery.com \
--cc=vapier@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).