fix documentation build

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@SSpaeth.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Nicolas Sebrecht 2011-02-17 18:57:15 +01:00
parent 45e0b233a5
commit 9482a37533
3 changed files with 5 additions and 3 deletions

View File

@ -19,6 +19,8 @@ Changes
Bug Fixes Bug Fixes
--------- ---------
* Fix documentation build.
Pending for the next major release Pending for the next major release
================================== ==================================

View File

@ -18,7 +18,7 @@
VERSION=4.0.16 VERSION=4.0.16
TARGZ=offlineimap_$(VERSION).tar.gz TARGZ=offlineimap_$(VERSION).tar.gz
SHELL=/bin/bash 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 all: build

View File

@ -5,8 +5,8 @@ SOURCES = $(wildcard *.rst)
HTML_TARGETS = $(patsubst %.rst,%.html,$(SOURCES)) HTML_TARGETS = $(patsubst %.rst,%.html,$(SOURCES))
RM = rm RM = rm
RST2HTML=`type rst2html 2>/dev/null && echo rst2html || echo rst2html.py` RST2HTML=`type rst2html 2>/dev/null 2>&1 && echo rst2html || echo rst2html.py`
RST2MAN=`type rst2man 2>/dev/null && echo rst2man || echo rst2man.py` RST2MAN=`type rst2man 2>/dev/null 2>&1 && echo rst2man || echo rst2man.py`
all: html all: html