blob: 5a83618266c2edd985cefec946b15a523c3aed36 [file] [log] [blame]
Minos Galanakisd19a19f2020-06-03 15:38:03 +01001# -----------------------------------------------------------------------------
2# Copyright (c) 2020, Arm Limited. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6# -----------------------------------------------------------------------------
7#
8# Configuration file override for the Sphinx documentation builder.
9#
10# This file is used when Sphinx build is invoked directly at this level.
11# It will trigger a copy-files operation and render a new configuration
12# using either auto-detected or cmake provided parameters.
13import os
14import sys
15
16# Attempt to find the tools directory by recursing up to five levels of parents
17root_path = os.path.dirname(os.path.abspath(__file__))
18
19for i in range(5):
20 root_path = os.path.dirname(root_path)
21 doc_path = os.path.join(root_path, "tools", "documentation")
22 if os.path.isdir(doc_path):
23 sys.path.insert(0, os.path.abspath(doc_path))
24sys.path.append("./")
25
26# Trigger the copy operation logic
27import tfm_copy_files
28
29# Import the rendered configuration into global scope
30from tfm_cmake_defaults import *
31
32from conf_rendered import *