-
Notifications
You must be signed in to change notification settings - Fork 37
/
Makefile
129 lines (114 loc) · 5.19 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# Minimal makefile for Sphinx documentation
# Author: Denis Stogl (Stogl Robotics Consulting)
# The file is inspired by the Makefile for the navigation.ros.org <https://github.com/ros-planning/navigation.ros.org>
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = python3 -m sphinx
SOURCEDIR = .
BUILDDIR = _build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help $(SOURCEDIR) $(BUILDDIR) $(SPHINXOPTS) $(O)
@echo " html-with-api"
@echo " html-with-errors"
@echo " html-all-subrepos"
@echo " html-all-subrepos-with-errors"
@echo " html-all-subrepos-with-api"
@echo " multiversion"
@echo " multiversion-with-api"
@echo " multiversion-with-errors"
@echo " linkcheck-all-subrepos-with-api"
html-with-errors: Makefile
@echo Single version without API, no checkout of sub_repos
$(SPHINXBUILD) $(SPHINXOPTS) -W --keep-going $(SOURCEDIR) $(BUILDDIR)/html
html-with-api: Makefile
@echo Single version with API
@echo Step 1: Creating html files
$(SPHINXBUILD) $(SPHINXOPTS) $(SOURCEDIR) $(BUILDDIR)/html
@echo Step 2: Building API
./make_help_scripts/create_api.py
html-all-subrepos: Makefile
@echo Single html file without API
@echo Step 1: Cloning all subrepositories
./make_help_scripts/add_sub_repos.py
@echo Step 2: Building documentation
$(SPHINXBUILD) $(SPHINXOPTS) $(SOURCEDIR) $(BUILDDIR)/html
@echo Step 3: Deleting subrepositories in doc/ folder
./make_help_scripts/delete_sub_repos.py
html-all-subrepos-with-errors: Makefile
@echo Single html file without API
@echo Step 1: Cloning all subrepositories
./make_help_scripts/add_sub_repos.py
@echo Step 2: Building documentation
$(SPHINXBUILD) $(SPHINXOPTS) -W --keep-going $(SOURCEDIR) $(BUILDDIR)/html
@echo Step 3: Deleting subrepositories in doc/ folder
./make_help_scripts/delete_sub_repos.py
html-all-subrepos-with-api: Makefile
@echo Single html file with API
@echo Step 1: Cloning all subrepositories
./make_help_scripts/add_sub_repos.py
@echo Step 2: Building documentation
$(SPHINXBUILD) $(SPHINXOPTS) $(SOURCEDIR) $(BUILDDIR)/html
@echo Step 3: Building API
./make_help_scripts/create_api.py
@echo Step 4: Deleting subrepositories in doc/ folder
./make_help_scripts/delete_sub_repos.py
linkcheck-all-subrepos-with-api: Makefile
@echo Single version html file with API and linkcheck
@echo Step 1: Cloning all subrepositories
./make_help_scripts/add_sub_repos.py
@echo Step 2: Building API
./make_help_scripts/create_api.py
@echo Step 3: Check links
./make_help_scripts/check_links.py $(BUILDDIR)/html
@echo Step 4: Deleting subrepositories in doc/ folder
./make_help_scripts/delete_sub_repos.py
multiversion: Makefile
@echo Building multi version documentation without API
@echo Step 1: Creating temporary commits
./make_help_scripts/add_tmp_commits.py
@echo Step 2: Build multi version documentation
sphinx-multiversion $(SPHINXOPTS) $(SOURCEDIR) $(BUILDDIR)/html
@echo Step 3: Deleting temporary commits
./make_help_scripts/delete_tmp_commits.py
@echo Step 4: Create correct index + legacy master version
./make_help_scripts/fix_index.py --build-dir $(BUILDDIR)
multiversion-with-errors: Makefile
@echo Building multi version documentation without API
@echo Step 1: Creating temporary commits
./make_help_scripts/add_tmp_commits.py
@echo Step 2: Build multi version documentation
sphinx-multiversion $(SPHINXOPTS) -W --keep-going $(SOURCEDIR) $(BUILDDIR)/html
@echo Step 3: Deleting temporary commits
./make_help_scripts/delete_tmp_commits.py
@echo Step 4: Create correct index + legacy master version
./make_help_scripts/fix_index.py --build-dir $(BUILDDIR)
multiversion-with-api: Makefile
@echo Building multi version documentation with API
@echo Step 1: Creating temporary commits
./make_help_scripts/add_tmp_commits.py
@echo Step 2: Build multi version documentation
sphinx-multiversion $(SPHINXOPTS) $(SOURCEDIR) $(BUILDDIR)/html
@echo Step 3: Deleting temporary commits
./make_help_scripts/delete_tmp_commits.py
@echo Step 4: Cleanup subrepos, just to be sure
./make_help_scripts/delete_sub_repos.py
@echo Step 5: Building multiversion API
./make_help_scripts/create_api_multi_version.py
@echo Step 6: Create correct index + legacy master version
./make_help_scripts/fix_index.py --build-dir $(BUILDDIR)
.PHONY: help Makefile html-with-errors html-with-api multiversion multiversion-with-api multiversion-with-errors html-all-subrepos html-all-subrepos-with-api html-all-subrepos-with-errors linkcheck-all-subrepos-with-api
# TODO(denis): Enable this!
# # # # Generate the doxygen xml (for Sphinx) and copy the doxygen html to the
# # # # api folder for publishing along with the Sphinx-generated API docs.
# # #
# # # html:
# # # $(Q)$(SPHINXBUILD) -t $(DOC_TAG) -b html -d $(BUILDDIR)/doctrees $(SOURCEDIR) $(BUILDDIR)/html $(SPHINXOPTS) $(O)
# Remove generated content (Sphinx and doxygen)
# only remove html and doctrees directories since pip also uses _build for side-packages
clean:
rm -fr $(BUILDDIR)/html $(BUILDDIR)/doctrees
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ $(SOURCEDIR) $(BUILDDIR) $(SPHINXOPTS) $(O)