55SPHINXOPTS =
66SPHINXBUILD = sphinx-build
77PAPER =
8- BUILDDIR = build
8+ BUILDDIR = _build
9+ CURBRANCH = master
10+ PYTHONPATH = $(PWD )
911
1012# User-friendly check for sphinx-build
1113ifeq ($(shell which $(SPHINXBUILD ) >/dev/null 2>&1; echo $$? ) , 1)
@@ -15,11 +17,11 @@ endif
1517# Internal variables.
1618PAPEROPT_a4 = -D latex_paper_size=a4
1719PAPEROPT_letter = -D latex_paper_size=letter
18- ALLSPHINXOPTS = -d $(BUILDDIR ) /doctrees $(PAPEROPT_$(PAPER ) ) $(SPHINXOPTS ) source
20+ ALLSPHINXOPTS = -d $(BUILDDIR ) /doctrees $(PAPEROPT_$(PAPER ) ) $(SPHINXOPTS ) .
1921# the i18n builder cannot share the environment and doctrees with the others
20- I18NSPHINXOPTS = $(PAPEROPT_$(PAPER ) ) $(SPHINXOPTS ) source
22+ I18NSPHINXOPTS = $(PAPEROPT_$(PAPER ) ) $(SPHINXOPTS ) .
2123
22- .PHONY : help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext
24+ .PHONY : help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
2325
2426help :
2527 @echo " Please use \` make <target>' where <target> is one of"
3032 @echo " json to make JSON files"
3133 @echo " htmlhelp to make HTML files and a HTML help project"
3234 @echo " qthelp to make HTML files and a qthelp project"
33- @echo " applehelp to make an Apple Help Book"
3435 @echo " devhelp to make HTML files and a Devhelp project"
3536 @echo " epub to make an epub"
3637 @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@@ -46,13 +47,16 @@ help:
4647 @echo " pseudoxml to make pseudoxml-XML files for display purposes"
4748 @echo " linkcheck to check all external links for integrity"
4849 @echo " doctest to run all doctests embedded in the documentation (if enabled)"
49- @echo " coverage to run coverage check of the documentation (if enabled) "
50+
5051
5152clean :
5253 rm -rf $(BUILDDIR ) /*
54+ rm -rf reference/*
55+ rm -rf docs/api
5356
5457html :
55- $(SPHINXBUILD ) -b html $(ALLSPHINXOPTS ) $(BUILDDIR ) /html
58+ mkdir -p _static _templates
59+ PYTHONPATH=$(PYTHONPATH ) $(SPHINXBUILD ) -b html $(ALLSPHINXOPTS ) $(BUILDDIR ) /html
5660 @echo
5761 @echo " Build finished. The HTML pages are in $( BUILDDIR) /html."
5862
@@ -87,25 +91,17 @@ qthelp:
8791 @echo
8892 @echo " Build finished; now you can run " qcollectiongenerator" with the" \
8993 " .qhcp project file in $( BUILDDIR) /qthelp, like this:"
90- @echo " # qcollectiongenerator $( BUILDDIR) /qthelp/Pype9 .qhcp"
94+ @echo " # qcollectiongenerator $( BUILDDIR) /qthelp/pydra .qhcp"
9195 @echo " To view the help file:"
92- @echo " # assistant -collectionFile $( BUILDDIR) /qthelp/Pype9.qhc"
93-
94- applehelp :
95- $(SPHINXBUILD ) -b applehelp $(ALLSPHINXOPTS ) $(BUILDDIR ) /applehelp
96- @echo
97- @echo " Build finished. The help book is in $( BUILDDIR) /applehelp."
98- @echo " N.B. You won't be able to view it unless you put it in" \
99- " ~/Library/Documentation/Help or install it in your application" \
100- " bundle."
96+ @echo " # assistant -collectionFile $( BUILDDIR) /qthelp/pydra.qhc"
10197
10298devhelp :
10399 $(SPHINXBUILD ) -b devhelp $(ALLSPHINXOPTS ) $(BUILDDIR ) /devhelp
104100 @echo
105101 @echo " Build finished."
106102 @echo " To view the help file:"
107- @echo " # mkdir -p $$ HOME/.local/share/devhelp/Pype9 "
108- @echo " # ln -s $( BUILDDIR) /devhelp $$ HOME/.local/share/devhelp/Pype9 "
103+ @echo " # mkdir -p $$ HOME/.local/share/devhelp/pydra "
104+ @echo " # ln -s $( BUILDDIR) /devhelp $$ HOME/.local/share/devhelp/pydra "
109105 @echo " # devhelp"
110106
111107epub :
@@ -176,11 +172,6 @@ doctest:
176172 @echo " Testing of doctests in the sources finished, look at the " \
177173 " results in $( BUILDDIR) /doctest/output.txt."
178174
179- coverage :
180- $(SPHINXBUILD ) -b coverage $(ALLSPHINXOPTS ) $(BUILDDIR ) /coverage
181- @echo " Testing of coverage in the sources finished, look at the " \
182- " results in $( BUILDDIR) /coverage/python.txt."
183-
184175xml :
185176 $(SPHINXBUILD ) -b xml $(ALLSPHINXOPTS ) $(BUILDDIR ) /xml
186177 @echo
@@ -190,3 +181,6 @@ pseudoxml:
190181 $(SPHINXBUILD ) -b pseudoxml $(ALLSPHINXOPTS ) $(BUILDDIR ) /pseudoxml
191182 @echo
192183 @echo " Build finished. The pseudo-XML files are in $( BUILDDIR) /pseudoxml."
184+
185+ versioned :
186+ PYTHONPATH=$(PYTHONPATH ) sphinx-versioning -vv -l ./docs/conf.py build -r $(CURBRANCH ) ./docs/ docs/$(BUILDDIR ) /html/
0 commit comments