-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (37 loc) · 1.77 KB
/
Makefile
File metadata and controls
45 lines (37 loc) · 1.77 KB
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
# Minimal makefile for Sphinx documentation
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = python3 -msphinx
SPHINXPROJ = research-interface
SOURCEDIR = source
BUILDDIR = build
REPOS = upstream.repos
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile clean html import-repos generate-js
# Generate compatibility data JavaScript file
generate-js:
@chmod +x $(SOURCEDIR)/_static/generate_compatibility_js.py
@$(SOURCEDIR)/_static/generate_compatibility_js.py
# Import VCS repositories for documentation
import-repos:
@echo "Importing VCS repositories..."
@mkdir -p $(SOURCEDIR)/doc
@vcs import --shallow --skip-existing --input $(REPOS) $(SOURCEDIR)/doc
# Clean build directory and doc imports
# Note, we intentionally do not remove the entire doc directory to preserve any manually added content,
# but we do clean the build directory to ensure a fresh build each time.
clean:
rm -rf $(BUILDDIR)/*
# Custom html target that first imports repos, generates JS, then builds
html:
@if [ ! -d "$(SOURCEDIR)/doc/franka_ros" ] || [ ! -d "$(SOURCEDIR)/doc/franka_ros2_jazzy" ] || [ ! -d "$(SOURCEDIR)/doc/franka_ros2_humble" ] || [ ! -d "$(SOURCEDIR)/doc/libfranka" ] || [ ! -d "$(SOURCEDIR)/doc/franka_toolbox_for_matlab" ] || [ ! -d "$(SOURCEDIR)/doc/franka_description" ]; then \
$(MAKE) import-repos; \
fi
@$(MAKE) generate-js
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
# 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)