1
0
mirror of https://github.com/OfflineIMAP/offlineimap.git synced 2024-07-25 11:57:34 +02:00
offlineimap/docs/Makefile
Nicolas Sebrecht c8b8e26735 Makefile: fix docutils commands call if extension is stripped
Looks like some distribution strip the extensions of the python commands and
some don't. Try to find the correct commands by ourself.

Reported-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Reviewed-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2011-01-28 19:39:19 +01:00

27 lines
643 B
Makefile

# This program is free software under the terms of the GNU General Public
# License. See the COPYING file which must come with this package.
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`
all: html
html: $(HTML_TARGETS)
$(HTML_TARGETS): %.html : %.rst
$(RST2HTML) $? $@
man: offlineimap.1
offlineimap.1: MANUAL.rst
$(RST2MAN) MANUAL.rst offlineimap.1
cp -f offlineimap.1 ..
clean:
$(RM) -f $(HTML_TARGETS)
$(RM) -f offlineimap.1 ../offlineimap.1