]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gcc/Makefile.in: Always check info dependencies
authorChristophe Lyon <christophe.lyon@linaro.org>
Sat, 10 Feb 2024 21:17:08 +0000 (21:17 +0000)
committerChristophe Lyon <christophe.lyon@linaro.org>
Mon, 12 Feb 2024 15:47:05 +0000 (15:47 +0000)
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 MAKEINFO=echo, which
works when invoking 'make all' but not for 'make install' in case some
info files need an update.

I noticed this while 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).

As discussed, it is better to detect this problem during 'make all'
rather than 'make install', and we still want to detect it even if
makeinfo is not available.

This patch makes configure set BUILD_INFO=no-info in case makeinfo is
missing/too old, which effectively makes the build rules no-ops
(x$(BUILD_INFO) != xinfo), and updates Makefile.in so that 'info'
dependencies are still checked.

2024-02-10  Christophe Lyon  <christophe.lyon@linaro.org>

gcc/
* Makefile.in: Add no-info dependency.
* configure.ac: Set BUILD_INFO=no-info if makeinfo is not
available.
* configure: Regenerate.

gcc/Makefile.in
gcc/configure
gcc/configure.ac

index 95caa54a52bd82287f08d351956e2d4b5284c99b..a74761b7ab32d85f88aeb1c3d7850920e5df35a8 100644 (file)
@@ -3480,6 +3480,13 @@ install-no-fixedincludes:
 
 doc: $(BUILD_INFO) $(GENERATED_MANPAGES)
 
+# If BUILD_INFO is set to no-info by configure, we still want to check
+# 'info' dependencies even the build rules are no-ops because
+# BUILD_INFO != info (see %.info rule)
+ifeq ($(BUILD_INFO),no-info)
+no-info: info
+endif
+
 INFOFILES = doc/cpp.info doc/gcc.info doc/gccint.info \
             doc/gccinstall.info doc/cppinternals.info
 
index c83e09beea9f6aace96983a5f8808b6cc95b40ad..41b978b0380b2d3f05a4ede08e40e878e4b34a56 100755 (executable)
@@ -8835,7 +8835,7 @@ if test $gcc_cv_prog_makeinfo_modern = no; then
 $as_echo "$as_me: WARNING:
 *** Makeinfo is missing or too old.
 *** Info documentation will not be built." >&2;}
-  BUILD_INFO=
+  BUILD_INFO=no-info
 else
   BUILD_INFO=info
 fi
index 239856a4e2027495a29f40eeee7bbd20ae90f7f7..72012d61e67196f4cf35c9d0ef23943cc3cfcbf7 100644 (file)
@@ -1245,7 +1245,7 @@ if test $gcc_cv_prog_makeinfo_modern = no; then
   AC_MSG_WARN([
 *** Makeinfo is missing or too old.
 *** Info documentation will not be built.])
-  BUILD_INFO=
+  BUILD_INFO=no-info
 else
   BUILD_INFO=info
 fi