BUILD_INFO is currently a byproduct of checking makeinfo presence/version. INSTALL_INFO used to be defined similarly, but was removed in 2000 (!) by commit 17db658241d18cf6db59d31bc2d6eac96e9257df (svn r38141).
In order to save build time, our CI overrides BUILD_INFO="", which works when invoking 'make all' but not for 'make install' in case some info files need an update. I noticed this when testing a patch posted on the gcc-patches list, leading to an error at 'make install' time after updating tm.texi (the build reported 'new text' in tm.texi and stopped). This is because 'install' depends on 'install-info', which depends on $(DESTDIR)$(infodir)/gccint.info (among others). This patch makes the 'install-info' dependency in 'install' conditioned by BUILD_INFO. 2024-02-05 Christophe Lyon <christophe.l...@linaro.org> gcc/ * Makefile.in: Use install-info only if BUILD_INFO is not empty. --- gcc/Makefile.in | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 4d38b162307..6cb564cfd35 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -817,7 +817,6 @@ INSTALL_HEADERS=install-headers install-mkheaders # Control whether Info documentation is built and installed. BUILD_INFO = @BUILD_INFO@ -INSTALL_INFO = @INSTALL_INFO@ # Control flags for @contents placement in HTML output MAKEINFO_TOC_INLINE_FLAG = @MAKEINFO_TOC_INLINE_FLAG@ @@ -3786,9 +3785,13 @@ maintainer-clean: # Install the driver last so that the window when things are # broken is small. install: install-common $(INSTALL_HEADERS) \ - install-cpp install-man $(INSTALL_INFO) install-@POSUB@ \ + install-cpp install-man install-@POSUB@ \ install-driver install-lto-wrapper install-gcc-ar +ifneq ($(BUILD_INFO),) +install: install-info +endif + ifeq ($(enable_plugin),yes) install: install-plugin endif -- 2.34.1