##// END OF EJS Templates
Modified recipe so api is always executed first...
Dav Clark -
Show More
@@ -1,139 +1,140 b''
1 # Makefile for Sphinx documentation
1 # Makefile for Sphinx documentation
2 #
2 #
3
3
4 # You can set these variables from the command line.
4 # You can set these variables from the command line.
5 SPHINXOPTS =
5 SPHINXOPTS =
6 SPHINXBUILD = sphinx-build
6 SPHINXBUILD = sphinx-build
7 PAPER =
7 PAPER =
8 SRCDIR = source
8 SRCDIR = source
9 BUILDDIR = build
9 BUILDDIR = build
10
10
11 # Internal variables.
11 # Internal variables.
12 PAPEROPT_a4 = -D latex_paper_size=a4
12 PAPEROPT_a4 = -D latex_paper_size=a4
13 PAPEROPT_letter = -D latex_paper_size=letter
13 PAPEROPT_letter = -D latex_paper_size=letter
14 ALLSPHINXOPTS = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SRCDIR)
14 ALLSPHINXOPTS = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SRCDIR)
15
15
16 .PHONY: help clean html web pickle htmlhelp latex changes linkcheck api
16 .PHONY: help clean html web pickle htmlhelp latex changes linkcheck api
17
17
18 default: html
18 default: html
19
19
20 help:
20 help:
21 @echo "Please use \`make <target>' where <target> is one of"
21 @echo "Please use \`make <target>' where <target> is one of"
22 @echo " html to make standalone HTML files"
22 @echo " html to make standalone HTML files"
23 @echo " pickle to make pickle files (usable by e.g. sphinx-web)"
23 @echo " pickle to make pickle files (usable by e.g. sphinx-web)"
24 @echo " htmlhelp to make HTML files and a HTML help project"
24 @echo " htmlhelp to make HTML files and a HTML help project"
25 @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
25 @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
26 @echo " texinfo to make Texinfo files"
26 @echo " texinfo to make Texinfo files"
27 @echo " info to make Texinfo files and run them through makeinfo"
27 @echo " info to make Texinfo files and run them through makeinfo"
28 @echo " changes to make an overview over all changed/added/deprecated items"
28 @echo " changes to make an overview over all changed/added/deprecated items"
29 @echo " linkcheck to check all external links for integrity"
29 @echo " linkcheck to check all external links for integrity"
30 @echo
30 @echo
31 @echo "Compound utility targets:"
31 @echo "Compound utility targets:"
32 @echo "pdf latex and then runs the PDF generation"
32 @echo "pdf latex and then runs the PDF generation"
33 @echo "all html and pdf"
33 @echo "all html and pdf"
34 @echo "dist all, and then puts the results in dist/"
34 @echo "dist all, and then puts the results in dist/"
35 @echo "gitwash-update update git workflow from source repo"
35 @echo "gitwash-update update git workflow from source repo"
36
36
37 clean:
37 clean:
38 -rm -rf build/* dist/* $(SRCDIR)/api/generated
38 -rm -rf build/* dist/* $(SRCDIR)/api/generated
39
39
40 pdf: latex
40 pdf: latex
41 cd build/latex && make all-pdf
41 cd build/latex && make all-pdf
42
42
43 all: html pdf
43 all: html pdf
44
44
45 # For final distribution, only build HTML (our pdf is now so large as to be
45 # For final distribution, only build HTML (our pdf is now so large as to be
46 # unusable, takes forever to build and just bloats the downloads). We leave
46 # unusable, takes forever to build and just bloats the downloads). We leave
47 # them hardlinked at the top-level so users find them easily, though the
47 # them hardlinked at the top-level so users find them easily, though the
48 # original build/html dir is left in-place (useful to reload builds while
48 # original build/html dir is left in-place (useful to reload builds while
49 # testing).
49 # testing).
50 dist: html
50 dist: html
51 rm -rf html
51 rm -rf html
52 cp -al build/html .
52 cp -al build/html .
53 @echo "Build finished. Final docs are in html/"
53 @echo "Build finished. Final docs are in html/"
54
54
55 html: api htmlcore
55 html: api
56 html_noapi: clean
56
57
57 htmlcore:
58 html html_noapi:
58 mkdir -p build/html build/doctrees
59 mkdir -p build/html build/doctrees
59 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html
60 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html
60 @echo
61 @echo
61 @echo "Build finished. The HTML pages are in build/html."
62 @echo "Build finished. The HTML pages are in build/html."
62
63
63 api: source/api/generated/gen.txt
64 api: source/api/generated/gen.txt
64
65
65 source/api/generated/gen.txt:
66 source/api/generated/gen.txt:
66 python autogen_api.py
67 python autogen_api.py
67 @echo "Build API docs finished."
68 @echo "Build API docs finished."
68
69
69 pickle:
70 pickle:
70 mkdir -p build/pickle build/doctrees
71 mkdir -p build/pickle build/doctrees
71 $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle
72 $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle
72 @echo
73 @echo
73 @echo "Build finished; now you can process the pickle files or run"
74 @echo "Build finished; now you can process the pickle files or run"
74 @echo " sphinx-web build/pickle"
75 @echo " sphinx-web build/pickle"
75 @echo "to start the sphinx-web server."
76 @echo "to start the sphinx-web server."
76
77
77 web: pickle
78 web: pickle
78
79
79 htmlhelp:
80 htmlhelp:
80 mkdir -p build/htmlhelp build/doctrees
81 mkdir -p build/htmlhelp build/doctrees
81 $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) build/htmlhelp
82 $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) build/htmlhelp
82 @echo
83 @echo
83 @echo "Build finished; now you can run HTML Help Workshop with the" \
84 @echo "Build finished; now you can run HTML Help Workshop with the" \
84 ".hhp project file in build/htmlhelp."
85 ".hhp project file in build/htmlhelp."
85
86
86 qthelp:
87 qthelp:
87 mkdir -p build/qthelp
88 mkdir -p build/qthelp
88 $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) build/qthelp
89 $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) build/qthelp
89 @echo
90 @echo
90 @echo "Build finished; now you can run "qcollectiongenerator" with the" \
91 @echo "Build finished; now you can run "qcollectiongenerator" with the" \
91 ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
92 ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
92 @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/IPython.qhcp"
93 @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/IPython.qhcp"
93 @echo "To view the help file:"
94 @echo "To view the help file:"
94 @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/IPython.qhc"
95 @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/IPython.qhc"
95
96
96 latex: api
97 latex: api
97 mkdir -p build/latex build/doctrees
98 mkdir -p build/latex build/doctrees
98 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex
99 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex
99 @echo
100 @echo
100 @echo "Build finished; the LaTeX files are in build/latex."
101 @echo "Build finished; the LaTeX files are in build/latex."
101 @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
102 @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
102 "run these through (pdf)latex."
103 "run these through (pdf)latex."
103
104
104 changes:
105 changes:
105 mkdir -p build/changes build/doctrees
106 mkdir -p build/changes build/doctrees
106 $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) build/changes
107 $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) build/changes
107 @echo
108 @echo
108 @echo "The overview file is in build/changes."
109 @echo "The overview file is in build/changes."
109
110
110 linkcheck:
111 linkcheck:
111 mkdir -p build/linkcheck build/doctrees
112 mkdir -p build/linkcheck build/doctrees
112 $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) build/linkcheck
113 $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) build/linkcheck
113 @echo
114 @echo
114 @echo "Link check complete; look for any errors in the above output " \
115 @echo "Link check complete; look for any errors in the above output " \
115 "or in build/linkcheck/output.rst."
116 "or in build/linkcheck/output.rst."
116
117
117 gitwash-update:
118 gitwash-update:
118 python ../tools/gitwash_dumper.py source/development ipython
119 python ../tools/gitwash_dumper.py source/development ipython
119
120
120 nightly: dist
121 nightly: dist
121 rsync -avH --delete dist/ ipython:www/doc/nightly
122 rsync -avH --delete dist/ ipython:www/doc/nightly
122
123
123 gh-pages: clean html
124 gh-pages: clean html
124 python gh-pages.py
125 python gh-pages.py
125
126
126 texinfo:
127 texinfo:
127 mkdir -p $(BUILDDIR)/texinfo
128 mkdir -p $(BUILDDIR)/texinfo
128 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
129 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
129 @echo
130 @echo
130 @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
131 @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
131 @echo "Run \`make' in that directory to run these through makeinfo" \
132 @echo "Run \`make' in that directory to run these through makeinfo" \
132 "(use \`make info' here to do that automatically)."
133 "(use \`make info' here to do that automatically)."
133
134
134 info:
135 info:
135 mkdir -p $(BUILDDIR)/texinfo
136 mkdir -p $(BUILDDIR)/texinfo
136 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
137 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
137 @echo "Running Texinfo files through makeinfo..."
138 @echo "Running Texinfo files through makeinfo..."
138 make -C $(BUILDDIR)/texinfo info
139 make -C $(BUILDDIR)/texinfo info
139 @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
140 @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
General Comments 0
You need to be logged in to leave comments. Login now