CHANGES: remove dead link to now-removed cola.compat.hashlib
[git-cola.git] / docs / Makefile
blob2180c6b77497b8d7597b9a44e93529c342c1b46f
1 prefix ?= $(CURDIR)
2 docdir ?= $(prefix)/share/doc/git-cola
3 htmldir ?= $(docdir)/html
4 mandir ?= $(prefix)/share/man/man1
5 # DESTDIR =
7 # External commands
8 INSTALL ?= install
9 MKDIR_P ?= mkdir -p
10 RSYNC ?= rsync
11 SED ?= sed
13 RSYNC_FLAGS = -r --delete --delete-excluded
14 RSYNC_FLAGS += --exclude=.buildinfo --exclude=.gitignore
15 RSYNC_CMD = $(RSYNC) $(RSYNC_FLAGS)
17 SPHINXOPTS = -a
18 SPHINXBUILD = sphinx-build
19 PAPER =
21 # Internal variables.
22 PAPEROPT_a4 = -D latex_paper_size=a4
23 PAPEROPT_letter = -D latex_paper_size=letter
24 ALLSPHINXOPTS = -d _build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
26 .PHONY: all help clean html man dirhtml pickle json
27 .PHONY: htmlhelp qthelp latex changes linkcheck doctest
28 .PHONY: install install-files install-html install-man
30 # The default target of this makefile is...
31 all:: html man
33 help:
34 @echo "Please use \`make <target>' where <target> is one of"
35 @echo " html to make standalone HTML files"
36 @echo " man to make manual pages"
37 @echo " dirhtml to make HTML files named index.html in directories"
38 @echo " pickle to make pickle files"
39 @echo " json to make JSON files"
40 @echo " htmlhelp to make HTML files and a HTML help project"
41 @echo " qthelp to make HTML files and a qthelp project"
42 @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
43 @echo " changes to make an overview of all changed/added/deprecated items"
44 @echo " linkcheck to check all external links for integrity"
45 @echo " doctest to run all doctests embedded in the documentation (if enabled)"
47 clean:
48 -rm -rf _build/doctrees _build/man _build/html/*
50 html:
51 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html
53 man:
54 $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) _build/man
56 dirhtml:
57 $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) _build/dirhtml
59 pickle:
60 $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) _build/pickle
62 json:
63 $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) _build/json
65 htmlhelp:
66 $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp
68 qthelp:
69 $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) _build/qthelp
71 latex:
72 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex
74 changes:
75 $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) _build/changes
77 linkcheck:
78 $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck
80 doctest:
81 $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) _build/doctest
83 install: install-files install-html install-man
85 install-files:
86 $(MKDIR_P) $(DESTDIR)$(docdir)
87 $(INSTALL) -m 644 *.html $(DESTDIR)$(docdir)
88 $(INSTALL) -m 644 *.rst $(DESTDIR)$(docdir)
90 install-html: install-files html
91 $(MKDIR_P) $(DESTDIR)$(htmldir)
92 $(RSYNC_CMD) _build/html/ $(DESTDIR)$(htmldir)/
94 install-man: man
95 $(MKDIR_P) $(DESTDIR)$(mandir)
96 $(INSTALL) -m 644 _build/man/git-cola.1 $(DESTDIR)$(mandir)
97 $(INSTALL) -m 644 _build/man/git-dag.1 $(DESTDIR)$(mandir)