-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
51 lines (45 loc) · 2.2 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
# Use `make` to build Sphinx documentation.
#
# The most common commands will likely be `make html` and `make clean`. There
# are many other "builders" known to Sphinx - use `make help` to see them.
#
# By default, this Makefile just forwards its argument to sphinx-build as a
# builder and passes along the required source and build directories.
#
# Keep an eye on upstream changes to this file - they'll be at [1] - because
# this was originally generated by sphinx-quickstart.
#
# [1]: https://github.com/sphinx-doc/sphinx/tree/master/sphinx/templates/quickstart
# These variables can be set from the command line. For example:
# SPHINXOPTS='-v -n -E' make html
# runs the HTML builder of `sphinx-build` in verbose (`-v`) and nitpicky (`-n`)
# mode from a clean environment (`-E`).
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build
# Note: `sphinx-build` also accepts the environmental variable O (capital 'o')
# as a synonym/shortcut for SPHINXOPTS, so these targets include both versions.
# See: https://www.sphinx-doc.org/en/master/man/sphinx-build.html
# The `help` target is first so that a no-argument `make` is like `make help`.
# Otherwise, sphinx-build would default to `make html`.
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
# Tell `make` about targets that shouldn't be treated as files.
.PHONY: help clean Makefile
# In addition to the normal cleanup, explicitly clean up the build artifacts of
# doxygen and exhale.
#
# - The `doxygen` pipeline dumps its output to `OUTPUT_DIRECTORY`
# - As defined in `Doxyfile`, this value is currently `doxybuild/`.
# - The `exhale` pipeline dumps its output to `exhale_args["containmentFolder"]`
# - As defined in `conf.py`, this value is currently `api/`.
#
# See: https://exhale.readthedocs.io/en/latest/usage.html#optional-create-a-proper-clean-target
clean:
@rm -rf "$(SOURCEDIR)/doxybuild/" # Clean up doxygen's build output.
@rm -rf "$(SOURCEDIR)/unity-api/" # Clean up exhale's build output.
@$(SPHINXBUILD) -M clean "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
# Catch-all: Route "unknown" targets to Sphinx.
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)