Skip to content

Commit e48ea5e

Browse files
authored
make help (#5258)
* updated make help * Added livehtml and help * added whatsnew * review actions
1 parent c483352 commit e48ea5e

File tree

3 files changed

+46
-128
lines changed

3 files changed

+46
-128
lines changed

docs/Makefile

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,29 @@
11
SUBDIRS = src
22

3+
help:
4+
@for i in $(SUBDIRS); do \
5+
echo "make help in $$i..."; \
6+
(cd $$i; $(MAKE) $(MFLAGS) $(MYMAKEFLAGS) help); done
7+
38
html:
49
@for i in $(SUBDIRS); do \
5-
echo "make html in $$i..."; \
6-
(cd $$i; $(MAKE) $(MFLAGS) $(MYMAKEFLAGS) html); done
10+
echo "make html in $$i..."; \
11+
(cd $$i; $(MAKE) $(MFLAGS) $(MYMAKEFLAGS) html); done
712

813
html-noplot:
914
@for i in $(SUBDIRS); do \
10-
echo "make html-noplot in $$i..."; \
11-
(cd $$i; $(MAKE) $(MFLAGS) $(MYMAKEFLAGS) html-noplot); done
15+
echo "make html-noplot in $$i..."; \
16+
(cd $$i; $(MAKE) $(MFLAGS) $(MYMAKEFLAGS) html-noplot); done
1217

1318
html-noapi:
1419
@for i in $(SUBDIRS); do \
15-
echo "make html-noapi in $$i..."; \
16-
(cd $$i; $(MAKE) $(MFLAGS) $(MYMAKEFLAGS) html-noapi); done
20+
echo "make html-noapi in $$i..."; \
21+
(cd $$i; $(MAKE) $(MFLAGS) $(MYMAKEFLAGS) html-noapi); done
1722

1823
html-quick:
1924
@for i in $(SUBDIRS); do \
20-
echo "make html-quick in $$i..."; \
21-
(cd $$i; $(MAKE) $(MFLAGS) $(MYMAKEFLAGS) html-quick); done
22-
23-
all:
24-
@for i in $(SUBDIRS); do \
25-
echo "make all in $$i..."; \
26-
(cd $$i; $(MAKE) $(MFLAGS) $(MYMAKEFLAGS) all); done
27-
28-
install:
29-
@for i in $(SUBDIRS); do \
30-
echo "Installing in $$i..."; \
31-
(cd $$i; $(MAKE) $(MFLAGS) $(MYMAKEFLAGS) install); done
32-
33-
build:
34-
@for i in $(SUBDIRS); do \
35-
echo "Clearing in $$i..."; \
36-
(cd $$i; $(MAKE) $(MFLAGS) $(MYMAKEFLAGS) build); done
25+
echo "make html-quick in $$i..."; \
26+
(cd $$i; $(MAKE) $(MFLAGS) $(MYMAKEFLAGS) html-quick); done
3727

3828
clean:
3929
@for i in $(SUBDIRS); do \
@@ -42,8 +32,8 @@ clean:
4232

4333
doctest:
4434
@for i in $(SUBDIRS); do \
45-
echo "Running doctest in $$i..."; \
46-
(cd $$i; $(MAKE) $(MFLAGS) $(MYMAKEFLAGS) doctest); done
35+
echo "Running doctest in $$i..."; \
36+
(cd $$i; $(MAKE) $(MFLAGS) $(MYMAKEFLAGS) doctest); done
4737

4838
linkcheck:
4939
@for i in $(SUBDIRS); do \
@@ -55,3 +45,7 @@ show:
5545
echo "Running show in $$i..."; \
5646
(cd $$i; $(MAKE) $(MFLAGS) $(MYMAKEFLAGS) show); done
5747

48+
livehtml:
49+
@for i in $(SUBDIRS); do \
50+
echo "Running show in $$i..."; \
51+
(cd $$i; $(MAKE) $(MFLAGS) $(MYMAKEFLAGS) livehtml); done

docs/src/Makefile

Lines changed: 23 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,18 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
2020

2121
help:
2222
@echo "Please use \`make <target>' where <target> is one of"
23-
@echo " html to make standalone HTML files"
24-
@echo " dirhtml to make HTML files named index.html in directories"
25-
@echo " singlehtml to make a single large HTML file"
26-
@echo " pickle to make pickle files"
27-
@echo " json to make JSON files"
28-
@echo " htmlhelp to make HTML files and a HTML help project"
29-
@echo " qthelp to make HTML files and a qthelp project"
30-
@echo " devhelp to make HTML files and a Devhelp project"
31-
@echo " epub to make an epub"
32-
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
33-
@echo " latexpdf to make LaTeX files and run them through pdflatex"
34-
@echo " text to make text files"
35-
@echo " man to make manual pages"
36-
@echo " changes to make an overview of all changed/added/deprecated items"
37-
@echo " linkcheck to check all external links for integrity"
38-
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
39-
@echo " show to open the built documentation in the default browser"
40-
41-
clean:
42-
-rm -rf $(BUILDDIR)
43-
-rm -rf $(SRCDIR)/generated
23+
@echo " help to view this help"
24+
@echo " html to make standalone HTML files"
25+
@echo " html-noplot to make standalone HTML files, skip gallery"
26+
@echo " html-noapi to make standalone HTML files, skip the API"
27+
@echo " html-quick to make standalone HTML files, skip the gallery and API"
28+
@echo " clean to remove all built files"
29+
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
30+
@echo " linkcheck to check all external links for integrity"
31+
@echo " show to open the built documentation in the default browser"
32+
@echo " livehtml to auto build the docs when any file changes are detected."
33+
@echo " You need to install sphinx-autobuild first:"
34+
@echo " conda install -c conda-forge sphinx-autobuild"
4435

4536
html:
4637
$(SPHINXBUILD) $(WARNING_TO_ERROR) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@@ -62,94 +53,23 @@ html-quick:
6253
@echo
6354
@echo "Build finished. The HTML (no gallery or api docs) pages are in $(BUILDDIR)/html"
6455

65-
dirhtml:
66-
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
67-
@echo
68-
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml"
69-
70-
singlehtml:
71-
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
72-
@echo
73-
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml"
74-
75-
pickle:
76-
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
77-
@echo
78-
@echo "Build finished; now you can process the pickle files"
79-
80-
json:
81-
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
82-
@echo
83-
@echo "Build finished; now you can process the JSON files"
84-
85-
htmlhelp:
86-
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
87-
@echo
88-
@echo "Build finished; now you can run HTML Help Workshop with the" \
89-
".hhp project file in $(BUILDDIR)/htmlhelp."
90-
91-
qthelp:
92-
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
93-
@echo
94-
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
95-
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
96-
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Iris.qhcp"
97-
@echo "To view the help file:"
98-
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Iris.qhc"
99-
100-
devhelp:
101-
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
102-
@echo
103-
@echo "Build finished."
104-
@echo "To view the help file:"
105-
@echo "# mkdir -p $$HOME/.local/share/devhelp/Iris"
106-
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Iris"
107-
@echo "# devhelp"
108-
109-
epub:
110-
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
111-
@echo
112-
@echo "Build finished. The epub file is in $(BUILDDIR)/epub"
113-
114-
latex:
115-
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
116-
@echo
117-
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
118-
@echo "Run \`make' in that directory to run these through (pdf)latex" \
119-
"(use \`make latexpdf' here to do that automatically)."
120-
121-
latexpdf: latex
122-
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
123-
@echo "Running LaTeX files through pdflatex..."
124-
make -C $(BUILDDIR)/latex all-pdf
125-
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex"
126-
127-
text:
128-
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
129-
@echo
130-
@echo "Build finished. The text files are in $(BUILDDIR)/text."
131-
132-
man:
133-
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
134-
@echo
135-
@echo "Build finished. The manual pages are in $(BUILDDIR)/man"
56+
clean:
57+
-rm -rf $(BUILDDIR)
58+
-rm -rf $(SRCDIR)/generated
13659

137-
changes:
138-
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
139-
@echo
140-
@echo "The overview file is in $(BUILDDIR)/changes."
60+
doctest:
61+
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
62+
@echo "Testing of doctests in the sources finished, look at the "
63+
@echo "results in $(BUILDDIR)/doctest/output.txt."
14164

14265
linkcheck:
14366
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
14467
@echo
145-
@echo "Link check complete; look for any errors in the above output " \
146-
"or in $(BUILDDIR)/linkcheck/output.txt."
147-
148-
doctest:
149-
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
150-
@echo "Testing of doctests in the sources finished, look at the " \
151-
"results in $(BUILDDIR)/doctest/output.txt."
68+
@echo "Link check complete; look for any errors in the above output "
69+
@echo "or in $(BUILDDIR)/linkcheck/output.txt."
15270

15371
show:
15472
@python -c "import webbrowser; webbrowser.open_new_tab('file://$(shell pwd)/$(BUILDDIR)/html/index.html')"
15573

74+
livehtml:
75+
sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) --ignore generated $(O)

docs/src/whatsnew/latest.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ This document explains the changes made to Iris for this release
6969
#. `@tkknight`_ migrated to `sphinx-design`_ over the legacy `sphinx-panels`_.
7070
(:pull:`5127`)
7171

72+
#. `@tkknight`_ updated the ``make`` target for ``help`` and added
73+
``livehtml`` to auto generate the documentation when changes are detected
74+
during development. (:pull:`5258`)
75+
7276

7377
💼 Internal
7478
===========

0 commit comments

Comments
 (0)