"Fossies" - the Fresh Open Source Software Archive

Member "numpy-1.16.4/doc/Makefile" (27 May 2019, 7288 Bytes) of package /linux/misc/numpy-1.16.4.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "Makefile": 1.15.4_vs_1.16.0.

    1 # Makefile for Sphinx documentation
    2 #
    3 
    4 PYVER = 3
    5 PYTHON = python$(PYVER)
    6 
    7 # You can set these variables from the command line.
    8 SPHINXOPTS    =
    9 SPHINXBUILD   = LANG=C sphinx-build
   10 PAPER         =
   11 
   12 FILES=
   13 
   14 # Internal variables.
   15 PAPEROPT_a4     = -D latex_paper_size=a4
   16 PAPEROPT_letter = -D latex_paper_size=letter
   17 ALLSPHINXOPTS   = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
   18 
   19 .PHONY: help clean html web pickle htmlhelp latex changes linkcheck \
   20         dist dist-build gitwash-update
   21 
   22 #------------------------------------------------------------------------------
   23 
   24 help:
   25 	@echo "Please use \`make <target>' where <target> is one of"
   26 	@echo "  html      to make standalone HTML files"
   27 	@echo "  html-scipyorg  to make standalone HTML files with scipy.org theming"
   28 	@echo "  pickle    to make pickle files (usable by e.g. sphinx-web)"
   29 	@echo "  htmlhelp  to make HTML files and a HTML help project"
   30 	@echo "  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
   31 	@echo "  changes   to make an overview over all changed/added/deprecated items"
   32 	@echo "  linkcheck to check all external links for integrity"
   33 	@echo "  dist PYVER=... to make a distribution-ready tree"
   34 	@echo "  gitwash-update GITWASH=path/to/gitwash  update gitwash developer docs"
   35 	@echo "  upload USERNAME=... RELEASE=... to upload built docs to docs.scipy.org"
   36 
   37 clean:
   38 	-rm -rf build/* source/reference/generated
   39 
   40 gitwash-update:
   41 	rm -rf source/dev/gitwash
   42 	install -d source/dev/gitwash
   43 	python $(GITWASH)/gitwash_dumper.py source/dev NumPy \
   44 	    --repo-name=numpy \
   45 	    --github-user=numpy
   46 	cat source/dev/gitwash_links.txt >> source/dev/gitwash/git_links.inc
   47 
   48 #------------------------------------------------------------------------------
   49 # Automated generation of all documents
   50 #------------------------------------------------------------------------------
   51 
   52 # Build the current numpy version, and extract docs from it.
   53 # We have to be careful of some issues:
   54 # 
   55 # - Everything must be done using the same Python version
   56 # - We must use eggs (otherwise they might override PYTHONPATH on import).
   57 # - Different versions of easy_install install to different directories (!)
   58 #
   59 
   60 
   61 INSTALL_DIR = $(CURDIR)/build/inst-dist/
   62 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
   63 UPLOAD_DIR=/srv/docs_scipy_org/doc/numpy-$(RELEASE)
   64 
   65 DIST_VARS=SPHINXBUILD="LANG=C PYTHONPATH=$(INSTALL_PPH) python$(PYVER) `which sphinx-build`" PYTHON="PYTHONPATH=$(INSTALL_PPH) python$(PYVER)" SPHINXOPTS="$(SPHINXOPTS)"
   66 
   67 dist:
   68 	make $(DIST_VARS) real-dist
   69 
   70 real-dist: dist-build html html-scipyorg
   71 	test -d build/latex || make latex
   72 	make -C build/latex all-pdf
   73 	-test -d build/htmlhelp || make htmlhelp-build
   74 	-rm -rf build/dist
   75 	cp -r build/html-scipyorg build/dist
   76 	cd build/html && zip -9r ../dist/numpy-html.zip .
   77 	cp build/latex/numpy-ref.pdf build/dist
   78 	cp build/latex/numpy-user.pdf build/dist
   79 	cd build/dist && tar czf ../dist.tar.gz *
   80 	chmod ug=rwX,o=rX -R build/dist
   81 	find build/dist -type d -print0 | xargs -0r chmod g+s
   82 
   83 dist-build:
   84 	rm -f ../dist/*.egg
   85 	cd .. && $(PYTHON) setup.py bdist_egg
   86 	install -d $(subst :, ,$(INSTALL_PPH))
   87 	$(PYTHON) `which easy_install` --prefix=$(INSTALL_DIR) ../dist/*.egg
   88 
   89 upload:
   90 	# SSH must be correctly configured for this to work.
   91 	# Assumes that ``make dist`` was already run
   92 	# Example usage: ``make upload USERNAME=rgommers RELEASE=1.10.1``
   93 	ssh $(USERNAME)@docs.scipy.org mkdir $(UPLOAD_DIR)
   94 	scp build/dist.tar.gz $(USERNAME)@docs.scipy.org:$(UPLOAD_DIR)
   95 	ssh $(USERNAME)@docs.scipy.org tar xvC $(UPLOAD_DIR) \
   96 	    -zf $(UPLOAD_DIR)/dist.tar.gz
   97 	ssh $(USERNAME)@docs.scipy.org mv $(UPLOAD_DIR)/numpy-ref.pdf \
   98 	    $(UPLOAD_DIR)/numpy-ref-$(RELEASE).pdf
   99 	ssh $(USERNAME)@docs.scipy.org mv $(UPLOAD_DIR)/numpy-user.pdf \
  100 	    $(UPLOAD_DIR)/numpy-user-$(RELEASE).pdf
  101 	ssh $(USERNAME)@docs.scipy.org mv $(UPLOAD_DIR)/numpy-html.zip \
  102 	    $(UPLOAD_DIR)/numpy-html-$(RELEASE).zip
  103 	ssh $(USERNAME)@docs.scipy.org rm $(UPLOAD_DIR)/dist.tar.gz
  104 	ssh $(USERNAME)@docs.scipy.org ln -snf numpy-$(RELEASE) /srv/docs_scipy_org/doc/numpy
  105 
  106 #------------------------------------------------------------------------------
  107 # Basic Sphinx generation rules for different formats
  108 #------------------------------------------------------------------------------
  109 
  110 generate: build/generate-stamp
  111 build/generate-stamp: $(wildcard source/reference/*.rst)
  112 	mkdir -p build
  113 	touch build/generate-stamp
  114 
  115 html: generate
  116 	mkdir -p build/html build/doctrees
  117 	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html $(FILES)
  118 	$(PYTHON) postprocess.py html build/html/*.html
  119 	@echo
  120 	@echo "Build finished. The HTML pages are in build/html."
  121 
  122 html-scipyorg:
  123 	mkdir -p build/html build/doctrees
  124 	$(SPHINXBUILD) -t scipyorg -b html $(ALLSPHINXOPTS) build/html-scipyorg $(FILES)
  125 	@echo
  126 	@echo "Build finished. The HTML pages are in build/html."
  127 
  128 pickle: generate
  129 	mkdir -p build/pickle build/doctrees
  130 	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle $(FILES)
  131 	@echo
  132 	@echo "Build finished; now you can process the pickle files or run"
  133 	@echo "  sphinx-web build/pickle"
  134 	@echo "to start the sphinx-web server."
  135 
  136 web: pickle
  137 
  138 htmlhelp: generate
  139 	mkdir -p build/htmlhelp build/doctrees
  140 	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) build/htmlhelp $(FILES)
  141 	@echo
  142 	@echo "Build finished; now you can run HTML Help Workshop with the" \
  143 	      ".hhp project file in build/htmlhelp."
  144 
  145 htmlhelp-build: htmlhelp build/htmlhelp/numpy.chm
  146 %.chm: %.hhp
  147 	-hhc.exe $^
  148 
  149 qthelp: generate
  150 	mkdir -p build/qthelp build/doctrees
  151 	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) build/qthelp $(FILES)
  152 
  153 latex: generate
  154 	mkdir -p build/latex build/doctrees
  155 	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex $(FILES)
  156 	$(PYTHON) postprocess.py tex build/latex/*.tex
  157 	perl -pi -e 's/\t(latex.*|pdflatex) (.*)/\t-$$1 -interaction batchmode $$2/' build/latex/Makefile
  158 	@echo
  159 	@echo "Build finished; the LaTeX files are in build/latex."
  160 	@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
  161 	      "run these through (pdf)latex."
  162 
  163 coverage: build
  164 	mkdir -p build/coverage build/doctrees
  165 	$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) build/coverage $(FILES)
  166 	@echo "Coverage finished; see c.txt and python.txt in build/coverage"
  167 
  168 changes: generate
  169 	mkdir -p build/changes build/doctrees
  170 	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) build/changes $(FILES)
  171 	@echo
  172 	@echo "The overview file is in build/changes."
  173 
  174 linkcheck: generate
  175 	mkdir -p build/linkcheck build/doctrees
  176 	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) build/linkcheck $(FILES)
  177 	@echo
  178 	@echo "Link check complete; look for any errors in the above output " \
  179 	      "or in build/linkcheck/output.txt."
  180 
  181 texinfo:
  182 	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) build/texinfo
  183 	@echo
  184 	@echo "Build finished. The Texinfo files are in build/texinfo."
  185 	@echo "Run \`make' in that directory to run these through makeinfo" \
  186 	      "(use \`make info' here to do that automatically)."
  187 
  188 info:
  189 	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) build/texinfo
  190 	@echo "Running Texinfo files through makeinfo..."
  191 	make -C build/texinfo info
  192 	@echo "makeinfo finished; the Info files are in build/texinfo."