Skip to content

opal_setup_sphinx.m4: make version check better #11016

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion config/opal_setup_sphinx.m4
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,21 @@ AC_DEFUN([OPAL_SETUP_SPHINX],[
# version.
AS_IF([test -n "$SPHINX_BUILD"],
[[sphinx_target_version=`sed -n -e 's/sphinx[><=]*\([0-9\.]\)/\1/p' $srcdir/docs/requirements.txt`]
sphinx_found_version=`$SPHINX_BUILD --version 2>&1 | cut -d\ -f2`
# Some older versions of Sphinx (e.g., Sphinx v1.1.3 in
# RHEL 7):
#
# - Don't support "--version".
# - But do emit the version number as part of the general
# CLI help when they don't recognize the --version CLI
# option.
#
# In that case, we only want the first line, and we want to
# strip off the leading "v" from the version number.
#
# In the case where --version *is* recognized, all the
# additional processing is harmless and we still end up
# with the Sphinx version number.
sphinx_found_version=`$SPHINX_BUILD --version 2>&1 | head -n 1 | cut -d\ -f2 | sed -e 's/^v//'`
AC_MSG_CHECKING([if Sphinx version is high enough ($sphinx_found_version >= $sphinx_target_version)])
AS_VERSION_COMPARE([$sphinx_found_version],
[$sphinx_target_version],
Expand Down