sphinx: add --with-sphinx-build

gcc/ChangeLog:

	* Makefile.in: Support --with-sphinx-build.
	* configure.ac:
	* configure: Regenerate.

gcc/ada/ChangeLog:

	* gcc-interface/Make-lang.in: Support --with-sphinx-build.

gcc/d/ChangeLog:

	* Make-lang.in: Support --with-sphinx-build.

gcc/fortran/ChangeLog:

	* Make-lang.in: Support --with-sphinx-build.

gcc/go/ChangeLog:

	* Make-lang.in: Support --with-sphinx-build.

gcc/jit/ChangeLog:

	* Make-lang.in: Support --with-sphinx-build.

libgomp/ChangeLog:

	* Makefile.in: Support --with-sphinx-build.
	* configure.ac: Likewise..
	* configure: Regenerate.

libiberty/ChangeLog:

	* Makefile.in: Support --with-sphinx-build.
	* configure.ac: Likewise.
	* configure: Regenerate.

libitm/ChangeLog:

	* Makefile.in: Support --with-sphinx-build.
	* configure.ac: Likewise.
	* configure: Regenerate.

libquadmath/ChangeLog:

	* Makefile.in: Support --with-sphinx-build.
	* configure.ac: Likewise.
	* configure: Regenerate.
This commit is contained in:
Martin Liska 2022-07-27 15:40:48 +02:00
parent c0eb1a3b7c
commit 1f5a932e89
20 changed files with 503 additions and 82 deletions

View File

@ -765,6 +765,7 @@ INSTALL_HEADERS=install-headers install-mkheaders
# Control whether manpages generated by sphinx-build can be rebuilt.
SPHINX_BUILD = @SPHINX_BUILD@
HAS_SPHINX_BUILD = @HAS_SPHINX_BUILD@
# Additional directories of header files to run fixincludes on.
# These should be directories searched automatically by default
@ -3274,7 +3275,7 @@ install-no-fixedincludes:
# Remake the info files.
doc: $(SPHINX_BUILD)
doc: $(HAS_SPHINX_BUILD)
INFOFILES = doc/gcc/info/texinfo/gcc.info \
doc/gccint/info/texinfo/gccint.info \
@ -3293,19 +3294,19 @@ PDFFILES = doc/gcc/pdf/latex/gcc.pdf doc/gccint/pdf/latex/gccint.pdf doc/install
pdf:: $(PDFFILES) lang.pdf
doc/gcc/pdf/latex/gcc.pdf: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc latexpdf SOURCEDIR=$(abs_docdir)/gcc BUILDDIR=$(objdir)/doc/gcc/pdf
+ make -C $(srcdir)/../doc latexpdf SOURCEDIR=$(abs_docdir)/gcc BUILDDIR=$(objdir)/doc/gcc/pdf SPHINXBUILD=$(SPHINX_BUILD)
doc/gccint/pdf/latex/gccint.pdf: $(SPHINX_FILES) s-tm-rst-in
+ make -C $(srcdir)/../doc latexpdf SOURCEDIR=$(abs_docdir)/gccint BUILDDIR=$(objdir)/doc/gccint/pdf
+ make -C $(srcdir)/../doc latexpdf SOURCEDIR=$(abs_docdir)/gccint BUILDDIR=$(objdir)/doc/gccint/pdf SPHINXBUILD=$(SPHINX_BUILD)
doc/install/pdf/latex/install.pdf: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc latexpdf SOURCEDIR=$(abs_docdir)/install BUILDDIR=$(objdir)/doc/install/pdf
+ make -C $(srcdir)/../doc latexpdf SOURCEDIR=$(abs_docdir)/install BUILDDIR=$(objdir)/doc/install/pdf SPHINXBUILD=$(SPHINX_BUILD)
doc/cpp/pdf/latex/cpp.pdf: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc latexpdf SOURCEDIR=$(abs_docdir)/cpp BUILDDIR=$(objdir)/doc/cpp/pdf
+ make -C $(srcdir)/../doc latexpdf SOURCEDIR=$(abs_docdir)/cpp BUILDDIR=$(objdir)/doc/cpp/pdf SPHINXBUILD=$(SPHINX_BUILD)
doc/cppinternals/pdf/latex/cppinternals.pdf: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc latexpdf SOURCEDIR=$(abs_docdir)/cppinternals BUILDDIR=$(objdir)/doc/cppinternals/pdf
+ make -C $(srcdir)/../doc latexpdf SOURCEDIR=$(abs_docdir)/cppinternals BUILDDIR=$(objdir)/doc/cppinternals/pdf SPHINXBUILD=$(SPHINX_BUILD)
# List the directories or single hmtl files which are installed by
# install-html. The lang.html file triggers language fragments to build
@ -3321,19 +3322,19 @@ HTMLS = doc/gcc/html/html/index.html doc/gccint/html/html/index.html doc/install
html:: $(HTMLS) lang.html
doc/gcc/html/html/index.html: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc html SOURCEDIR=$(abs_docdir)/gcc BUILDDIR=$(objdir)/doc/gcc/html
+ make -C $(srcdir)/../doc html SOURCEDIR=$(abs_docdir)/gcc BUILDDIR=$(objdir)/doc/gcc/html SPHINXBUILD=$(SPHINX_BUILD)
doc/gccint/html/html/index.html: $(SPHINX_FILES) s-tm-rst-in
+ make -C $(srcdir)/../doc html SOURCEDIR=$(abs_docdir)/gccint BUILDDIR=$(objdir)/doc/gccint/html
+ make -C $(srcdir)/../doc html SOURCEDIR=$(abs_docdir)/gccint BUILDDIR=$(objdir)/doc/gccint/html SPHINXBUILD=$(SPHINX_BUILD)
doc/install/html/html/index.html: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc html SOURCEDIR=$(abs_docdir)/install BUILDDIR=$(objdir)/doc/install/html
+ make -C $(srcdir)/../doc html SOURCEDIR=$(abs_docdir)/install BUILDDIR=$(objdir)/doc/install/html SPHINXBUILD=$(SPHINX_BUILD)
doc/cpp/html/html/index.html: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc html SOURCEDIR=$(abs_docdir)/cpp BUILDDIR=$(objdir)/doc/cpp/html
+ make -C $(srcdir)/../doc html SOURCEDIR=$(abs_docdir)/cpp BUILDDIR=$(objdir)/doc/cpp/html SPHINXBUILD=$(SPHINX_BUILD)
doc/cppinternals/html/html/index.html: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc html SOURCEDIR=$(abs_docdir)/cppinternals BUILDDIR=$(objdir)/doc/cppinternals/html
+ make -C $(srcdir)/../doc html SOURCEDIR=$(abs_docdir)/cppinternals BUILDDIR=$(objdir)/doc/cppinternals/html SPHINXBUILD=$(SPHINX_BUILD)
MANFILES = doc/gcc/man/man/gcc.1 doc/cpp/man/man/cpp.1 \
doc/gcc/man/man/gfdl.7 doc/gcc/man/man/gpl.7 \
@ -3350,14 +3351,14 @@ man: $(MANFILES) lang.man @GENINSRC@ srcman lang.srcman
srcman: $(MANFILES)
-cp -p $^ $(srcdir)/doc
sphinx-build: man info
has-sphinx-build: man info
RST_FILES:=$(shell find $(srcdir) -name *.rst -or -name *.rst.in)
SPHINX_CONFIG_FILES:=$(shell find $(srcdir)/.. -name conf.py) $(srcdir)/../doc/baseconf.py
SPHINX_FILES:=$(RST_FILES) $(SPHINX_CONFIG_FILES)
doc/gcc/man/man/gcc.1: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc man SOURCEDIR=$(abs_docdir)/gcc BUILDDIR=$(objdir)/doc/gcc/man
+ make -C $(srcdir)/../doc man SOURCEDIR=$(abs_docdir)/gcc BUILDDIR=$(objdir)/doc/gcc/man SPHINXBUILD=$(SPHINX_BUILD)
doc/gcc/man/man/gcov.1: doc/gcc/man/man/gcc.1
doc/gcc/man/man/gcov-tool.1: doc/gcc/man/man/gcc.1
@ -3368,22 +3369,22 @@ doc/gcc/man/man/gpl.7: doc/gcc/man/man/gcc.1
doc/gcc/man/man/fsf-funding.7: doc/gcc/man/man/gcc.1
doc/cpp/man/man/cpp.1: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc man SOURCEDIR=$(abs_docdir)/cpp BUILDDIR=$(objdir)/doc/cpp/man
+ make -C $(srcdir)/../doc man SOURCEDIR=$(abs_docdir)/cpp BUILDDIR=$(objdir)/doc/cpp/man SPHINXBUILD=$(SPHINX_BUILD)
doc/gcc/info/texinfo/gcc.info: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc info SOURCEDIR=$(abs_docdir)/gcc BUILDDIR=$(objdir)/doc/gcc/info
+ make -C $(srcdir)/../doc info SOURCEDIR=$(abs_docdir)/gcc BUILDDIR=$(objdir)/doc/gcc/info SPHINXBUILD=$(SPHINX_BUILD)
doc/gccint/info/texinfo/gccint.info: $(SPHINX_FILES) s-tm-rst-in
+ make -C $(srcdir)/../doc info SOURCEDIR=$(abs_docdir)/gccint BUILDDIR=$(objdir)/doc/gccint/info
+ make -C $(srcdir)/../doc info SOURCEDIR=$(abs_docdir)/gccint BUILDDIR=$(objdir)/doc/gccint/info SPHINXBUILD=$(SPHINX_BUILD)
doc/cpp/info/texinfo/cpp.info: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc info SOURCEDIR=$(abs_docdir)/cpp BUILDDIR=$(objdir)/doc/cpp/info
+ make -C $(srcdir)/../doc info SOURCEDIR=$(abs_docdir)/cpp BUILDDIR=$(objdir)/doc/cpp/info SPHINXBUILD=$(SPHINX_BUILD)
doc/cppinternals/info/texinfo/cppinternals.info: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc info SOURCEDIR=$(abs_docdir)/cppinternals BUILDDIR=$(objdir)/doc/cppinternals/info
+ make -C $(srcdir)/../doc info SOURCEDIR=$(abs_docdir)/cppinternals BUILDDIR=$(objdir)/doc/cppinternals/info SPHINXBUILD=$(SPHINX_BUILD)
doc/install/info/texinfo/install.info: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc info SOURCEDIR=$(abs_docdir)/install BUILDDIR=$(objdir)/doc/install/info
+ make -C $(srcdir)/../doc info SOURCEDIR=$(abs_docdir)/install BUILDDIR=$(objdir)/doc/install/info SPHINXBUILD=$(SPHINX_BUILD)
#
# Deletion of files made during compilation.

View File

@ -809,18 +809,18 @@ ada.tags: force
# Generate documentation.
doc/gnat_ugn/info/texinfo/gnat_ugn.info: $(SPHINX_FILES)
+ if [ x$(SPHINX_BUILD) = xsphinx-build ]; then \
make -C $(srcdir)/../doc info SOURCEDIR=$(abs_srcdir)/ada/doc/gnat_ugn BUILDDIR=$(objdir)/doc/gnat_ugn/info; \
+ if [ x$(HAS_SPHINX_BUILD) = xhas-sphinx-build ]; then \
make -C $(srcdir)/../doc info SOURCEDIR=$(abs_srcdir)/ada/doc/gnat_ugn BUILDDIR=$(objdir)/doc/gnat_ugn/info SPHINXBUILD=$(SPHINX_BUILD); \
else true; fi
doc/gnat_rm/info/texinfo/gnat_rm.info: $(SPHINX_FILES)
+ if [ x$(SPHINX_BUILD) = xsphinx-build ]; then \
make -C $(srcdir)/../doc info SOURCEDIR=$(abs_srcdir)/ada/doc/gnat_rm BUILDDIR=$(objdir)/doc/gnat_rm/info; \
+ if [ x$(HAS_SPHINX_BUILD) = xhas-sphinx-build ]; then \
make -C $(srcdir)/../doc info SOURCEDIR=$(abs_srcdir)/ada/doc/gnat_rm BUILDDIR=$(objdir)/doc/gnat_rm/info SPHINXBUILD=$(SPHINX_BUILD); \
else true; fi
doc/gnat-style/info/texinfo/gnat-style.info: $(SPHINX_FILES)
+ if [ x$(SPHINX_BUILD) = xsphinx-build ]; then \
make -C $(srcdir)/../doc info SOURCEDIR=$(abs_srcdir)/ada/doc/gnat-style BUILDDIR=$(objdir)/doc/gnat-style/info; \
+ if [ x$(HAS_SPHINX_BUILD) = xhas-sphinx-build ]; then \
make -C $(srcdir)/../doc info SOURCEDIR=$(abs_srcdir)/ada/doc/gnat-style BUILDDIR=$(objdir)/doc/gnat-style/info SPHINXBUILD=$(SPHINX_BUILD); \
else true; fi
ADA_INFOFILES = doc/gnat_ugn/info/texinfo/gnat_ugn.info \
@ -855,13 +855,13 @@ ADA_PDFFILES = doc/gnat_ugn/pdf/latex/gnat_ugn.pdf\
ada.pdf: $(ADA_PDFFILES)
doc/gnat_ugn/pdf/latex/gnat_ugn.pdf: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc latexpdf SOURCEDIR=$(abs_srcdir)/ada/doc/gnat_ugn BUILDDIR=$(objdir)/doc/gnat_ugn/pdf
+ make -C $(srcdir)/../doc latexpdf SOURCEDIR=$(abs_srcdir)/ada/doc/gnat_ugn BUILDDIR=$(objdir)/doc/gnat_ugn/pdf SPHINXBUILD=$(SPHINX_BUILD)
doc/gnat_rm/pdf/latex/gnat_rm.pdf: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc latexpdf SOURCEDIR=$(abs_srcdir)/ada/doc/gnat_rm BUILDDIR=$(objdir)/doc/gnat_rm/pdf
+ make -C $(srcdir)/../doc latexpdf SOURCEDIR=$(abs_srcdir)/ada/doc/gnat_rm BUILDDIR=$(objdir)/doc/gnat_rm/pdf SPHINXBUILD=$(SPHINX_BUILD)
doc/gnat-style/pdf/latex/gnat-style.pdf: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc latexpdf SOURCEDIR=$(abs_srcdir)/ada/doc/gnat-style BUILDDIR=$(objdir)/doc/gnat-style/pdf
+ make -C $(srcdir)/../doc latexpdf SOURCEDIR=$(abs_srcdir)/ada/doc/gnat-style BUILDDIR=$(objdir)/doc/gnat-style/pdf SPHINXBUILD=$(SPHINX_BUILD)
ada.install-pdf: $(ADA_PDFFILES)
@$(NORMAL_INSTALL)
@ -876,13 +876,13 @@ ada.install-pdf: $(ADA_PDFFILES)
ada.html: doc/gnat_ugn/html/html/index.html doc/gnat_rm/html/html/index.html doc/gnat-style/html/html/index.html
doc/gnat_ugn/html/html/index.html: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc html SOURCEDIR=$(abs_srcdir)/ada/doc/gnat_ugn BUILDDIR=$(objdir)/doc/gnat_ugn/html
+ make -C $(srcdir)/../doc html SOURCEDIR=$(abs_srcdir)/ada/doc/gnat_ugn BUILDDIR=$(objdir)/doc/gnat_ugn/html SPHINXBUILD=$(SPHINX_BUILD)
doc/gnat_rm/html/html/index.html: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc html SOURCEDIR=$(abs_srcdir)/ada/doc/gnat_rm BUILDDIR=$(objdir)/doc/gnat_rm/html
+ make -C $(srcdir)/../doc html SOURCEDIR=$(abs_srcdir)/ada/doc/gnat_rm BUILDDIR=$(objdir)/doc/gnat_rm/html SPHINXBUILD=$(SPHINX_BUILD)
doc/gnat-style/html/html/index.html: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc html SOURCEDIR=$(abs_srcdir)/ada/doc/gnat-style BUILDDIR=$(objdir)/doc/gnat-style/html
+ make -C $(srcdir)/../doc html SOURCEDIR=$(abs_srcdir)/ada/doc/gnat-style BUILDDIR=$(objdir)/doc/gnat-style/html SPHINXBUILD=$(SPHINX_BUILD)
ada.install-html:

38
gcc/configure vendored
View File

@ -807,7 +807,9 @@ AR
NM
BISON
FLEX
HAS_SPHINX_BUILD
SPHINX_BUILD
CONFIGURE_SPHINX_BUILD
GENERATED_MANPAGES
BUILD_INFO
MAKEINFO
@ -982,6 +984,7 @@ with_changes_root_url
enable_languages
with_multilib_list
with_multilib_generator
with_sphinx_build
with_zstd
with_zstd_include
with_zstd_lib
@ -1836,6 +1839,7 @@ Optional Packages:
SH and x86-64 only)
--with-multilib-generator
Multi-libs configuration string (RISC-V only)
--with-sphinx-build= Use sphinx-build from a given path
--with-zstd=PATH specify prefix directory for installed zstd library.
Equivalent to --with-zstd-include=PATH/include plus
--with-zstd-lib=PATH/lib
@ -8806,12 +8810,34 @@ $as_echo "no" >&6; }
fi
# Check whether --with-sphinx-build was given.
if test "${with_sphinx_build+set}" = set; then :
withval=$with_sphinx_build; CONFIGURE_SPHINX_BUILD=$withval
else
CONFIGURE_SPHINX_BUILD=
fi
# See if sphinx-build has been installed and is modern enough
# that we can use it.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sphinx-build" >&5
$as_echo_n "checking for sphinx-build... " >&6; }
if sphinx-build -j auto -h &>/dev/null ; then
SPHINX_BUILD=sphinx-build
sphinx=sphinx-build
if test x${CONFIGURE_SPHINX_BUILD} != x ; then
sphinx=${CONFIGURE_SPHINX_BUILD}
fi
tempdir=build.$$
source=source.$$
mkdir $source
grep 'needs_sphinx =' ${srcdir}/../doc/baseconf.py > $source/conf.py
touch $source/index.rst
if ${sphinx} $source $tempdir >/dev/null 2>&1; then
SPHINX_BUILD=${sphinx}
HAS_SPHINX_BUILD=has-sphinx-build
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
@ -8824,7 +8850,11 @@ $as_echo "$as_me: WARNING:
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
SPHINX_BUILD=
HAS_SPHINX_BUILD=
fi
rm -rf $tempdir
rm -rf $source
MISSING="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing"
@ -19732,7 +19762,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 19735 "configure"
#line 19765 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -19838,7 +19868,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 19841 "configure"
#line 19871 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H

View File

@ -1253,11 +1253,30 @@ else
fi
AC_SUBST(GENERATED_MANPAGES)
AC_ARG_WITH(sphinx-build,
[AS_HELP_STRING([--with-sphinx-build=],
[Use sphinx-build from a given path])],
[CONFIGURE_SPHINX_BUILD=$withval],
[CONFIGURE_SPHINX_BUILD=]
)
AC_SUBST(CONFIGURE_SPHINX_BUILD)
# See if sphinx-build has been installed and is modern enough
# that we can use it.
AC_MSG_CHECKING([for sphinx-build])
if sphinx-build -j auto -h &>/dev/null ; then
SPHINX_BUILD=sphinx-build
sphinx=sphinx-build
if test x${CONFIGURE_SPHINX_BUILD} != x ; then
sphinx=${CONFIGURE_SPHINX_BUILD}
fi
tempdir=build.$$
source=source.$$
mkdir $source
grep 'needs_sphinx =' ${srcdir}/../doc/baseconf.py > $source/conf.py
touch $source/index.rst
if ${sphinx} $source $tempdir >/dev/null 2>&1; then
SPHINX_BUILD=${sphinx}
HAS_SPHINX_BUILD=has-sphinx-build
AC_MSG_RESULT(yes)
else
AC_MSG_WARN([
@ -1265,8 +1284,12 @@ else
*** Info and man pages documentation will not be built.])
AC_MSG_RESULT(no)
SPHINX_BUILD=
HAS_SPHINX_BUILD=
fi
rm -rf $tempdir
rm -rf $source
AC_SUBST(SPHINX_BUILD)
AC_SUBST(HAS_SPHINX_BUILD)
MISSING="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing"

View File

@ -237,15 +237,15 @@ d21$(exeext): $(D_ALL_OBJS) attribs.o $(BACKEND) $(LIBDEPS) $(d.prev)
# Documentation.
doc/gdc/info/texinfo/gdc.info: $(SPHINX_FILES)
+ if [ x$(SPHINX_BUILD) = xsphinx-build ]; then \
make -C $(srcdir)/../doc info SOURCEDIR=$(abs_srcdir)/d/doc BUILDDIR=$(objdir)/doc/gdc/info; \
+ if [ x$(HAS_SPHINX_BUILD) = xhas-sphinx-build ]; then \
make -C $(srcdir)/../doc info SOURCEDIR=$(abs_srcdir)/d/doc BUILDDIR=$(objdir)/doc/gdc/info SPHINXBUILD=$(SPHINX_BUILD); \
else true; fi
doc/gdc.pdf: $(D_TEXI_FILES)
$(TEXI2PDF) -I $(abs_docdir) -I $(abs_docdir)/include -o $@ $<
doc/gdc/html/html/index.html: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc html SOURCEDIR=$(abs_srcdir)/d/doc BUILDDIR=$(objdir)/doc/gdc/html
+ make -C $(srcdir)/../doc html SOURCEDIR=$(abs_srcdir)/d/doc BUILDDIR=$(objdir)/doc/gdc/html SPHINXBUILD=$(SPHINX_BUILD)
# Build hooks.
d.all.cross: gdc-cross$(exeext)
@ -271,7 +271,7 @@ d.srcman: doc/gdc/man/man/gdc.1
-cp -p $^ $(srcdir)/doc
doc/gdc/man/man/gdc.1: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc man SOURCEDIR=$(abs_srcdir)/d/doc BUILDDIR=$(objdir)/doc/gdc/man
+ make -C $(srcdir)/../doc man SOURCEDIR=$(abs_srcdir)/d/doc BUILDDIR=$(objdir)/doc/gdc/man SPHINXBUILD=$(SPHINX_BUILD)
# 'make check' in gcc/ looks for check-d, as do all toplevel D-related
# check targets. However, our DejaGNU framework requires 'check-gdc' as its
@ -304,7 +304,7 @@ d.install-plugin:
d.install-info: $(DESTDIR)$(infodir)/gdc.info
doc/gdc/pdf/latex/gdc.pdf: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc latexpdf SOURCEDIR=$(abs_srcdir)/d/doc BUILDDIR=$(objdir)/doc/gdc/pdf
+ make -C $(srcdir)/../doc latexpdf SOURCEDIR=$(abs_srcdir)/d/doc BUILDDIR=$(objdir)/doc/gdc/pdf SPHINXBUILD=$(SPHINX_BUILD)
$(DESTDIR)$(infodir)/gdc.info: doc/gdc/info/texinfo/gdc.info installdirs
-rm -f $@

View File

@ -119,8 +119,8 @@ fortran.tags: force
fortran.info: doc/gfortran/info/texinfo/gfortran.info doc/gfc-internals/info/texinfo/gfc-internals.info
doc/gfortran/info/texinfo/gfortran.info: $(SPHINX_FILES)
+ if [ x$(SPHINX_BUILD) = xsphinx-build ]; then \
make -C $(srcdir)/../doc info SOURCEDIR=$(abs_srcdir)/fortran/doc/gfortran BUILDDIR=$(objdir)/doc/gfortran/info; \
+ if [ x$(HAS_SPHINX_BUILD) = xhas-sphinx-build ]; then \
make -C $(srcdir)/../doc info SOURCEDIR=$(abs_srcdir)/fortran/doc/gfortran BUILDDIR=$(objdir)/doc/gfortran/info SPHINXBUILD=$(SPHINX_BUILD); \
else true; fi
F95_HTMLFILES = doc/fortran/html/html/index.html
@ -161,7 +161,7 @@ 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
+ make -C $(srcdir)/../doc man SOURCEDIR=$(abs_srcdir)/fortran/doc/gfortran BUILDDIR=$(objdir)/doc/gfortran/man SPHINXBUILD=$(SPHINX_BUILD)
fortran.man: $(F95_MANFILES)
@ -183,22 +183,22 @@ check_gfortran_parallelize = 10000
selftest-fortran:
doc/fortran/pdf/latex/gfortran.pdf: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc latexpdf SOURCEDIR=$(abs_srcdir)/fortran/doc/gfortran BUILDDIR=$(objdir)/doc/fortran/pdf
+ make -C $(srcdir)/../doc latexpdf SOURCEDIR=$(abs_srcdir)/fortran/doc/gfortran BUILDDIR=$(objdir)/doc/fortran/pdf SPHINXBUILD=$(SPHINX_BUILD)
doc/fortran/html/html/index.html: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc html SOURCEDIR=$(abs_srcdir)/fortran/doc/gfortran BUILDDIR=$(objdir)/doc/fortran/html
+ make -C $(srcdir)/../doc html SOURCEDIR=$(abs_srcdir)/fortran/doc/gfortran BUILDDIR=$(objdir)/doc/fortran/html SPHINXBUILD=$(SPHINX_BUILD)
# GFORTRAN internals documentation.
doc/gfc-internals/info/texinfo/gfc-internals.info: $(SPHINX_FILES)
+ if [ x$(SPHINX_BUILD) = xsphinx-build ]; then \
make -C $(srcdir)/../doc info SOURCEDIR=$(abs_srcdir)/fortran/doc/gfc-internals BUILDDIR=$(objdir)/doc/gfc-internals/info; \
+ if [ x$(HAS_SPHINX_BUILD) = xhas-sphinx-build ]; then \
make -C $(srcdir)/../doc info SOURCEDIR=$(abs_srcdir)/fortran/doc/gfc-internals BUILDDIR=$(objdir)/doc/gfc-internals/info SPHINXBUILD=$(SPHINX_BUILD); \
else true; fi
doc/gfc-internals/pdf/latex/gfc-internals.pdf: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc latexpdf SOURCEDIR=$(abs_srcdir)/fortran/doc/gfc-internals BUILDDIR=$(objdir)/doc/gfc-internals/pdf
+ make -C $(srcdir)/../doc latexpdf SOURCEDIR=$(abs_srcdir)/fortran/doc/gfc-internals BUILDDIR=$(objdir)/doc/gfc-internals/pdf SPHINXBUILD=$(SPHINX_BUILD)
doc/gfc-internals/html/html/index.html: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc html SOURCEDIR=$(abs_srcdir)/fortran/doc/gfc-internals BUILDDIR=$(objdir)/doc/gfc-internals/html
+ make -C $(srcdir)/../doc html SOURCEDIR=$(abs_srcdir)/fortran/doc/gfc-internals BUILDDIR=$(objdir)/doc/gfc-internals/html SPHINXBUILD=$(SPHINX_BUILD)
# Create or recreate the gfortran private include file directory.
install-finclude-dir: installdirs

View File

@ -89,15 +89,15 @@ go1$(exeext): $(GO_OBJS) attribs.o $(BACKEND) $(LIBDEPS) $(go.prev)
# Documentation.
doc/gccgo/info/texinfo/gccgo.info: $(SPHINX_FILES)
+ if [ x$(SPHINX_BUILD) = xsphinx-build ]; then \
make -C $(srcdir)/../doc info SOURCEDIR=$(abs_srcdir)/go/doc/ BUILDDIR=$(objdir)/doc/gccgo/info; \
+ if [ x$(HAS_SPHINX_BUILD) = xhas-sphinx-build ]; then \
make -C $(srcdir)/../doc info SOURCEDIR=$(abs_srcdir)/go/doc/ BUILDDIR=$(objdir)/doc/gccgo/info SPHINXBUILD=$(SPHINX_BUILD); \
else true; fi
doc/gccgo/pdf/latex/gccgo.pdf: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc latexpdf SOURCEDIR=$(abs_srcdir)/go/doc/ BUILDDIR=$(objdir)/doc/gccgo/pdf
+ make -C $(srcdir)/../doc latexpdf SOURCEDIR=$(abs_srcdir)/go/doc/ BUILDDIR=$(objdir)/doc/gccgo/pdf SPHINXBUILD=$(SPHINX_BUILD)
doc/gccgo/html/html/index.html: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc html SOURCEDIR=$(abs_srcdir)/go/doc/ BUILDDIR=$(objdir)/doc/gccgo/html
+ make -C $(srcdir)/../doc html SOURCEDIR=$(abs_srcdir)/go/doc/ BUILDDIR=$(objdir)/doc/gccgo/html SPHINXBUILD=$(SPHINX_BUILD)
# Build hooks.
@ -126,7 +126,7 @@ go.srcman: doc/gccgo/man/man/gccgo.1
-cp -p $^ $(srcdir)/doc
doc/gccgo/man/man/gccgo.1: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc man SOURCEDIR=$(abs_srcdir)/go/doc BUILDDIR=$(objdir)/doc/gccgo/man
+ make -C $(srcdir)/../doc man SOURCEDIR=$(abs_srcdir)/go/doc BUILDDIR=$(objdir)/doc/gccgo/man SPHINXBUILD=$(SPHINX_BUILD)
lang_checks += check-go
lang_checks_parallelized += check-go

View File

@ -244,8 +244,8 @@ jit.install-pdf: jit.texinfo.install-pdf
jit.info: doc/libgccjit/info/texinfo/libgccjit.info
doc/libgccjit/info/texinfo/libgccjit.info: $(SPHINX_FILES)
+ if [ x$(SPHINX_BUILD) = xsphinx-build ]; then \
make -C $(srcdir)/../doc info SOURCEDIR=$(abs_srcdir)/jit/doc/ BUILDDIR=$(objdir)/doc/libgccjit/info; \
+ if [ x$(HAS_SPHINX_BUILD) = xhas-sphinx-build ]; then \
make -C $(srcdir)/../doc info SOURCEDIR=$(abs_srcdir)/jit/doc/ BUILDDIR=$(objdir)/doc/libgccjit/info SPHINXBUILD=$(SPHINX_BUILD); \
else true; fi
jit.install-info: $(DESTDIR)$(infodir)/libgccjit.info
@ -255,7 +255,7 @@ $(DESTDIR)$(infodir)/libgccjit.info: doc/libgccjit/info/texinfo/libgccjit.info i
-$(INSTALL_DATA) $< $@
doc/libgccjit/html/html/index.html: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc html SOURCEDIR=$(abs_srcdir)/jit/doc/ BUILDDIR=$(objdir)/doc/libgccjit/html
+ make -C $(srcdir)/../doc html SOURCEDIR=$(abs_srcdir)/jit/doc/ BUILDDIR=$(objdir)/doc/libgccjit/html SPHINXBUILD=$(SPHINX_BUILD)
jit.texinfo.install-html: doc/libgccjit/html/html/index.html
@$(NORMAL_INSTALL)
@ -276,7 +276,7 @@ jit.texinfo.install-html: doc/libgccjit/html/html/index.html
doc/libgccjit/pdf/latex/libgccjit.pdf: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc latexpdf SOURCEDIR=$(abs_srcdir)/jit/doc/ BUILDDIR=$(objdir)/doc/libgccjit/pdf
+ make -C $(srcdir)/../doc latexpdf SOURCEDIR=$(abs_srcdir)/jit/doc/ BUILDDIR=$(objdir)/doc/libgccjit/pdf SPHINXBUILD=$(SPHINX_BUILD)
jit.texinfo.install-pdf: doc/libgccjit.pdf
@$(NORMAL_INSTALL)
@ -295,7 +295,7 @@ SPHINX_BUILD_DIR=jit/sphinx-build
jit.sphinx.html:
$(mkinstalldirs) $(SPHINX_BUILD_DIR)
(cd $(srcdir)/jit/docs && \
make html BUILDDIR=$(PWD)/$(SPHINX_BUILD_DIR) )
make html BUILDDIR=$(PWD)/$(SPHINX_BUILD_DIR) ) SPHINXBUILD=$(SPHINX_BUILD)
jit_htmldir=$(htmldir)/jit
@ -316,7 +316,7 @@ jit.sphinx.pdf: $(SPHINX_BUILD_DIR)/latex/libgccjit.pdf
$(SPHINX_BUILD_DIR)/latex/libgccjit.pdf:
$(mkinstalldirs) $(SPHINX_BUILD_DIR)
(cd $(srcdir)/jit/docs && \
make latexpdf BUILDDIR=$(PWD)/$(SPHINX_BUILD_DIR) )
make latexpdf BUILDDIR=$(PWD)/$(SPHINX_BUILD_DIR) ) SPHINXBUILD=$(SPHINX_BUILD)
jit.sphinx.install-pdf: $(SPHINX_BUILD_DIR)/latex/libgccjit.pdf
@$(NORMAL_INSTALL)
@ -336,7 +336,7 @@ jit.tags:
jit.man: doc/libgccjit/man/man/libgccjit.1
doc/libgccjit/man/man/libgccjit.1: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc man SOURCEDIR=$(abs_srcdir)/jit/doc/ BUILDDIR=$(objdir)/doc/libgccjit/man
+ make -C $(srcdir)/../doc man SOURCEDIR=$(abs_srcdir)/jit/doc/ BUILDDIR=$(objdir)/doc/libgccjit/man SPHINXBUILD=$(SPHINX_BUILD)
jit.srcman:

View File

@ -400,6 +400,7 @@ SECTION_LDFLAGS = @SECTION_LDFLAGS@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SPHINX_BUILD = @SPHINX_BUILD@
STRIP = @STRIP@
VERSION = @VERSION@
XCFLAGS = @XCFLAGS@
@ -793,10 +794,10 @@ distclean-libtool:
-rm -f libtool config.lt
doc/pdf/latex/libgomp.pdf: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc latexpdf SOURCEDIR=$(abs_srcdir)/doc BUILDDIR=$(abs_doc_builddir)/pdf
+ make -C $(srcdir)/../doc latexpdf SOURCEDIR=$(abs_srcdir)/doc BUILDDIR=$(abs_doc_builddir)/pdf SPHINXBUILD=$(SPHINX_BUILD)
doc/html/html/index.html: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc html SOURCEDIR=$(abs_srcdir)/doc BUILDDIR=$(abs_doc_builddir)/html
+ make -C $(srcdir)/../doc html SOURCEDIR=$(abs_srcdir)/doc BUILDDIR=$(abs_doc_builddir)/html SPHINXBUILD=$(SPHINX_BUILD)
uninstall-info-am:
@$(PRE_UNINSTALL)
@ -1303,7 +1304,7 @@ stamp-geninsrc: doc/info/texinfo/libgomp.info
@touch $@
doc/info/texinfo/libgomp.info: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc info SOURCEDIR=$(abs_srcdir)/doc BUILDDIR=$(abs_doc_builddir)/info
+ make -C $(srcdir)/../doc info SOURCEDIR=$(abs_srcdir)/doc BUILDDIR=$(abs_doc_builddir)/info SPHINXBUILD=$(SPHINX_BUILD)
# target overrides
-include $(tmake_file)

56
libgomp/configure vendored
View File

@ -635,6 +635,9 @@ am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
get_gcc_base_ver
HAS_SPHINX_BUILD
SPHINX_BUILD
CONFIGURE_SPHINX_BUILD
OMP_DEPEND_KIND
OMP_NEST_LOCK_25_KIND
OMP_LOCK_25_KIND
@ -826,6 +829,7 @@ enable_linux_futex
enable_tls
enable_symvers
enable_cet
with_sphinx_build
with_gcc_major_version_only
'
ac_precious_vars='build_alias
@ -1494,6 +1498,7 @@ Optional Packages:
--with-pic try to use only PIC/non-PIC objects [default=use
both]
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sphinx-build= Use sphinx-build from a given path
--with-gcc-major-version-only
use only GCC major number in filesystem paths
@ -11418,7 +11423,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11421 "configure"
#line 11426 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -11524,7 +11529,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11527 "configure"
#line 11532 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -16872,6 +16877,53 @@ fi
CFLAGS="$save_CFLAGS"
# Check whether --with-sphinx-build was given.
if test "${with_sphinx_build+set}" = set; then :
withval=$with_sphinx_build; CONFIGURE_SPHINX_BUILD=$withval
else
CONFIGURE_SPHINX_BUILD=
fi
# See if sphinx-build has been installed and is modern enough
# that we can use it.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sphinx-build" >&5
$as_echo_n "checking for sphinx-build... " >&6; }
sphinx=sphinx-build
if test x${CONFIGURE_SPHINX_BUILD} != x ; then
sphinx=${CONFIGURE_SPHINX_BUILD}
fi
tempdir=build.$$
source=source.$$
mkdir $source
grep 'needs_sphinx =' ${srcdir}/../doc/baseconf.py > $source/conf.py
touch $source/index.rst
if ${sphinx} $source $tempdir >/dev/null 2>&1; then
SPHINX_BUILD=${sphinx}
HAS_SPHINX_BUILD=has-sphinx-build
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
*** sphinx-build is missing or too old.
*** Info and man pages documentation will not be built." >&5
$as_echo "$as_me: WARNING:
*** sphinx-build is missing or too old.
*** Info and man pages documentation will not be built." >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
SPHINX_BUILD=
HAS_SPHINX_BUILD=
fi
rm -rf $tempdir
rm -rf $source
# Determine what GCC version number to use in filesystem paths.
get_gcc_base_ver="cat"

View File

@ -469,6 +469,44 @@ AC_SUBST(OMP_NEST_LOCK_25_KIND)
AC_SUBST(OMP_DEPEND_KIND)
CFLAGS="$save_CFLAGS"
AC_ARG_WITH(sphinx-build,
[AS_HELP_STRING([--with-sphinx-build=],
[Use sphinx-build from a given path])],
[CONFIGURE_SPHINX_BUILD=$withval],
[CONFIGURE_SPHINX_BUILD=]
)
AC_SUBST(CONFIGURE_SPHINX_BUILD)
# See if sphinx-build has been installed and is modern enough
# that we can use it.
AC_MSG_CHECKING([for sphinx-build])
sphinx=sphinx-build
if test x${CONFIGURE_SPHINX_BUILD} != x ; then
sphinx=${CONFIGURE_SPHINX_BUILD}
fi
tempdir=build.$$
source=source.$$
mkdir $source
grep 'needs_sphinx =' ${srcdir}/../doc/baseconf.py > $source/conf.py
touch $source/index.rst
if ${sphinx} $source $tempdir >/dev/null 2>&1; then
SPHINX_BUILD=${sphinx}
HAS_SPHINX_BUILD=has-sphinx-build
AC_MSG_RESULT(yes)
else
AC_MSG_WARN([
*** sphinx-build is missing or too old.
*** Info and man pages documentation will not be built.])
AC_MSG_RESULT(no)
SPHINX_BUILD=
HAS_SPHINX_BUILD=
fi
rm -rf $tempdir
rm -rf $source
AC_SUBST(SPHINX_BUILD)
AC_SUBST(HAS_SPHINX_BUILD)
# Determine what GCC version number to use in filesystem paths.
GCC_BASE_VER

View File

@ -73,6 +73,10 @@ TESTLIB = ./testlib.a
LIBOBJS = @LIBOBJS@
# Control whether manpages generated by sphinx-build can be rebuilt.
SPHINX_BUILD = @SPHINX_BUILD@
HAS_SPHINX_BUILD = @HAS_SPHINX_BUILD@
# A configuration can specify extra .o files that should be included,
# even if they are in libc. (Perhaps the libc version is buggy.)
EXTRA_OFILES =
@ -353,13 +357,13 @@ SPHINX_CONFIG_FILES:=$(srcdir)/doc/conf.py $(srcdir)/../doc/baseconf.py
SPHINX_FILES:=$(RST_FILES) $(SPHINX_CONFIG_FILES)
doc/texinfo/libiberty.info: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc info SOURCEDIR=$(abs_docdir) BUILDDIR=$(abs_doc_builddir)/info
+ make -C $(srcdir)/../doc info SOURCEDIR=$(abs_docdir) BUILDDIR=$(abs_doc_builddir)/info SPHINXBUILD=$(SPHINX_BUILD)
doc/pdf/latex/libiberty.pdf: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc latexpdf SOURCEDIR=$(abs_docdir) BUILDDIR=$(abs_doc_builddir)/pdf
+ make -C $(srcdir)/../doc latexpdf SOURCEDIR=$(abs_docdir) BUILDDIR=$(abs_doc_builddir)/pdf SPHINXBUILD=$(SPHINX_BUILD)
doc/html/html/index.html: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc html SOURCEDIR=$(abs_docdir) BUILDDIR=$(abs_doc_builddir)/html
+ make -C $(srcdir)/../doc html SOURCEDIR=$(abs_docdir) BUILDDIR=$(abs_doc_builddir)/html SPHINXBUILD=$(SPHINX_BUILD)
@MAINT@$(srcdir)/functions.texi : stamp-functions
@MAINT@ @true

52
libiberty/configure vendored
View File

@ -663,6 +663,9 @@ ETAGS
NOTMAINT
MAINT
libiberty_topdir
HAS_SPHINX_BUILD
SPHINX_BUILD
CONFIGURE_SPHINX_BUILD
target_alias
host_alias
build_alias
@ -708,6 +711,7 @@ with_target_subdir
with_build_subdir
with_cross_host
with_newlib
with_sphinx_build
enable_maintainer_mode
enable_multilib
enable_install_libiberty
@ -1349,6 +1353,7 @@ Optional Packages:
--with-build-subdir=SUBDIR Configuring in a subdirectory for build
--with-cross-host=HOST Configuring with a cross compiler
--with-newlib Configuring with newlib
--with-sphinx-build= Use sphinx-build from a given path
Some influential environment variables:
CC C compiler command
@ -2491,6 +2496,53 @@ if test "${with_newlib+set}" = set; then :
fi
# Check whether --with-sphinx-build was given.
if test "${with_sphinx_build+set}" = set; then :
withval=$with_sphinx_build; CONFIGURE_SPHINX_BUILD=$withval
else
CONFIGURE_SPHINX_BUILD=
fi
# See if sphinx-build has been installed and is modern enough
# that we can use it.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sphinx-build" >&5
$as_echo_n "checking for sphinx-build... " >&6; }
sphinx=sphinx-build
if test x${CONFIGURE_SPHINX_BUILD} != x ; then
sphinx=${CONFIGURE_SPHINX_BUILD}
fi
tempdir=build.$$
source=source.$$
mkdir $source
grep 'needs_sphinx =' ${srcdir}/../doc/baseconf.py > $source/conf.py
touch $source/index.rst
if ${sphinx} $source $tempdir >/dev/null 2>&1; then
SPHINX_BUILD=${sphinx}
HAS_SPHINX_BUILD=has-sphinx-build
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
*** sphinx-build is missing or too old.
*** Info and man pages documentation will not be built." >&5
$as_echo "$as_me: WARNING:
*** sphinx-build is missing or too old.
*** Info and man pages documentation will not be built." >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
SPHINX_BUILD=
HAS_SPHINX_BUILD=
fi
rm -rf $tempdir
rm -rf $source
if test "${srcdir}" = "."; then
if test -n "${with_build_subdir}"; then
libiberty_topdir="${srcdir}/../.."

View File

@ -20,6 +20,44 @@ AC_ARG_WITH(cross-host,
AC_ARG_WITH(newlib,
[ --with-newlib Configuring with newlib])
AC_ARG_WITH(sphinx-build,
[AS_HELP_STRING([--with-sphinx-build=],
[Use sphinx-build from a given path])],
[CONFIGURE_SPHINX_BUILD=$withval],
[CONFIGURE_SPHINX_BUILD=]
)
AC_SUBST(CONFIGURE_SPHINX_BUILD)
# See if sphinx-build has been installed and is modern enough
# that we can use it.
AC_MSG_CHECKING([for sphinx-build])
sphinx=sphinx-build
if test x${CONFIGURE_SPHINX_BUILD} != x ; then
sphinx=${CONFIGURE_SPHINX_BUILD}
fi
tempdir=build.$$
source=source.$$
mkdir $source
grep 'needs_sphinx =' ${srcdir}/../doc/baseconf.py > $source/conf.py
touch $source/index.rst
if ${sphinx} $source $tempdir >/dev/null 2>&1; then
SPHINX_BUILD=${sphinx}
HAS_SPHINX_BUILD=has-sphinx-build
AC_MSG_RESULT(yes)
else
AC_MSG_WARN([
*** sphinx-build is missing or too old.
*** Info and man pages documentation will not be built.])
AC_MSG_RESULT(no)
SPHINX_BUILD=
HAS_SPHINX_BUILD=
fi
rm -rf $tempdir
rm -rf $source
AC_SUBST(SPHINX_BUILD)
AC_SUBST(HAS_SPHINX_BUILD)
if test "${srcdir}" = "."; then
if test -n "${with_build_subdir}"; then
libiberty_topdir="${srcdir}/../.."

View File

@ -346,6 +346,7 @@ SECTION_LDFLAGS = @SECTION_LDFLAGS@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SPHINX_BUILD = @SPHINX_BUILD@
STRIP = @STRIP@
VERSION = @VERSION@
XCFLAGS = @XCFLAGS@
@ -642,10 +643,10 @@ distclean-libtool:
-rm -f libtool config.lt
doc/pdf/latex/libitm.pdf: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc latexpdf SOURCEDIR=$(abs_srcdir)/doc BUILDDIR=$(abs_doc_builddir)/pdf
+ make -C $(srcdir)/../doc latexpdf SOURCEDIR=$(abs_srcdir)/doc BUILDDIR=$(abs_doc_builddir)/pdf SPHINXBUILD=$(SPHINX_BUILD)
doc/html/html/index.html: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc html SOURCEDIR=$(abs_srcdir)/doc BUILDDIR=$(abs_doc_builddir)/html
+ make -C $(srcdir)/../doc html SOURCEDIR=$(abs_srcdir)/doc BUILDDIR=$(abs_doc_builddir)/html SPHINXBUILD=$(SPHINX_BUILD)
uninstall-html-am:
@$(NORMAL_UNINSTALL)
@ -1120,7 +1121,7 @@ stamp-geninsrc: doc/info/texinfo/libitm.info
@touch $@
doc/info/texinfo/libitm.info: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc info SOURCEDIR=$(abs_srcdir)/doc BUILDDIR=$(abs_doc_builddir)/info
+ make -C $(srcdir)/../doc info SOURCEDIR=$(abs_srcdir)/doc BUILDDIR=$(abs_doc_builddir)/info SPHINXBUILD=$(SPHINX_BUILD)
# GNU Make needs to see an explicit $(MAKE) variable in the command it
# runs to enable its job server during parallel builds. Hence the

56
libitm/configure vendored
View File

@ -633,6 +633,9 @@ am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
get_gcc_base_ver
HAS_SPHINX_BUILD
SPHINX_BUILD
CONFIGURE_SPHINX_BUILD
ARCH_FUTEX_FALSE
ARCH_FUTEX_TRUE
ARCH_X86_AVX_FALSE
@ -816,6 +819,7 @@ enable_tls
enable_symvers
enable_werror
enable_cet
with_sphinx_build
with_gcc_major_version_only
'
ac_precious_vars='build_alias
@ -1481,6 +1485,7 @@ Optional Packages:
--with-pic try to use only PIC/non-PIC objects [default=use
both]
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sphinx-build= Use sphinx-build from a given path
--with-gcc-major-version-only
use only GCC major number in filesystem paths
@ -12082,7 +12087,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 12085 "configure"
#line 12090 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -12188,7 +12193,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 12191 "configure"
#line 12196 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -18050,6 +18055,53 @@ else
fi
# Check whether --with-sphinx-build was given.
if test "${with_sphinx_build+set}" = set; then :
withval=$with_sphinx_build; CONFIGURE_SPHINX_BUILD=$withval
else
CONFIGURE_SPHINX_BUILD=
fi
# See if sphinx-build has been installed and is modern enough
# that we can use it.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sphinx-build" >&5
$as_echo_n "checking for sphinx-build... " >&6; }
sphinx=sphinx-build
if test x${CONFIGURE_SPHINX_BUILD} != x ; then
sphinx=${CONFIGURE_SPHINX_BUILD}
fi
tempdir=build.$$
source=source.$$
mkdir $source
grep 'needs_sphinx =' ${srcdir}/../doc/baseconf.py > $source/conf.py
touch $source/index.rst
if ${sphinx} $source $tempdir >/dev/null 2>&1; then
SPHINX_BUILD=${sphinx}
HAS_SPHINX_BUILD=has-sphinx-build
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
*** sphinx-build is missing or too old.
*** Info and man pages documentation will not be built." >&5
$as_echo "$as_me: WARNING:
*** sphinx-build is missing or too old.
*** Info and man pages documentation will not be built." >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
SPHINX_BUILD=
HAS_SPHINX_BUILD=
fi
rm -rf $tempdir
rm -rf $source
# Determine what GCC version number to use in filesystem paths.
get_gcc_base_ver="cat"

View File

@ -301,6 +301,44 @@ AM_CONDITIONAL([ARCH_X86], [test "$ARCH" = x86])
AM_CONDITIONAL([ARCH_X86_AVX], [test "$libitm_cv_as_avx" = yes])
AM_CONDITIONAL([ARCH_FUTEX], [test $enable_linux_futex = yes])
AC_ARG_WITH(sphinx-build,
[AS_HELP_STRING([--with-sphinx-build=],
[Use sphinx-build from a given path])],
[CONFIGURE_SPHINX_BUILD=$withval],
[CONFIGURE_SPHINX_BUILD=]
)
AC_SUBST(CONFIGURE_SPHINX_BUILD)
# See if sphinx-build has been installed and is modern enough
# that we can use it.
AC_MSG_CHECKING([for sphinx-build])
sphinx=sphinx-build
if test x${CONFIGURE_SPHINX_BUILD} != x ; then
sphinx=${CONFIGURE_SPHINX_BUILD}
fi
tempdir=build.$$
source=source.$$
mkdir $source
grep 'needs_sphinx =' ${srcdir}/../doc/baseconf.py > $source/conf.py
touch $source/index.rst
if ${sphinx} $source $tempdir >/dev/null 2>&1; then
SPHINX_BUILD=${sphinx}
HAS_SPHINX_BUILD=has-sphinx-build
AC_MSG_RESULT(yes)
else
AC_MSG_WARN([
*** sphinx-build is missing or too old.
*** Info and man pages documentation will not be built.])
AC_MSG_RESULT(no)
SPHINX_BUILD=
HAS_SPHINX_BUILD=
fi
rm -rf $tempdir
rm -rf $source
AC_SUBST(SPHINX_BUILD)
AC_SUBST(HAS_SPHINX_BUILD)
# Determine what GCC version number to use in filesystem paths.
GCC_BASE_VER

View File

@ -346,6 +346,7 @@ REPORT_BUGS_TO = @REPORT_BUGS_TO@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SPHINX_BUILD = @SPHINX_BUILD@
STRIP = @STRIP@
VERSION = @VERSION@
XCFLAGS = @XCFLAGS@
@ -950,10 +951,10 @@ distclean-libtool:
-rm -f libtool config.lt
doc/pdf/latex/libquadmath.pdf: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc latexpdf SOURCEDIR=$(abs_srcdir)/doc BUILDDIR=$(abs_doc_builddir)/pdf
+ make -C $(srcdir)/../doc latexpdf SOURCEDIR=$(abs_srcdir)/doc BUILDDIR=$(abs_doc_builddir)/pdf SPHINXBUILD=$(SPHINX_BUILD)
doc/html/html/index.html: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc html SOURCEDIR=$(abs_srcdir)/doc BUILDDIR=$(abs_doc_builddir)/html
+ make -C $(srcdir)/../doc html SOURCEDIR=$(abs_srcdir)/doc BUILDDIR=$(abs_doc_builddir)/html SPHINXBUILD=$(SPHINX_BUILD)
uninstall-html-am:
@$(NORMAL_UNINSTALL)
@ -1373,7 +1374,7 @@ SPHINX_FILES:=$(RST_FILES) $(SPHINX_CONFIG_FILES)
export BUGURL=$(REPORT_BUGS_TO)
doc/info/texinfo/libquadmath.info: $(SPHINX_FILES)
+ make -C $(srcdir)/../doc info SOURCEDIR=$(abs_srcdir)/doc BUILDDIR=$(abs_doc_builddir)/info
+ make -C $(srcdir)/../doc info SOURCEDIR=$(abs_srcdir)/doc BUILDDIR=$(abs_doc_builddir)/info SPHINXBUILD=$(SPHINX_BUILD)
# GNU Make needs to see an explicit $(MAKE) variable in the command it
# runs to enable its job server during parallel builds. Hence the

58
libquadmath/configure vendored
View File

@ -633,6 +633,9 @@ am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
get_gcc_base_ver
HAS_SPHINX_BUILD
SPHINX_BUILD
CONFIGURE_SPHINX_BUILD
GENINSRC_FALSE
GENINSRC_TRUE
XCFLAGS
@ -790,6 +793,7 @@ with_toolexeclibdir
enable_symvers
enable_cet
enable_generated_files_in_srcdir
with_sphinx_build
with_gcc_major_version_only
'
ac_precious_vars='build_alias
@ -1455,6 +1459,7 @@ Optional Packages:
--with-toolexeclibdir=DIR
install libraries built with a cross compiler within
DIR
--with-sphinx-build= Use sphinx-build from a given path
--with-gcc-major-version-only
use only GCC major number in filesystem paths
@ -4693,7 +4698,7 @@ fi
REPORT_BUGS_TEXI=
;;
*)
REPORT_BUGS_TO="<$BUGURL>"
REPORT_BUGS_TO="$BUGURL"
REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
;;
esac;
@ -10830,7 +10835,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 10833 "configure"
#line 10838 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -10936,7 +10941,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 10939 "configure"
#line 10944 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -13267,6 +13272,53 @@ else
fi
# Check whether --with-sphinx-build was given.
if test "${with_sphinx_build+set}" = set; then :
withval=$with_sphinx_build; CONFIGURE_SPHINX_BUILD=$withval
else
CONFIGURE_SPHINX_BUILD=
fi
# See if sphinx-build has been installed and is modern enough
# that we can use it.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sphinx-build" >&5
$as_echo_n "checking for sphinx-build... " >&6; }
sphinx=sphinx-build
if test x${CONFIGURE_SPHINX_BUILD} != x ; then
sphinx=${CONFIGURE_SPHINX_BUILD}
fi
tempdir=build.$$
source=source.$$
mkdir $source
grep 'needs_sphinx =' ${srcdir}/../doc/baseconf.py > $source/conf.py
touch $source/index.rst
if ${sphinx} $source $tempdir >/dev/null 2>&1; then
SPHINX_BUILD=${sphinx}
HAS_SPHINX_BUILD=has-sphinx-build
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
*** sphinx-build is missing or too old.
*** Info and man pages documentation will not be built." >&5
$as_echo "$as_me: WARNING:
*** sphinx-build is missing or too old.
*** Info and man pages documentation will not be built." >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
SPHINX_BUILD=
HAS_SPHINX_BUILD=
fi
rm -rf $tempdir
rm -rf $source
# Determine what GCC version number to use in filesystem paths.
get_gcc_base_ver="cat"

View File

@ -394,6 +394,44 @@ AS_HELP_STRING([--enable-generated-files-in-srcdir],
AC_MSG_RESULT($enable_generated_files_in_srcdir)
AM_CONDITIONAL(GENINSRC, test "$enable_generated_files_in_srcdir" = yes)
AC_ARG_WITH(sphinx-build,
[AS_HELP_STRING([--with-sphinx-build=],
[Use sphinx-build from a given path])],
[CONFIGURE_SPHINX_BUILD=$withval],
[CONFIGURE_SPHINX_BUILD=]
)
AC_SUBST(CONFIGURE_SPHINX_BUILD)
# See if sphinx-build has been installed and is modern enough
# that we can use it.
AC_MSG_CHECKING([for sphinx-build])
sphinx=sphinx-build
if test x${CONFIGURE_SPHINX_BUILD} != x ; then
sphinx=${CONFIGURE_SPHINX_BUILD}
fi
tempdir=build.$$
source=source.$$
mkdir $source
grep 'needs_sphinx =' ${srcdir}/../doc/baseconf.py > $source/conf.py
touch $source/index.rst
if ${sphinx} $source $tempdir >/dev/null 2>&1; then
SPHINX_BUILD=${sphinx}
HAS_SPHINX_BUILD=has-sphinx-build
AC_MSG_RESULT(yes)
else
AC_MSG_WARN([
*** sphinx-build is missing or too old.
*** Info and man pages documentation will not be built.])
AC_MSG_RESULT(no)
SPHINX_BUILD=
HAS_SPHINX_BUILD=
fi
rm -rf $tempdir
rm -rf $source
AC_SUBST(SPHINX_BUILD)
AC_SUBST(HAS_SPHINX_BUILD)
# Determine what GCC version number to use in filesystem paths.
GCC_BASE_VER