forked from scylladb/java-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
76 lines (63 loc) · 1.97 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = poetry run sphinx-build
PAPER =
BUILDDIR = _build
SOURCE_DIR = _source
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SOURCE_DIR)
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: all
all: dirhtml
.PHONY: pristine
pristine: clean
git clean -dfX
.PHONY: setup
setup:
./_utils/setup.sh
cp -Tr source $(SOURCE_DIR)
cd $(SOURCE_DIR) && find -name README.md -execdir mv '{}' index.md ';'
.PHONY: clean
clean:
rm -rf $(BUILDDIR)/*
rm -rf $(SOURCE_DIR)/*
.PHONY: preview
preview: setup
cd .. && ./docs/_utils/doxygen.sh
poetry run sphinx-autobuild -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml --port 5500
.PHONY: dirhtml
dirhtml: setup
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
.PHONY: singlehtml
singlehtml: setup
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
.PHONY: epub
epub: setup
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
.PHONY: epub3
epub3: setup
$(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3
@echo
@echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3."
.PHONY: dummy
dummy: setup
$(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy
@echo
@echo "Build finished. Dummy builder generates no files."
.PHONY: linkcheck
linkcheck: setup
$(SPHINXBUILD) -b linkcheck . $(BUILDDIR)/linkcheck
.PHONY: multiversion
multiversion: setup
poetry run ./_utils/multiversion.sh
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."