Added 'make check' target to docs.

This commit is contained in:
Daniele Varrazzo 2010-02-14 05:01:00 +00:00
parent edc690e60a
commit 47809c338f

View File

@ -7,6 +7,9 @@ SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
# DSN for the doctest database
PSYCOPG2_DSN="user=postgres dbname=test"
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
@ -16,6 +19,8 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
doc: html
check: doctest
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@ -87,6 +92,7 @@ linkcheck:
"or in $(BUILDDIR)/linkcheck/output.txt."
doctest:
PSYCOPG2_DSN=$(PSYCOPG2_DSN) \
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."