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