aboutsummaryrefslogtreecommitdiff
path: root/docs/Makefile
diff options
context:
space:
mode:
authorDavid Horstmann <david.horstmann@arm.com>2023-03-27 15:21:27 +0100
committerDavid Horstmann <david.horstmann@arm.com>2023-03-27 15:21:27 +0100
commit9bca03a2b2fb84a3fac2820bda5a41d8c680e869 (patch)
treedac9cff8c50617f0b73f372215d9b6849ab0c103 /docs/Makefile
parent1c693d4371fee863cd697a9a891b0eb5ee2480c9 (diff)
downloadmbedtls-9bca03a2b2fb84a3fac2820bda5a41d8c680e869.zip
mbedtls-9bca03a2b2fb84a3fac2820bda5a41d8c680e869.tar.gz
mbedtls-9bca03a2b2fb84a3fac2820bda5a41d8c680e869.tar.bz2
Improve docs Makefile to do full build
Include the make apidoc and breathe-apidoc steps in the documentation Makefile for ease of use. In this way, depart from the Makefile generated automatically by Sphinx. Signed-off-by: David Horstmann <david.horstmann@arm.com>
Diffstat (limited to 'docs/Makefile')
-rw-r--r--docs/Makefile22
1 files changed, 20 insertions, 2 deletions
diff --git a/docs/Makefile b/docs/Makefile
index d4bb2cb..6a7599e 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -12,9 +12,27 @@ BUILDDIR = _build
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
-.PHONY: help Makefile
+.PHONY: help clean apidoc breathe_apidoc Makefile
+
+# Intercept the 'clean' target so we can do the right thing for apidoc as well
+clean:
+ @# Clean the apidoc
+ $(MAKE) -C .. apidoc_clean
+ @# Clean the sphinx docs
+ @$(SPHINXBUILD) -M clean "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+
+apidoc:
+ @# Generate doxygen from source using the main Makefile
+ $(MAKE) -C .. apidoc
+
+breathe_apidoc: apidoc
+ @# Remove existing files - breathe-apidoc skips them if they're present
+ rm -rf ./api
+ @# Generate RST file structure with breathe-apidoc
+ breathe-apidoc -o ./api ../apidoc/xml
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
-%: Makefile
+%: Makefile breathe_apidoc
+ @# Build the relevant target with sphinx
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)