1
1
# Makefile for Sphinx documentation
2
2
#
3
3
4
- PYVER =
4
+ PYVER = 2.7
5
5
PYTHON = python$(PYVER )
6
6
7
7
# You can set these variables from the command line.
@@ -24,13 +24,13 @@ ALLSPHINXOPTS = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
24
24
help :
25
25
@echo " Please use \` make <target>' where <target> is one of"
26
26
@echo " html to make standalone HTML files"
27
+ @echo " html-scipyorg to make standalone HTML files with scipy.org theming"
27
28
@echo " pickle to make pickle files (usable by e.g. sphinx-web)"
28
29
@echo " htmlhelp to make HTML files and a HTML help project"
29
30
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
30
31
@echo " changes to make an overview over all changed/added/deprecated items"
31
32
@echo " linkcheck to check all external links for integrity"
32
33
@echo " dist PYVER=... to make a distribution-ready tree"
33
- @echo " upload USER=... to upload results to docs.scipy.org"
34
34
@echo " gitwash-update GITWASH=path/to/gitwash update gitwash developer docs"
35
35
36
36
clean :
@@ -56,34 +56,21 @@ gitwash-update:
56
56
# - Different versions of easy_install install to different directories (!)
57
57
#
58
58
59
+
59
60
INSTALL_DIR = $(CURDIR ) /build/inst-dist/
60
61
INSTALL_PPH = $(INSTALL_DIR ) /lib/python$(PYVER ) /site-packages:$(INSTALL_DIR ) /local/lib/python$(PYVER ) /site-packages:$(INSTALL_DIR ) /lib/python$(PYVER ) /dist-packages:$(INSTALL_DIR ) /local/lib/python$(PYVER ) /dist-packages
61
62
62
63
DIST_VARS=SPHINXBUILD="LANG =C PYTHONPATH=$(INSTALL_PPH ) python$(PYVER ) ` which sphinx-build ` " PYTHON="PYTHONPATH=$(INSTALL_PPH ) python$(PYVER ) " SPHINXOPTS="$(SPHINXOPTS ) "
63
64
64
- UPLOAD_TARGET = $(USER ) @docs.scipy.org:/home/docserver/www-root/doc/numpy/
65
-
66
- upload :
67
- @test -e build/dist || { echo " make dist is required first" ; exit 1; }
68
- @test output-is-fine -nt build/dist || { \
69
- echo " Review the output in build/dist, and do 'touch output-is-fine' before uploading." ; exit 1; }
70
- rsync -r -z --delete-after -p \
71
- $(if $(shell test -f build/dist/numpy-ref.pdf && echo "y") ,, \
72
- --exclude ' **-ref.pdf' --exclude ' **-user.pdf' ) \
73
- $(if $(shell test -f build/dist/numpy-chm.zip && echo "y") ,, \
74
- --exclude ' **-chm.zip' ) \
75
- build/dist/ $(UPLOAD_TARGET )
76
-
77
65
dist :
78
66
make $(DIST_VARS ) real-dist
79
67
80
- real-dist : dist-build html
68
+ real-dist : dist-build html html-scipyorg
81
69
test -d build/latex || make latex
82
70
make -C build/latex all-pdf
83
71
-test -d build/htmlhelp || make htmlhelp-build
84
72
-rm -rf build/dist
85
- cp -r build/html build/dist
86
- perl -pi -e ' s#^\s*(<li><a href=".*?">NumPy.*?Manual.*?»</li>)#<li><a href="/">Numpy and Scipy Documentation</a> »</li>#;' build/dist/* .html build/dist/* /* .html build/dist/* /* /* .html
73
+ cp -r build/html-scipyorg build/dist
87
74
cd build/html && zip -9r ../dist/numpy-html.zip .
88
75
cp build/latex/numpy-* .pdf build/dist
89
76
-zip build/dist/numpy-chm.zip build/htmlhelp/numpy.chm
@@ -114,6 +101,12 @@ html: generate
114
101
@echo
115
102
@echo " Build finished. The HTML pages are in build/html."
116
103
104
+ html-scipyorg :
105
+ mkdir -p build/html build/doctrees
106
+ $(SPHINXBUILD ) -t scipyorg -b html $(ALLSPHINXOPTS ) build/html-scipyorg $(FILES )
107
+ @echo
108
+ @echo " Build finished. The HTML pages are in build/html."
109
+
117
110
pickle : generate
118
111
mkdir -p build/pickle build/doctrees
119
112
$(SPHINXBUILD ) -b pickle $(ALLSPHINXOPTS ) build/pickle $(FILES )
0 commit comments