1- # Minimal makefile for Sphinx documentation
2- #
1+ # Makefile for python-control Sphinx documentation
2+ # RMM, 15 Jan 2025
3+
4+ FIGS = figures/classes.pdf
5+ RST_FIGS = figures/flatsys-steering-compare.png \
6+ figures/iosys-predprey-open.png \
7+ figures/timeplot-servomech-combined.png \
8+ figures/steering-optimal.png figures/ctrlplot-servomech.png \
9+ figures/phaseplot-dampedosc-default.png \
10+ figures/timeplot-mimo_step-default.png \
11+ figures/freqplot-siso_bode-default.png \
12+ figures/pzmap-siso_ctime-default.png \
13+ figures/rlocus-siso_ctime-default.png \
14+ figures/stochastic-whitenoise-response.png
315
416# You can set these variables from the command line.
517SPHINXOPTS =
@@ -12,18 +24,33 @@ BUILDDIR = _build
1224help :
1325 @$(SPHINXBUILD ) -M help " $( SOURCEDIR) " " $( BUILDDIR) " $(SPHINXOPTS ) $(O )
1426
15- .PHONY : help Makefile doctest
27+ .PHONY : help Makefile html latexpdf doctest clean distclean
1628
17- # Catch-all target: route all unknown targets to Sphinx using the new
18- # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19- html latexpdf : Makefile doctest
20- make -C figures
21- @$(SPHINXBUILD ) -M $@ " $( SOURCEDIR) " " $( BUILDDIR) " $(SPHINXOPTS ) $(O )
29+ # List of the first RST figure of each type in each file that is generated
30+ figures/flatsys-steering-compare.png : flatsys.rst
31+ figures/iosys-predprey-open.png : iosys.rst
32+ figures/timeplot-servomech-combined.png : nlsys.rst
33+ figures/steering-optimal.png : optimal.rst
34+ figures/phaseplot-dampedosc-default.png : phaseplot.rst
35+ figures/timeplot-mimo_step-default.png : response.rst
36+ figures/freqplot-siso_bode-default.png : response.rst
37+ figures/pzmap-siso_ctime-default.png : response.rst
38+ figures/rlocus-siso_ctime-default.png : response.rst
39+ figures/ctrlplot-servomech.png : response.rst
40+ figures/stochastic-whitenoise-response.png : stochastic.rst
2241
23- doctest : Makefile
24- @$(SPHINXBUILD ) -M $@ " $( SOURCEDIR) " " $( BUILDDIR) " $(SPHINXOPTS ) $(O )
42+ # Other figure rules
43+ figure/classes.pdf : figure/classes.fig
44+ make -C figures classes.pdf
45+
46+ # Rule to run `make doctest` once for all figures
47+ .docfigs : $(RST_FIGS )
48+ @$(SPHINXBUILD ) -M doctest " $( SOURCEDIR) " " $( BUILDDIR) "
49+ touch $@
2550
26- clean :
51+ # Catch-all target: route all unknown targets to Sphinx using the new
52+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
53+ html latexpdf doctest clean : Makefile .docfigs $(FIGS )
2754 @$(SPHINXBUILD ) -M $@ " $( SOURCEDIR) " " $( BUILDDIR) " $(SPHINXOPTS ) $(O )
2855
2956distclean : clean
0 commit comments