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