-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (44 loc) · 1.89 KB
/
Makefile
File metadata and controls
52 lines (44 loc) · 1.89 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
46
47
48
49
50
51
52
# 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
# 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..."
@rm -rf $(SOURCEDIR)/doc
@mkdir -p $(SOURCEDIR)/doc
@vcs import --input rolling.repos $(SOURCEDIR)/doc
@echo "Copying prepared franka_ros2 documentation..."
@rm -rf $(SOURCEDIR)/doc/franka_ros2
@cp -r franka_ros2 $(SOURCEDIR)/doc/
# Clean build directory and doc imports
clean:
rm -rf $(BUILDDIR)/*
rm -rf $(SOURCEDIR)/doc
rm -rf $(SOURCEDIR)/franka_ros
rm -rf $(SOURCEDIR)/franka_ros2
rm -rf $(SOURCEDIR)/libfranka
rm -rf $(SOURCEDIR)/franka_toolbox_for_matlab
# Custom html target that first imports repos, generates JS, clones franka_ros, franka_ros2, libfranka and franka_toolbox_for_matlab, then builds
html: generate-js
@echo "Importing documentation repositories..."
@if [ ! -d "$(SOURCEDIR)/franka_ros" ] || [ ! -d "$(SOURCEDIR)/franka_ros2" ] || [ ! -d "$(SOURCEDIR)/libfranka" ] || [ ! -d "$(SOURCEDIR)/franka_toolbox_for_matlab" ]; then \
cd $(SOURCEDIR) && vcs import --input ../upstream.repos .; \
fi
@$(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)