##// END OF EJS Templates
Added a lightweight "core" Makefile entry...
Dav Clark -
Show More
@@ -1,137 +1,139 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
55 html: core api
56
57 core:
56 mkdir -p build/html build/doctrees
58 mkdir -p build/html build/doctrees
57 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html
59 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html
58 @echo
60 @echo
59 @echo "Build finished. The HTML pages are in build/html."
61 @echo "Build finished. The HTML pages are in build/html."
60
62
61 api: source/api/generated/gen.txt
63 api: source/api/generated/gen.txt
62
64
63 source/api/generated/gen.txt:
65 source/api/generated/gen.txt:
64 python autogen_api.py
66 python autogen_api.py
65 @echo "Build API docs finished."
67 @echo "Build API docs finished."
66
68
67 pickle:
69 pickle:
68 mkdir -p build/pickle build/doctrees
70 mkdir -p build/pickle build/doctrees
69 $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle
71 $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle
70 @echo
72 @echo
71 @echo "Build finished; now you can process the pickle files or run"
73 @echo "Build finished; now you can process the pickle files or run"
72 @echo " sphinx-web build/pickle"
74 @echo " sphinx-web build/pickle"
73 @echo "to start the sphinx-web server."
75 @echo "to start the sphinx-web server."
74
76
75 web: pickle
77 web: pickle
76
78
77 htmlhelp:
79 htmlhelp:
78 mkdir -p build/htmlhelp build/doctrees
80 mkdir -p build/htmlhelp build/doctrees
79 $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) build/htmlhelp
81 $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) build/htmlhelp
80 @echo
82 @echo
81 @echo "Build finished; now you can run HTML Help Workshop with the" \
83 @echo "Build finished; now you can run HTML Help Workshop with the" \
82 ".hhp project file in build/htmlhelp."
84 ".hhp project file in build/htmlhelp."
83
85
84 qthelp:
86 qthelp:
85 mkdir -p build/qthelp
87 mkdir -p build/qthelp
86 $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) build/qthelp
88 $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) build/qthelp
87 @echo
89 @echo
88 @echo "Build finished; now you can run "qcollectiongenerator" with the" \
90 @echo "Build finished; now you can run "qcollectiongenerator" with the" \
89 ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
91 ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
90 @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/IPython.qhcp"
92 @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/IPython.qhcp"
91 @echo "To view the help file:"
93 @echo "To view the help file:"
92 @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/IPython.qhc"
94 @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/IPython.qhc"
93
95
94 latex: api
96 latex: api
95 mkdir -p build/latex build/doctrees
97 mkdir -p build/latex build/doctrees
96 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex
98 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex
97 @echo
99 @echo
98 @echo "Build finished; the LaTeX files are in build/latex."
100 @echo "Build finished; the LaTeX files are in build/latex."
99 @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
101 @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
100 "run these through (pdf)latex."
102 "run these through (pdf)latex."
101
103
102 changes:
104 changes:
103 mkdir -p build/changes build/doctrees
105 mkdir -p build/changes build/doctrees
104 $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) build/changes
106 $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) build/changes
105 @echo
107 @echo
106 @echo "The overview file is in build/changes."
108 @echo "The overview file is in build/changes."
107
109
108 linkcheck:
110 linkcheck:
109 mkdir -p build/linkcheck build/doctrees
111 mkdir -p build/linkcheck build/doctrees
110 $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) build/linkcheck
112 $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) build/linkcheck
111 @echo
113 @echo
112 @echo "Link check complete; look for any errors in the above output " \
114 @echo "Link check complete; look for any errors in the above output " \
113 "or in build/linkcheck/output.rst."
115 "or in build/linkcheck/output.rst."
114
116
115 gitwash-update:
117 gitwash-update:
116 python ../tools/gitwash_dumper.py source/development ipython
118 python ../tools/gitwash_dumper.py source/development ipython
117
119
118 nightly: dist
120 nightly: dist
119 rsync -avH --delete dist/ ipython:www/doc/nightly
121 rsync -avH --delete dist/ ipython:www/doc/nightly
120
122
121 gh-pages: clean html
123 gh-pages: clean html
122 python gh-pages.py
124 python gh-pages.py
123
125
124 texinfo:
126 texinfo:
125 mkdir -p $(BUILDDIR)/texinfo
127 mkdir -p $(BUILDDIR)/texinfo
126 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
128 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
127 @echo
129 @echo
128 @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
130 @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
129 @echo "Run \`make' in that directory to run these through makeinfo" \
131 @echo "Run \`make' in that directory to run these through makeinfo" \
130 "(use \`make info' here to do that automatically)."
132 "(use \`make info' here to do that automatically)."
131
133
132 info:
134 info:
133 mkdir -p $(BUILDDIR)/texinfo
135 mkdir -p $(BUILDDIR)/texinfo
134 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
136 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
135 @echo "Running Texinfo files through makeinfo..."
137 @echo "Running Texinfo files through makeinfo..."
136 make -C $(BUILDDIR)/texinfo info
138 make -C $(BUILDDIR)/texinfo info
137 @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
139 @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
General Comments 0
You need to be logged in to leave comments. Login now