1#
2# Copyright (c) 2019-2024, Arm Limited. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6# Minimal makefile for Sphinx documentation
7#
8
9include ../make_helpers/common.mk
10
11# You can set these variables from the command line.
12SPHINXOPTS    = -W
13SPHINXBUILD   = sphinx-build
14SPHINXPROJ    = TrustedFirmware-A
15SOURCEDIR     = .
16BUILDDIR      = build
17
18# Put it first so that "make" without argument is like "make help".
19help:
20	$(q)$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
21
22.PHONY: help Makefile
23
24# Catch-all target: route all unknown targets to Sphinx using the new
25# "make mode" option.  $(O) is meant as a shortcut for $(SPHINXOPTS).
26.DEFAULT: Makefile
27	$(if $(host-poetry),$(q)poetry -q install --with=docs)
28	$(q)$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
29