On 11/9/22 10:09, Martin Liška wrote:
I noticed I modified Makefile.in files in the Sphinx series. While I was
supposed to modifiky Makefile.am and use automake. I'm going to fix that soon.

A recent master build against (apparently too old) python3-sphinx-5.0.2-2.fc37.noarch failed for me with

[...]
make -C ../../src/gcc/../doc man 
SOURCEDIR=.../build/gcc/../../src/gcc/fortran/doc/gfortran 
BUILDDIR=.../build/gcc/doc/gfortran/man SPHINXBUILD=sphinx-build
make[3]: Entering directory '.../src/doc'
sphinx-build -b "man" -d .../build/gcc/doc/gfortran/man/doctrees  -q  
.../build/gcc/../../src/gcc/fortran/doc/gfortran ".../build/gcc/doc/gfortran/man/man"

Sphinx version error:
This project needs at least Sphinx v5.3 and therefore cannot be built with this 
version.
make[3]: *** [Makefile:100: man] Error 2
make[3]: Leaving directory '.../src/doc'
make[2]: *** [../../src/gcc/fortran/Make-lang.in:164: 
doc/gfortran/man/man/gfortran.1] Error 2
make[2]: Leaving directory '.../build/gcc'
make[1]: *** [Makefile:5300: install-gcc] Error 2
make[1]: Leaving directory '.../build'
make: *** [Makefile:2576: install] Error 2

which would be fixed by

diff --git a/gcc/fortran/Make-lang.in b/gcc/fortran/Make-lang.in
index 48acbed1754..852b6f3327f 100644
--- a/gcc/fortran/Make-lang.in
+++ b/gcc/fortran/Make-lang.in
@@ -161,7 +161,9 @@ fortran.install-pdf: $(F95_PDFFILES)
 F95_MANFILES = doc/gfortran/man/man/gfortran.1
doc/gfortran/man/man/gfortran.1: $(SPHINX_FILES)
-       + make -C $(srcdir)/../doc man 
SOURCEDIR=$(abs_srcdir)/fortran/doc/gfortran 
BUILDDIR=$(objdir)/doc/gfortran/man SPHINXBUILD=$(SPHINX_BUILD)
+       + if [ x$(HAS_SPHINX_BUILD) = xhas-sphinx-build ]; then \
+         make -C $(srcdir)/../doc man 
SOURCEDIR=$(abs_srcdir)/fortran/doc/gfortran 
BUILDDIR=$(objdir)/doc/gfortran/man SPHINXBUILD=$(SPHINX_BUILD) \
+       else true; fi
fortran.man: $(F95_MANFILES)


Reply via email to