forked from ros2/ros2_documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (28 loc) · 898 Bytes
/
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
# Make file to generate documentation
SOURCE = source
OUT = build
LINKCHECKDIR = $(OUT)/linkcheck
PYTHON := python3
ifeq ($(OS),Windows_NT)
PYTHON := python
endif
BUILD = $(PYTHON) -m sphinx
OPTS =-c .
help:
@$(BUILD) -M help "$(SOURCE)" "$(OUT)" $(OPTS)
@echo " multiversion to build documentation for all branches"
multiversion: Makefile
sphinx-multiversion $(OPTS) "$(SOURCE)" build/html
@echo "<html><head><meta http-equiv=\"refresh\" content=\"0; url=iron/index.html\" /></head></html>" > build/html/index.html
$(PYTHON) make_sitemapindex.py
%: Makefile
@$(BUILD) -M $@ "$(SOURCE)" "$(OUT)" $(OPTS)
lint:
sphinx-lint source
test:
doc8 --ignore D001 --ignore-path build
linkcheck:
$(BUILD) -b linkcheck $(OPTS) $(SOURCE) $(LINKCHECKDIR)
@echo
@echo "Check finished. Report is in $(LINKCHECKDIR)."
.PHONY: help Makefile multiversion test linkcheck