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