Skip to content

Commit 9101740

Browse files
committed
No docs without a properly installed sphinx (with modules).
The logic to install the dpc was missing a protection around the case where sphinx was installed but the modules required for OMPI were not. I slightly change the order of operations to ensure that we never try to install the docs if there were not available (aka not from a tarball) or not properly generated. Signed-off-by: George Bosilca <gbosilca@nvidia.com>
1 parent add67c2 commit 9101740

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

oac_setup_sphinx.m4

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ dnl -*- autoconf -*-
22
dnl
33
dnl Copyright (c) 2020-2022 Cisco Systems, Inc. All rights reserved.
44
dnl Copyright (c) 2024 Jeffrey M. Squyres. All rights reserved.
5+
dnl Copyright (c) 2025 NVIDIA Corporation. All rights reserved.
56
dnl
67
dnl $COPYRIGHT$
78
dnl
@@ -41,14 +42,9 @@ AC_DEFUN([OAC_SETUP_SPHINX],[
4142
[AS_HELP_STRING([--enable-sphinx],
4243
[Force configure to fail if Sphinx is not found (Sphinx is used to build the HTML docs and man pages). This option is likely only useful for developers; end users who are building from distribution tarballs do ***not*** need to have Sphinx installed])])
4344
44-
# Quick check to see if we have already-built docs (e.g., if we're
45-
# in a tarball vs. a fresh git clone).
46-
AC_MSG_CHECKING([if pre-built docs are available])
47-
AS_IF([test -f "$1"],
48-
[oac_install_docs=1
49-
AC_MSG_RESULT([yes])],
50-
[oac_install_docs=0
51-
AC_MSG_RESULT([no])])
45+
# By default assume we don't have to install. We'll update as we find
46+
# either a sane building environment or pre-built documentation (from a tarball).
47+
oac_install_docs=0
5248
5349
# To generate HTML docs + man pages, we need Sphinx. If we have
5450
# Sphinx, then we're able to both build and install the docs
@@ -138,6 +134,7 @@ EOF
138134
AS_IF([test -z "$SPHINX_BUILD"],
139135
_oac_program_prefix[_MAKEDIST_DISABLE="$]_oac_program_prefix[_MAKEDIST_DISABLE Sphinx/Documentation"
140136
AC_MSG_NOTICE([Could not find a suitable sphinx-build on your system.])
137+
oac_install_docs=0
141138
AS_IF([test -n "$3"],
142139
[AC_MSG_NOTICE([If you want to build the documentation, ensure that the])
143140
AC_MSG_NOTICE([Python modules in $3])
@@ -146,6 +143,14 @@ EOF
146143
AC_MSG_NOTICE([You will not be able to build a distribution tarball.])
147144
])
148145
146+
# Check if we have already-built docs (e.g., if we're
147+
# in a tarball vs. a fresh git clone).
148+
AC_MSG_CHECKING([if pre-built docs are available])
149+
AS_IF([test -f "$1"],
150+
[oac_install_docs=1
151+
AC_MSG_RESULT([yes])],
152+
[AC_MSG_RESULT([no])])
153+
149154
AS_IF([test $oac_install_docs -eq 0],
150155
[AC_MSG_WARN([*** You will not have documentation installed.])
151156
AS_IF([test -n "$2"],

0 commit comments

Comments
 (0)