Merge branch 'ns/makefile-use-rst-commands-without-extension' into next

This commit is contained in:
Nicolas Sebrecht 2011-01-28 19:42:42 +01:00
commit 2e1983d5ef
3 changed files with 10 additions and 5 deletions

View File

@ -21,6 +21,8 @@ Changes
Bug Fixes Bug Fixes
--------- ---------
* Makefile: docutils: work whether python extension is stripped or not
Pending for the next major release Pending for the next major release
================================== ==================================

View File

@ -18,6 +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`
all: build all: build
@ -44,9 +45,9 @@ man:
doc: doc:
@$(MAKE) -C docs @$(MAKE) -C docs
rst2html.py README.rst readme.html $(RST2HTML) README.rst readme.html
rst2html.py SubmittingPatches.rst SubmittingPatches.html $(RST2HTML) SubmittingPatches.rst SubmittingPatches.html
rst2html.py Changelog.rst Changelog.html $(RST2HTML) Changelog.rst Changelog.html
targz: ../$(TARGZ) targz: ../$(TARGZ)
../$(TARGZ): ../$(TARGZ):

View File

@ -5,18 +5,20 @@ 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`
RST2MAN=`type rst2man 2>/dev/null && echo rst2man || echo rst2man.py`
all: html all: html
html: $(HTML_TARGETS) html: $(HTML_TARGETS)
$(HTML_TARGETS): %.html : %.rst $(HTML_TARGETS): %.html : %.rst
rst2html.py $? $@ $(RST2HTML) $? $@
man: offlineimap.1 man: offlineimap.1
offlineimap.1: MANUAL.rst offlineimap.1: MANUAL.rst
rst2man.py MANUAL.rst offlineimap.1 $(RST2MAN) MANUAL.rst offlineimap.1
cp -f offlineimap.1 .. cp -f offlineimap.1 ..
clean: clean: