forked from SeleniumHQ/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
52 lines (40 loc) · 1.24 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# You can set these variables from the command line:
SPHINXOPTS := -W
SPHINXBUILD := sphinx-build
PAPER :=
ifeq ($(shell uname -s),Linux)
BROWSER := x-www-browser
else
BROWSER := open
endif
# Internal variables
ROOT = $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d _build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: all clean html check themes open
all: AUTHORS html
clean:
-rm -rf _build/*
-rm -rf authors.rst AUTHORS
_build/doctrees:
mkdir -p _build/doctrees
html: authors.rst _build/doctrees themes
mkdir -p _build/html
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html
@echo
@echo "Build finished. The HTML pages are in _build/html."
linkcheck: _build/doctrees
mkdir -p _build/linkcheck
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck
@echo
@echo "Link check complete. Look for any errors in the above output " \
"or in _build/linkcheck/output.txt."
themes:
@true
AUTHORS:
git log --use-mailmap --format="%aN <%aE>" | sort -uf > $@
authors.rst:
git log --use-mailmap --format="* %aN" | sort -uf > $@
open: html
$(BROWSER) "file://$(ROOT)/_build/html/index.html"