Ticket #13484: django-sphinx.diff

File django-sphinx.diff, 4.5 KB (added by Alex, 5 years ago)
  • docs/Makefile

    diff --git a/docs/Makefile b/docs/Makefile
    index e9c11d0..b1dfa26 100644
    a b  
    55SPHINXOPTS    =
    66SPHINXBUILD   = sphinx-build
    77PAPER         =
     8BUILDDIR      = _build
    89
    910# Internal variables.
    1011PAPEROPT_a4     = -D latex_paper_size=a4
    1112PAPEROPT_letter = -D latex_paper_size=letter
    12 ALLSPHINXOPTS   = -d _build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
     13ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
    1314
    14 .PHONY: help clean html web pickle htmlhelp latex changes linkcheck
     15.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
    1516
    1617help:
    1718        @echo "Please use \`make <target>' where <target> is one of"
    1819        @echo "  html      to make standalone HTML files"
    19         @echo "  pickle    to make pickle files (usable by e.g. sphinx-web)"
     20        @echo "  dirhtml   to make HTML files named index.html in directories"
     21        @echo "  pickle    to make pickle files"
     22        @echo "  json      to make JSON files"
    2023        @echo "  htmlhelp  to make HTML files and a HTML help project"
     24        @echo "  qthelp    to make HTML files and a qthelp project"
    2125        @echo "  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
    22         @echo "  changes   to make an overview over all changed/added/deprecated items"
     26        @echo "  changes   to make an overview of all changed/added/deprecated items"
    2327        @echo "  linkcheck to check all external links for integrity"
     28        @echo "  doctest   to run all doctests embedded in the documentation (if enabled)"
    2429
    2530clean:
    26         -rm -rf _build/*
     31        -rm -rf $(BUILDDIR)/*
    2732
    2833html:
    29         mkdir -p _build/html _build/doctrees
    30         $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html
     34        $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
    3135        @echo
    32         @echo "Build finished. The HTML pages are in _build/html."
     36        @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
     37
     38dirhtml:
     39        $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
     40        @echo
     41        @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
    3342
    3443pickle:
    35         mkdir -p _build/pickle _build/doctrees
    36         $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) _build/pickle
     44        $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
    3745        @echo
    38         @echo "Build finished; now you can process the pickle files or run"
    39         @echo "  sphinx-web _build/pickle"
    40         @echo "to start the sphinx-web server."
     46        @echo "Build finished; now you can process the pickle files."
    4147
    42 web: pickle
     48json:
     49        $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
     50        @echo
     51        @echo "Build finished; now you can process the JSON files."
    4352
    4453htmlhelp:
    45         mkdir -p _build/htmlhelp _build/doctrees
    46         $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp
     54        $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
    4755        @echo
    4856        @echo "Build finished; now you can run HTML Help Workshop with the" \
    49               ".hhp project file in _build/htmlhelp."
     57              ".hhp project file in $(BUILDDIR)/htmlhelp."
     58
     59qthelp:
     60        $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
     61        @echo
     62        @echo "Build finished; now you can run "qcollectiongenerator" with the" \
     63              ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
     64        @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/django.qhcp"
     65        @echo "To view the help file:"
     66        @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/django.qhc"
    5067
    5168latex:
    52         mkdir -p _build/latex _build/doctrees
    53         $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex
     69        $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
    5470        @echo
    55         @echo "Build finished; the LaTeX files are in _build/latex."
     71        @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
    5672        @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
    5773              "run these through (pdf)latex."
    5874
    5975changes:
    60         mkdir -p _build/changes _build/doctrees
    61         $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) _build/changes
     76        $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
    6277        @echo
    63         @echo "The overview file is in _build/changes."
     78        @echo "The overview file is in $(BUILDDIR)/changes."
    6479
    6580linkcheck:
    66         mkdir -p _build/linkcheck _build/doctrees
    67         $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck
     81        $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
    6882        @echo
    6983        @echo "Link check complete; look for any errors in the above output " \
    70               "or in _build/linkcheck/output.txt."
     84              "or in $(BUILDDIR)/linkcheck/output.txt."
     85
     86doctest:
     87        $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
     88        @echo "Testing of doctests in the sources finished, look at the " \
     89              "results in $(BUILDDIR)/doctest/output.txt."
Back to Top