summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Nitka <niteria@gmail.com>2015-10-24 02:12:16 +0200
committerBen Gamari <ben@smart-cactus.org>2015-10-24 02:12:16 +0200
commit4e40340318f8e35a81cc3281b188f2ebac1b531d (patch)
tree261a3f763259c166955565286c8d50eaba8e2bbc
parent2866dfbb5a0eae677f57180cf8fbdb1265e195b8 (diff)
downloadhaskell-4e40340318f8e35a81cc3281b188f2ebac1b531d.tar.gz
Support more sphinx-build versions in configure script
`sphinx-build` on CentOS (`python-sphinx10-doc-1.0.8-1.el6.centos.noarch`) responds with this on `stderr`: ``` $ sphinx-1.0-build --version Sphinx v1.0.8 Usage: /usr/bin/sphinx-1.0-build [options] sourcedir outdir [filenames...] Options: -b <builder> -- builder to use; default is html -a -- write all files; default is to only write new and changed files ... Modi: * without -a and without filenames, write new and changed files. * with -a, write all files. * with filenames, write these. ``` This should make it work for the old and the new format. Test Plan: ``` $ echo "Sphinx (sphinx-build) 1.0.1" | sed 's/Sphinx\( (sphinx-build)\)\? v\?\([0-9]\.[0-9]\.[0-9]\)/\2/' 1.0.1 $ echo "Sphinx v1.0.1" | sed 's/Sphinx\( (sphinx-build)\)\? v\?\([0-9]\.[0-9]\.[0-9]\)/\2/' 1.0.1 ``` Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie, erikd Differential Revision: https://phabricator.haskell.org/D1361
-rw-r--r--configure.ac2
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 925846a3a9..dabcbcd78a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -775,7 +775,7 @@ AC_PATH_PROG(SPHINXBUILD,sphinx-build)
AC_CACHE_CHECK([for version of sphinx-build], sphinx_version,
changequote(, )dnl
[if test -n "$SPHINXBUILD"; then
- sphinx_version=`"$SPHINXBUILD" --version | sed 's/Sphinx (sphinx-build) \([0-9]\.[0-9]\.[0-9]\)/\1/'`;
+ sphinx_version=`"$SPHINXBUILD" --version 2>&1 | sed 's/Sphinx\( (sphinx-build)\)\? v\?\([0-9]\.[0-9]\.[0-9]\)/\2/' | head -n1`;
fi;
changequote([, ])dnl
])