2 docdir ?
= $(DESTDIR
)$(prefix)/share
/doc
/git-cola
3 htmldir ?
= $(docdir
)/html
5 COLA_VERSION ?
= $(shell sh
-c
"git tag | tail -1 | $(SED) -e s,^v,,")
6 COLA_RELEASE ?
= $(shell sh
-c
"git describe --abbrev=4 --match='v*.*' | $(SED) -e s,^v,,")
8 # Makefile for Sphinx documentation
11 # You can set these variables from the command line.
13 SPHINXBUILD
= sphinx-build
17 PAPEROPT_a4
= -D latex_paper_size
=a4
18 PAPEROPT_letter
= -D latex_paper_size
=letter
19 ALLSPHINXOPTS
= -d _build
/doctrees
$(PAPEROPT_
$(PAPER
)) $(SPHINXOPTS
) .
21 .PHONY
: help
clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
24 @echo
"Please use \`make <target>' where <target> is one of"
25 @echo
" html to make standalone HTML files"
26 @echo
" dirhtml to make HTML files named index.html in directories"
27 @echo
" pickle to make pickle files"
28 @echo
" json to make JSON files"
29 @echo
" htmlhelp to make HTML files and a HTML help project"
30 @echo
" qthelp to make HTML files and a qthelp project"
31 @echo
" latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
32 @echo
" changes to make an overview of all changed/added/deprecated items"
33 @echo
" linkcheck to check all external links for integrity"
34 @echo
" doctest to run all doctests embedded in the documentation (if enabled)"
37 -rm -rf conf.py _build
38 $(MAKE
) -f Makefile.asciidoc
clean
42 -e
"s,@@VERSION@@,$(COLA_VERSION)," \
43 -e
"s,@@RELEASE@@,$(COLA_RELEASE)," \
47 $(SPHINXBUILD
) -b html
$(ALLSPHINXOPTS
) _build
/html
49 @echo
"Build finished. The HTML pages are in _build/html."
52 $(SPHINXBUILD
) -b dirhtml
$(ALLSPHINXOPTS
) _build
/dirhtml
54 @echo
"Build finished. The HTML pages are in _build/dirhtml."
57 $(SPHINXBUILD
) -b pickle
$(ALLSPHINXOPTS
) _build
/pickle
59 @echo
"Build finished; now you can process the pickle files."
62 $(SPHINXBUILD
) -b json
$(ALLSPHINXOPTS
) _build
/json
64 @echo
"Build finished; now you can process the JSON files."
67 $(SPHINXBUILD
) -b htmlhelp
$(ALLSPHINXOPTS
) _build
/htmlhelp
69 @echo
"Build finished; now you can run HTML Help Workshop with the" \
70 ".hhp project file in _build/htmlhelp."
73 $(SPHINXBUILD
) -b qthelp
$(ALLSPHINXOPTS
) _build
/qthelp
75 @echo
"Build finished; now you can run "qcollectiongenerator
" with the" \
76 ".qhcp project file in _build/qthelp, like this:"
77 @echo
"# qcollectiongenerator _build/qthelp/git-cola.qhcp"
78 @echo
"To view the help file:"
79 @echo
"# assistant -collectionFile _build/qthelp/git-cola.qhc"
82 $(SPHINXBUILD
) -b latex
$(ALLSPHINXOPTS
) _build
/latex
84 @echo
"Build finished; the LaTeX files are in _build/latex."
85 @echo
"Run \`make all-pdf' or \`make all-ps' in that directory to" \
86 "run these through (pdf)latex."
89 $(SPHINXBUILD
) -b changes
$(ALLSPHINXOPTS
) _build
/changes
91 @echo
"The overview file is in _build/changes."
94 $(SPHINXBUILD
) -b linkcheck
$(ALLSPHINXOPTS
) _build
/linkcheck
96 @echo
"Link check complete; look for any errors in the above output " \
97 "or in _build/linkcheck/output.txt."
100 $(SPHINXBUILD
) -b doctest
$(ALLSPHINXOPTS
) _build
/doctest
101 @echo
"Testing of doctests in the sources finished, look at the " \
102 "results in _build/doctest/output.txt."
105 $(MAKE
) -f Makefile.asciidoc
all
107 install: install-html install-man
108 cp git-cola.txt
$(docdir
)
111 test -d
$(htmldir
) || mkdir
-p
$(htmldir
)
112 $(RSYNC
) -ar --delete _build
/html
/ $(htmldir
)/
113 $(MAKE
) -f Makefile.asciidoc install-html
116 $(MAKE
) -f Makefile.asciidoc
install