summaryrefslogtreecommitdiff
path: root/doc/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'doc/Makefile')
-rw-r--r--doc/Makefile18
1 files changed, 17 insertions, 1 deletions
diff --git a/doc/Makefile b/doc/Makefile
index c07e0d702..1a4884822 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -22,19 +22,30 @@ help:
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " changes to make an overview over all changed/added/deprecated items"
@echo " linkcheck to check all external links for integrity"
+ @echo " upload USER=... to upload results to docs.scipy.org"
clean:
-rm -rf build/* source/reference/generated
+upload:
+ @test -e build/dist || { echo "make dist is required first"; exit 1; }
+ @test output-is-fine -nt build/dist || { \
+ echo "Review the output in build/dist, and do 'touch output-is-fine' before uploading."; exit 1; }
+ rsync -r -z --delete-after -p build/dist/ $(USER)@docs.scipy.org:/home/docserver/www-root/doc/numpy/
+
dist: html
test -d build/latex || make latex
make -C build/latex all-pdf
+ -test -d build/htmlhelp || make htmlhelp-build
-rm -rf build/dist
cp -r build/html build/dist
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
cd build/html && zip -9r ../dist/numpy-html.zip .
- cp build/latex/*.pdf build/dist
+ cp build/latex/numpy-*.pdf build/dist
+ -cp build/htmlhelp/numpy.chm build/dist
cd build/dist && tar czf ../dist.tar.gz *
+ chmod ug=rwX,o=rX -R build/dist
+ find build/dist -type d -print0 | xargs -0r chmod g+s
generate: build/generate-stamp
build/generate-stamp: $(wildcard source/reference/*.rst)
@@ -67,10 +78,15 @@ htmlhelp: generate
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in build/htmlhelp."
+htmlhelp-build: htmlhelp build/htmlhelp/numpy.chm
+%.chm: %.hhp
+ -hhc.exe $^
+
latex: generate
mkdir -p build/latex build/doctrees
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex
python postprocess.py tex build/latex/*.tex
+ perl -pi -e 's/\t(latex.*|pdflatex) (.*)/\t-$$1 -interaction batchmode $$2/' build/latex/Makefile
@echo
@echo "Build finished; the LaTeX files are in build/latex."
@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \