diff options
author | Martin Liska <mliska@suse.cz> | 2022-07-27 15:40:48 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2022-11-09 09:00:36 +0100 |
commit | 1f5a932e89b0c2c4a7af7f849ca2e2e3dbf329e0 (patch) | |
tree | 019685ef4fc6e3a8615d4a67ccaf7fa41937df98 /libiberty | |
parent | c0eb1a3b7c944dd7cd5a4056a817a25aa8ce2569 (diff) | |
download | gcc-1f5a932e89b0c2c4a7af7f849ca2e2e3dbf329e0.zip gcc-1f5a932e89b0c2c4a7af7f849ca2e2e3dbf329e0.tar.gz gcc-1f5a932e89b0c2c4a7af7f849ca2e2e3dbf329e0.tar.bz2 |
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.
Diffstat (limited to 'libiberty')
-rw-r--r-- | libiberty/Makefile.in | 10 | ||||
-rwxr-xr-x | libiberty/configure | 52 | ||||
-rw-r--r-- | libiberty/configure.ac | 38 |
3 files changed, 97 insertions, 3 deletions
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in index dfd5f75..d2156ba 100644 --- a/libiberty/Makefile.in +++ b/libiberty/Makefile.in @@ -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 diff --git a/libiberty/configure b/libiberty/configure index 860f981fa..7ee5d60 100755 --- a/libiberty/configure +++ b/libiberty/configure @@ -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}/../.." diff --git a/libiberty/configure.ac b/libiberty/configure.ac index 28d996f..b2cfef9 100644 --- a/libiberty/configure.ac +++ b/libiberty/configure.ac @@ -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}/../.." |