Skip to content

Commit 41eeed7

Browse files
committed
DOC: update scipy.org doc build Makefile targets
1 parent df21983 commit 41eeed7

File tree

1 file changed

+11
-18
lines changed

1 file changed

+11
-18
lines changed

doc/Makefile

+11-18
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Makefile for Sphinx documentation
22
#
33

4-
PYVER =
4+
PYVER = 2.7
55
PYTHON = python$(PYVER)
66

77
# You can set these variables from the command line.
@@ -24,13 +24,13 @@ ALLSPHINXOPTS = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
2424
help:
2525
@echo "Please use \`make <target>' where <target> is one of"
2626
@echo " html to make standalone HTML files"
27+
@echo " html-scipyorg to make standalone HTML files with scipy.org theming"
2728
@echo " pickle to make pickle files (usable by e.g. sphinx-web)"
2829
@echo " htmlhelp to make HTML files and a HTML help project"
2930
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
3031
@echo " changes to make an overview over all changed/added/deprecated items"
3132
@echo " linkcheck to check all external links for integrity"
3233
@echo " dist PYVER=... to make a distribution-ready tree"
33-
@echo " upload USER=... to upload results to docs.scipy.org"
3434
@echo " gitwash-update GITWASH=path/to/gitwash update gitwash developer docs"
3535

3636
clean:
@@ -56,34 +56,21 @@ gitwash-update:
5656
# - Different versions of easy_install install to different directories (!)
5757
#
5858

59+
5960
INSTALL_DIR = $(CURDIR)/build/inst-dist/
6061
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
6162

6263
DIST_VARS=SPHINXBUILD="LANG=C PYTHONPATH=$(INSTALL_PPH) python$(PYVER) `which sphinx-build`" PYTHON="PYTHONPATH=$(INSTALL_PPH) python$(PYVER)" SPHINXOPTS="$(SPHINXOPTS)"
6364

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-
7765
dist:
7866
make $(DIST_VARS) real-dist
7967

80-
real-dist: dist-build html
68+
real-dist: dist-build html html-scipyorg
8169
test -d build/latex || make latex
8270
make -C build/latex all-pdf
8371
-test -d build/htmlhelp || make htmlhelp-build
8472
-rm -rf build/dist
85-
cp -r build/html build/dist
86-
perl -pi -e 's#^\s*(<li><a href=".*?">NumPy.*?Manual.*?&raquo;</li>)#<li><a href="/">Numpy and Scipy Documentation</a> &raquo;</li>#;' build/dist/*.html build/dist/*/*.html build/dist/*/*/*.html
73+
cp -r build/html-scipyorg build/dist
8774
cd build/html && zip -9r ../dist/numpy-html.zip .
8875
cp build/latex/numpy-*.pdf build/dist
8976
-zip build/dist/numpy-chm.zip build/htmlhelp/numpy.chm
@@ -114,6 +101,12 @@ html: generate
114101
@echo
115102
@echo "Build finished. The HTML pages are in build/html."
116103

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+
117110
pickle: generate
118111
mkdir -p build/pickle build/doctrees
119112
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle $(FILES)

0 commit comments

Comments
 (0)