1*f7c14bbaSAndroid Build Coastguard Worker#!/usr/bin/env python3 2*f7c14bbaSAndroid Build Coastguard Worker# SPDX-License-Identifier: GPL-2.0 3*f7c14bbaSAndroid Build Coastguard Worker# Configuration file for the Sphinx documentation builder. 4*f7c14bbaSAndroid Build Coastguard Worker# 5*f7c14bbaSAndroid Build Coastguard Worker# This file only contains a selection of the most common options. For a full 6*f7c14bbaSAndroid Build Coastguard Worker# list see the documentation: 7*f7c14bbaSAndroid Build Coastguard Worker# https://www.sphinx-doc.org/en/master/usage/configuration.html 8*f7c14bbaSAndroid Build Coastguard Worker 9*f7c14bbaSAndroid Build Coastguard Workerimport os 10*f7c14bbaSAndroid Build Coastguard Workerimport subprocess 11*f7c14bbaSAndroid Build Coastguard Worker 12*f7c14bbaSAndroid Build Coastguard Workerproject = "libbpf" 13*f7c14bbaSAndroid Build Coastguard Worker 14*f7c14bbaSAndroid Build Coastguard Workerextensions = [ 15*f7c14bbaSAndroid Build Coastguard Worker 'sphinx.ext.autodoc', 16*f7c14bbaSAndroid Build Coastguard Worker 'sphinx.ext.doctest', 17*f7c14bbaSAndroid Build Coastguard Worker 'sphinx.ext.mathjax', 18*f7c14bbaSAndroid Build Coastguard Worker 'sphinx.ext.viewcode', 19*f7c14bbaSAndroid Build Coastguard Worker 'sphinx.ext.imgmath', 20*f7c14bbaSAndroid Build Coastguard Worker 'sphinx.ext.todo', 21*f7c14bbaSAndroid Build Coastguard Worker 'sphinx_rtd_theme', 22*f7c14bbaSAndroid Build Coastguard Worker 'breathe', 23*f7c14bbaSAndroid Build Coastguard Worker] 24*f7c14bbaSAndroid Build Coastguard Worker 25*f7c14bbaSAndroid Build Coastguard Worker# List of patterns, relative to source directory, that match files and 26*f7c14bbaSAndroid Build Coastguard Worker# directories to ignore when looking for source files. 27*f7c14bbaSAndroid Build Coastguard Worker# This pattern also affects html_static_path and html_extra_path. 28*f7c14bbaSAndroid Build Coastguard Workerexclude_patterns = [] 29*f7c14bbaSAndroid Build Coastguard Worker 30*f7c14bbaSAndroid Build Coastguard Workerread_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True' 31*f7c14bbaSAndroid Build Coastguard Worker 32*f7c14bbaSAndroid Build Coastguard Workerif read_the_docs_build: 33*f7c14bbaSAndroid Build Coastguard Worker subprocess.call('cd sphinx ; make clean', shell=True) 34*f7c14bbaSAndroid Build Coastguard Worker subprocess.call('cd sphinx/doxygen ; doxygen', shell=True) 35*f7c14bbaSAndroid Build Coastguard Worker 36*f7c14bbaSAndroid Build Coastguard Workerhtml_theme = 'sphinx_rtd_theme' 37*f7c14bbaSAndroid Build Coastguard Worker 38*f7c14bbaSAndroid Build Coastguard Workerbreathe_projects = { "libbpf": "./sphinx/doxygen/build/xml/" } 39*f7c14bbaSAndroid Build Coastguard Workerbreathe_default_project = "libbpf" 40*f7c14bbaSAndroid Build Coastguard Workerbreathe_show_define_initializer = True 41*f7c14bbaSAndroid Build Coastguard Workerbreathe_show_enumvalue_initializer = True 42