about: apply flake8 suggestions
[git-cola.git] / share / doc / git-cola / Makefile
blob3e181c7527057543514d3751b671fcd7240581db
1 prefix ?= $(CURDIR)
2 docdir ?= $(prefix)/share/doc/git-cola
3 htmldir ?= $(docdir)/html
4 mandir ?= $(prefix)/share/man/man1
5 # DESTDIR =
7 SED ?= sed
8 RSYNC ?= rsync
9 MKDIR_P ?= mkdir -p
10 INSTALL ?= install
12 # You can set these variables from the command line.
13 SPHINXOPTS =
14 SPHINXBUILD = sphinx-build
15 PAPER =
17 # Internal variables.
18 PAPEROPT_a4 = -D latex_paper_size=a4
19 PAPEROPT_letter = -D latex_paper_size=letter
20 ALLSPHINXOPTS = -d _build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
22 .PHONY: all help clean html man dirhtml pickle json
23 .PHONY: htmlhelp qthelp latex changes linkcheck doctest
24 .PHONY: install install-files install-html install-man
26 # The default target of this makefile is...
27 all:: html man
29 help:
30 @echo "Please use \`make <target>' where <target> is one of"
31 @echo " html to make standalone HTML files"
32 @echo " man to make manual pages"
33 @echo " dirhtml to make HTML files named index.html in directories"
34 @echo " pickle to make pickle files"
35 @echo " json to make JSON files"
36 @echo " htmlhelp to make HTML files and a HTML help project"
37 @echo " qthelp to make HTML files and a qthelp project"
38 @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
39 @echo " changes to make an overview of all changed/added/deprecated items"
40 @echo " linkcheck to check all external links for integrity"
41 @echo " doctest to run all doctests embedded in the documentation (if enabled)"
43 clean:
44 -rm -rf _build/doctrees _build/man _build/html/*
46 html:
47 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html
49 man:
50 $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) _build/man
52 dirhtml:
53 $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) _build/dirhtml
55 pickle:
56 $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) _build/pickle
58 json:
59 $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) _build/json
61 htmlhelp:
62 $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp
64 qthelp:
65 $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) _build/qthelp
67 latex:
68 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex
70 changes:
71 $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) _build/changes
73 linkcheck:
74 $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck
76 doctest:
77 $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) _build/doctest
79 install: install-files install-html install-man
81 install-files:
82 $(MKDIR_P) $(DESTDIR)$(docdir)
83 $(INSTALL) -m 644 *.html $(DESTDIR)$(docdir)
84 $(INSTALL) -m 644 *.rst $(DESTDIR)$(docdir)
86 install-html: install-files html
87 $(MKDIR_P) $(DESTDIR)$(htmldir)
88 $(RSYNC) -r --delete --delete-excluded --exclude=.buildinfo --exclude=.gitignore _build/html/ $(DESTDIR)$(htmldir)/
90 install-man: man
91 $(MKDIR_P) $(DESTDIR)$(mandir)
92 $(INSTALL) -m 644 _build/man/git-cola.1 $(DESTDIR)$(mandir)
93 $(INSTALL) -m 644 _build/man/git-dag.1 $(DESTDIR)$(mandir)