[PATCH] fix documentation build

Nicolas Sebrecht nicolas.s-dev at laposte.net
Thu Feb 17 17:59:36 GMT 2011


On Thu, Feb 17, 2011 at 12:09:16PM +0100, Sebastian Spaeth wrote:

> still a bug in make docs that I only discovered today.
>
> our Makefile contains
>
> type rst2html 2>/dev/null && echo rst2html || echo rst2html.py
>
> which outputs on my box:
>
> rst2html is /usr/bin/rst2html
> rst2html
>
> which will break things. So either we need to suppres STDOUT too:
>
> type rst2html >/dev/null 2>&1 && echo rst2html || echo rst2html.py
>
> (which works), or we could use `which rst2html` (which returns 0 if the
> command exists) and outputs the proper path.

Reported-by: Sebastian Spaeth <Sebastian at SSpaeth.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev at laposte.net>
---
 Changelog.draft.rst |    2 ++
 Makefile            |    2 +-
 docs/Makefile       |    4 ++--
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/Changelog.draft.rst b/Changelog.draft.rst
index 8b599f9..fb5c3ff 100644
--- a/Changelog.draft.rst
+++ b/Changelog.draft.rst
@@ -19,6 +19,8 @@ Changes
 Bug Fixes
 ---------
 
+* Fix documentation build.
+
 
 Pending for the next major release
 ==================================
diff --git a/Makefile b/Makefile
index 20eebab..08c1a7a 100644
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,7 @@
 VERSION=4.0.16
 TARGZ=offlineimap_$(VERSION).tar.gz
 SHELL=/bin/bash
-RST2HTML=`type rst2html 2>/dev/null && echo rst2html || echo rst2html.py`
+RST2HTML=`type rst2html 2>/dev/null 2>&1 && echo rst2html || echo rst2html.py`
 
 all: build
 
diff --git a/docs/Makefile b/docs/Makefile
index fd1153e..fff639d 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -5,8 +5,8 @@ SOURCES = $(wildcard *.rst)
 HTML_TARGETS = $(patsubst %.rst,%.html,$(SOURCES))
 
 RM = rm
-RST2HTML=`type rst2html 2>/dev/null && echo rst2html || echo rst2html.py`
-RST2MAN=`type rst2man 2>/dev/null && echo rst2man || echo rst2man.py`
+RST2HTML=`type rst2html 2>/dev/null 2>&1 && echo rst2html || echo rst2html.py`
+RST2MAN=`type rst2man 2>/dev/null 2>&1 && echo rst2man || echo rst2man.py`
 
 all: html
 
-- 
1.7.4.30.gccfc03





More information about the OfflineIMAP-project mailing list