Skip to contentSkip to conversation

infiniband-diags: fix rst2man when using upstream docutils

PATCH New [email protected] 1 participant 1 message Mar 18, 2013 InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 infiniband-diags: fix rst2man when using upstream docutils

The upstream docutils package does not install "rst2man". Instead the executable is "rst2man.py". Check for both options before giving up.

---
 configure.in |    3 +++
 doc/generate |   16 +++++++++++++---
 2 files changed, 16 insertions(+), 3 deletions(-)
configure.in +3 -0
index edac1e3..a85d2ed 100644
@@ -181,6 +181,9 @@ dnl Generate doc/man/*.in files if possible
 DOC_DATE="`date +%Y-%m-%d`"
 AC_SUBST(BUILD_DATE)
 AC_CHECK_PROG(have_rst2man, rst2man, "yes")
+if test x$have_rst2man != xyes; then
+AC_CHECK_PROG(have_rst2man, rst2man.py, "yes")
+fi
 if test x$have_rst2man == xyes; then
 	doc/generate
 else
doc/generate +13 -3
index 68a4cbd..816b66f 100755
@@ -5,12 +5,22 @@ mode=$1
 
 cd $docdir
 
+rst2man=""
+
+rc=`which rst2man &> /dev/null`
+if [ "$?" == "0" ]; then
+	rst2man="rst2man"
+fi
+rc=`which rst2man.py &> /dev/null`
+if [ "$?" == "0" ]; then
+	rst2man="rst2man.py"
+fi
+
 if [ "$mode" == "" ]; then
 	if [ ! -d man ]; then
 		mkdir man
 	fi
-	rc=`which rst2man &> /dev/null`
-	if [ "$?" != "0" ]; then
+	if [ "$rst2man" == "" ]; then
 		echo "could not generate man pages; 'rst2man not found'"
 		exit 1
 	fi
@@ -18,7 +28,7 @@ if [ "$mode" == "" ]; then
 		file=`basename $file`
 		target=`echo $file | sed -e 's/\(.*\).rst/\1/'`
 		echo "   creating man/$target ..."
-		rst2man rst/$file > man/$target
+		$rst2man rst/$file > man/$target
 	done
 elif [ "$mode" == "clean" ]; then
 	rm -f man/*
Signature · 6 lines
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html