PageRenderTime 43ms CodeModel.GetById 30ms app.highlight 10ms RepoModel.GetById 1ms app.codeStats 1ms

/Doc/Makefile

Relevant Search: With Applications for Solr and Elasticsearch

For more in depth reading about search, ranking and generally everything you could ever want to know about how lucene, elasticsearch or solr work under the hood I highly suggest this book. Easily one of the most interesting technical books I have read in a long time. If you are tasked with solving search relevance problems even if not in Solr or Elasticsearch it should be your first reference. Amazon Affiliate Link
http://unladen-swallow.googlecode.com/
Makefile | 152 lines | 117 code | 25 blank | 10 comment | 10 complexity | 0d6c374bf91bc421dedff1b14cb703b7 MD5 | raw file
  1#
  2# Makefile for Python documentation
  3# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  4#
  5
  6# You can set these variables from the command line.
  7PYTHON       = python
  8SVNROOT      = http://svn.python.org/projects
  9SPHINXOPTS   =
 10PAPER        =
 11SOURCES      =
 12DISTVERSION  = $(shell $(PYTHON) tools/sphinxext/patchlevel.py)
 13
 14ALLSPHINXOPTS = -b $(BUILDER) -d build/doctrees -D latex_paper_size=$(PAPER) \
 15                $(SPHINXOPTS) . build/$(BUILDER) $(SOURCES)
 16
 17.PHONY: help checkout update build html htmlhelp clean coverage dist check
 18
 19help:
 20	@echo "Please use \`make <target>' where <target> is one of"
 21	@echo "  html      to make standalone HTML files"
 22	@echo "  htmlhelp  to make HTML files and a HTML help project"
 23	@echo "  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
 24	@echo "  text      to make plain text files"
 25	@echo "  changes   to make an overview over all changed/added/deprecated items"
 26	@echo "  linkcheck to check all external links for integrity"
 27	@echo "  suspicious to check for suspicious markup in output text"
 28	@echo "  coverage  to check documentation coverage for library and C API"
 29	@echo "  dist      to create a \"dist\" directory with archived docs for download"
 30
 31# Note: if you update versions here, do the same in make.bat and README.txt
 32checkout:
 33	@if [ ! -d tools/sphinx ]; then \
 34	  echo "Checking out Sphinx..."; \
 35	  svn checkout $(SVNROOT)/external/Sphinx-0.6.2/sphinx tools/sphinx; \
 36	fi
 37	@if [ ! -d tools/docutils ]; then \
 38	  echo "Checking out Docutils..."; \
 39	  svn checkout $(SVNROOT)/external/docutils-0.5/docutils tools/docutils; \
 40	fi
 41	@if [ ! -d tools/jinja2 ]; then \
 42	  echo "Checking out Jinja..."; \
 43	  svn checkout $(SVNROOT)/external/Jinja-2.1.1/jinja2 tools/jinja2; \
 44	fi
 45	@if [ ! -d tools/pygments ]; then \
 46	  echo "Checking out Pygments..."; \
 47	  svn checkout $(SVNROOT)/external/Pygments-0.11.1/pygments tools/pygments; \
 48	fi
 49
 50update: checkout
 51	svn update tools/sphinx
 52	svn update tools/docutils
 53	svn update tools/jinja2
 54	svn update tools/pygments
 55
 56build: checkout
 57	mkdir -p build/$(BUILDER) build/doctrees
 58	$(PYTHON) tools/sphinx-build.py $(ALLSPHINXOPTS)
 59	@echo
 60
 61html: BUILDER = html
 62html: build
 63	@echo "Build finished. The HTML pages are in build/html."
 64
 65htmlhelp: BUILDER = htmlhelp
 66htmlhelp: build
 67	@echo "Build finished; now you can run HTML Help Workshop with the" \
 68	      "build/htmlhelp/pydoc.hhp project file."
 69
 70latex: BUILDER = latex
 71latex: build
 72	@echo "Build finished; the LaTeX files are in build/latex."
 73	@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
 74	      "run these through (pdf)latex."
 75
 76text: BUILDER = text
 77text: build
 78	@echo "Build finished; the text files are in build/text."
 79
 80changes: BUILDER = changes
 81changes: build
 82	@echo "The overview file is in build/changes."
 83
 84linkcheck: BUILDER = linkcheck
 85linkcheck: build
 86	@echo "Link check complete; look for any errors in the above output " \
 87	      "or in build/$(BUILDER)/output.txt"
 88
 89suspicious: BUILDER = suspicious
 90suspicious: build
 91	@echo "Suspicious check complete; look for any errors in the above output " \
 92	      "or in build/$(BUILDER)/suspicious.txt"
 93
 94coverage: BUILDER = coverage
 95coverage: build
 96	@echo "Coverage finished; see c.txt and python.txt in build/coverage"
 97
 98doctest: BUILDER = doctest
 99doctest: build
100	@echo "Testing of doctests in the sources finished, look at the " \
101	      "results in build/doctest/output.txt"
102
103pydoc-topics: BUILDER = pydoc-topics
104pydoc-topics: build
105	@echo "Building finished; now copy build/pydoc-topics/pydoc_topics.py " \
106	      "into the Lib/ directory"
107
108htmlview: html
109	 $(PYTHON) -c "import webbrowser; webbrowser.open('build/html/index.html')"
110
111clean:
112	-rm -rf build/*
113	-rm -rf tools/sphinx
114
115dist:
116	-rm -rf dist
117	mkdir -p dist
118
119	# archive the HTML
120	make html
121	cp -pPR build/html dist/python-$(DISTVERSION)-docs-html
122	tar -C dist -cf dist/python-$(DISTVERSION)-docs-html.tar python-$(DISTVERSION)-docs-html
123	bzip2 -9 -k dist/python-$(DISTVERSION)-docs-html.tar
124	(cd dist; zip -q -r -9 python-$(DISTVERSION)-docs-html.zip python-$(DISTVERSION)-docs-html)
125	rm -r dist/python-$(DISTVERSION)-docs-html
126	rm dist/python-$(DISTVERSION)-docs-html.tar
127
128	# archive the text build
129	make text
130	cp -pPR build/text dist/python-$(DISTVERSION)-docs-text
131	tar -C dist -cf dist/python-$(DISTVERSION)-docs-text.tar python-$(DISTVERSION)-docs-text
132	bzip2 -9 -k dist/python-$(DISTVERSION)-docs-text.tar
133	(cd dist; zip -q -r -9 python-$(DISTVERSION)-docs-text.zip python-$(DISTVERSION)-docs-text)
134	rm -r dist/python-$(DISTVERSION)-docs-text
135	rm dist/python-$(DISTVERSION)-docs-text.tar
136	
137	# archive the A4 latex
138	-rm -r build/latex
139	make latex PAPER=a4
140	(cd build/latex; make clean && make all-pdf && make FMT=pdf zip bz2)
141	cp build/latex/docs-pdf.zip dist/python-$(DISTVERSION)-docs-pdf-a4.zip
142	cp build/latex/docs-pdf.tar.bz2 dist/python-$(DISTVERSION)-docs-pdf-a4.tar.bz2
143
144	# archive the letter latex
145	rm -r build/latex
146	make latex PAPER=letter
147	(cd build/latex; make clean && make all-pdf && make FMT=pdf zip bz2)
148	cp build/latex/docs-pdf.zip dist/python-$(DISTVERSION)-docs-pdf-letter.zip
149	cp build/latex/docs-pdf.tar.bz2 dist/python-$(DISTVERSION)-docs-pdf-letter.tar.bz2
150
151check:
152	$(PYTHON) tools/rstlint.py -i tools