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 9import os 10import subprocess 11 12project = "libbpf" 13 14extensions = [ 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. 28exclude_patterns = [] 29 30read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True' 31 32if read_the_docs_build: 33 subprocess.call('cd sphinx ; make clean', shell=True) 34 subprocess.call('cd sphinx/doxygen ; doxygen', shell=True) 35 36html_theme = 'sphinx_rtd_theme' 37 38breathe_projects = { "libbpf": "./sphinx/doxygen/build/xml/" } 39breathe_default_project = "libbpf" 40breathe_show_define_initializer = True 41breathe_show_enumvalue_initializer = True 42