public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* gdb build broken in libctf with old makeinfo
@ 2021-12-02 23:33 Tom de Vries
  2021-12-03  4:28 ` [PATCH] libctf: workaround automake bug with conditional info pages Mike Frysinger
  0 siblings, 1 reply; 2+ messages in thread
From: Tom de Vries @ 2021-12-02 23:33 UTC (permalink / raw)
  To: Binutils, gdb-patches, Mike Frysinger

Hi,

I tried to build gdb on an older distro, with an old version of
makeinfo, version 4.13.

While building the libctf bit configure informed me that makeinfo is too
old and "Info documentation will not be build".  Subsequently, the build
broke on building precisely that documentation.

Reverting to before commit 1eaa86a6d5b "libctf: merge doc subdir up a
level" fixes the build.

Thanks,
- Tom


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

* [PATCH] libctf: workaround automake bug with conditional info pages
  2021-12-02 23:33 gdb build broken in libctf with old makeinfo Tom de Vries
@ 2021-12-03  4:28 ` Mike Frysinger
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger @ 2021-12-03  4:28 UTC (permalink / raw)
  To: binutils; +Cc: tdevries

It looks like automake makes assumptions about its ability to build info
pages based on the GNU standard behavior of shipping info pages with the
distributions.  So even though the info pages were conditionalized, and
automake disabled some of the targets, it was still creeping in by way
of unconditional INFO_DEPS settings.

We can workaround this by adding a stub target for the info page when
building info pages are disabled.  This tricks automake into disabling
its own extended generation target.  I'll follow up with the automake
folks to see what they think.
---
 libctf/Makefile.am  |  2 --
 libctf/Makefile.in  | 40 ++++++++++++++++++++++------------------
 libctf/doc/local.mk | 10 ++++++++++
 3 files changed, 32 insertions(+), 20 deletions(-)

diff --git a/libctf/Makefile.am b/libctf/Makefile.am
index 3e51b7b30d0c..8d3170185562 100644
--- a/libctf/Makefile.am
+++ b/libctf/Makefile.am
@@ -114,6 +114,4 @@ EXTRA_DEJAGNU_SITE_CONFIG = development.exp
 DISTCLEANFILES += site.exp development.exp
 endif
 
-if BUILD_INFO
 include doc/local.mk
-endif
diff --git a/libctf/Makefile.in b/libctf/Makefile.in
index 379f50df44b2..2b74bf2855ef 100644
--- a/libctf/Makefile.in
+++ b/libctf/Makefile.in
@@ -1023,24 +1023,24 @@ doc/$(am__dirstamp):
 	@$(MKDIR_P) doc
 	@: > doc/$(am__dirstamp)
 
-doc/ctf-spec.info: doc/ctf-spec.texi 
-	@test -f doc/$(am__dirstamp) || $(MAKE) $(AM_MAKEFLAGS) doc/$(am__dirstamp)
-	$(AM_V_MAKEINFO)restore=: && backupdir="$(am__leading_dot)am$$$$" && \
-	rm -rf $$backupdir && mkdir $$backupdir && \
-	if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
-	  for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
-	    if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
-	  done; \
-	else :; fi && \
-	if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc \
-	 -o $@ `test -f 'doc/ctf-spec.texi' || echo '$(srcdir)/'`doc/ctf-spec.texi; \
-	then \
-	  rc=0; \
-	else \
-	  rc=$$?; \
-	  $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
-	fi; \
-	rm -rf $$backupdir; exit $$rc
+@BUILD_INFO_TRUE@doc/ctf-spec.info: doc/ctf-spec.texi 
+@BUILD_INFO_TRUE@	@test -f doc/$(am__dirstamp) || $(MAKE) $(AM_MAKEFLAGS) doc/$(am__dirstamp)
+@BUILD_INFO_TRUE@	$(AM_V_MAKEINFO)restore=: && backupdir="$(am__leading_dot)am$$$$" && \
+@BUILD_INFO_TRUE@	rm -rf $$backupdir && mkdir $$backupdir && \
+@BUILD_INFO_TRUE@	if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
+@BUILD_INFO_TRUE@	  for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
+@BUILD_INFO_TRUE@	    if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
+@BUILD_INFO_TRUE@	  done; \
+@BUILD_INFO_TRUE@	else :; fi && \
+@BUILD_INFO_TRUE@	if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc \
+@BUILD_INFO_TRUE@	 -o $@ `test -f 'doc/ctf-spec.texi' || echo '$(srcdir)/'`doc/ctf-spec.texi; \
+@BUILD_INFO_TRUE@	then \
+@BUILD_INFO_TRUE@	  rc=0; \
+@BUILD_INFO_TRUE@	else \
+@BUILD_INFO_TRUE@	  rc=$$?; \
+@BUILD_INFO_TRUE@	  $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
+@BUILD_INFO_TRUE@	fi; \
+@BUILD_INFO_TRUE@	rm -rf $$backupdir; exit $$rc
 
 doc/ctf-spec.dvi: doc/ctf-spec.texi  doc/$(am__dirstamp)
 	$(AM_V_TEXI2DVI)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
@@ -1709,6 +1709,10 @@ uninstall-am: uninstall-dvi-am uninstall-html-am \
 @BUILD_INFO_TRUE@	$(AM_V_GEN)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \
 @BUILD_INFO_TRUE@	  --split=node -I$(srcdir) --output doc/ctf-spec $(srcdir)/doc/ctf-spec.texi
 
+# Workaround bug in automake: it can't handle conditionally building info pages
+# since GNU projects normally include info pages in the source distributions.
+@BUILD_INFO_FALSE@doc/ctf-spec.info:
+
 # 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.
 .NOEXPORT:
diff --git a/libctf/doc/local.mk b/libctf/doc/local.mk
index 7ee2fec78cc7..e533d72227d0 100644
--- a/libctf/doc/local.mk
+++ b/libctf/doc/local.mk
@@ -17,6 +17,8 @@
 # <http://www.gnu.org/licenses/>.
 #
 
+if BUILD_INFO
+
 info_TEXINFOS += %D%/ctf-spec.texi
 libctf_TEXINFOS = $(info_TEXINFOS)
 
@@ -29,3 +31,11 @@ html-local: %D%/ctf-spec/index.html
 %D%/ctf-spec/index.html: %D%/ctf-spec.texi %D%/$(am__dirstamp)
 	$(AM_V_GEN)$(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \
 	  --split=node -I$(srcdir) --output %D%/ctf-spec $(srcdir)/%D%/ctf-spec.texi
+
+else
+
+# Workaround bug in automake: it can't handle conditionally building info pages
+# since GNU projects normally include info pages in the source distributions.
+%D%/ctf-spec.info:
+
+endif
-- 
2.33.0


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

end of thread, other threads:[~2021-12-03  4:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-02 23:33 gdb build broken in libctf with old makeinfo Tom de Vries
2021-12-03  4:28 ` [PATCH] libctf: workaround automake bug with conditional info pages Mike Frysinger

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).