|
2 | 2 | # |
3 | 3 |
|
4 | 4 | # You can set these variables from the command line. |
5 | | -SPHINXOPTS = |
| 5 | +SPHINXOPTS = -W |
6 | 6 | SPHINXBUILD = sphinx-build |
7 | 7 | PAPER = |
8 | 8 | BUILDDIR = _build |
| 9 | +VERSIONS = master,bethania |
| 10 | +MAIN_REF = bethania |
9 | 11 |
|
10 | 12 | # User-friendly check for sphinx-build |
11 | 13 | ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) |
|
53 | 55 | @echo " doctest to run all doctests embedded in the documentation (if enabled)" |
54 | 56 | @echo " coverage to run coverage check of the documentation (if enabled)" |
55 | 57 | @echo " dummy to check syntax errors of document sources" |
| 58 | + @echo " versions to make all docs HTML files" |
| 59 | + |
| 60 | +.PHONY: versions |
| 61 | +versions: |
| 62 | + rm python-openflow -rf && mkdir python-openflow |
| 63 | + for version in `echo $(VERSIONS) | sed 's/,/ /g'`; do \ |
| 64 | + git checkout $$version \ |
| 65 | + && make SPHINXOPTS="-A versions=\"$(VERSIONS)\" -A current_version=\"$$version\"" \ |
| 66 | + && mv _build/dirhtml python-openflow/$$version; \ |
| 67 | + done |
| 68 | + cp python-openflow/$(MAIN_REF)/* python-openflow/ -R |
56 | 69 |
|
57 | 70 | .PHONY: clean |
58 | 71 | clean: |
|
61 | 74 |
|
62 | 75 | .PHONY: html |
63 | 76 | html: |
64 | | - sphinx-apidoc -o . ../pyof/ -d10 -M |
| 77 | + sphinx-apidoc -o . ../pyof/ -d10 -M -T |
65 | 78 | sed -i "/Submodules/,+1d" *.rst |
66 | 79 | sed -i "/Subpackages/,+1d" *.rst |
67 | 80 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html |
|
70 | 83 |
|
71 | 84 | .PHONY: dirhtml |
72 | 85 | dirhtml: |
73 | | - sphinx-apidoc -o . ../pyof/ -d10 -M |
| 86 | + sphinx-apidoc -o . ../pyof/ -d10 -M -T |
74 | 87 | sed -i "/Submodules/,+1d" *.rst |
75 | 88 | sed -i "/Subpackages/,+1d" *.rst |
76 | 89 | $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml |
@@ -242,7 +255,7 @@ dummy: |
242 | 255 | @echo "Build finished. Dummy builder generates no files." |
243 | 256 |
|
244 | 257 | livehtml: |
245 | | - sphinx-apidoc -o . ../pyof/ -d10 -M |
| 258 | + sphinx-apidoc -o . ../pyof/ -d10 -M -T |
246 | 259 | sed -i "/Submodules/,+1d" *.rst |
247 | 260 | sed -i "/Subpackages/,+1d" *.rst |
248 | 261 | sphinx-autobuild -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml -z ../pyof |
|
0 commit comments