17c2aad20Sopenharmony_ci#!/usr/bin/env python3
27c2aad20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0
37c2aad20Sopenharmony_ci# Configuration file for the Sphinx documentation builder.
47c2aad20Sopenharmony_ci#
57c2aad20Sopenharmony_ci# This file only contains a selection of the most common options. For a full
67c2aad20Sopenharmony_ci# list see the documentation:
77c2aad20Sopenharmony_ci# https://www.sphinx-doc.org/en/master/usage/configuration.html
87c2aad20Sopenharmony_ci
97c2aad20Sopenharmony_ciimport os
107c2aad20Sopenharmony_ciimport subprocess
117c2aad20Sopenharmony_ci
127c2aad20Sopenharmony_ciproject = "libbpf"
137c2aad20Sopenharmony_ci
147c2aad20Sopenharmony_ciextensions = [
157c2aad20Sopenharmony_ci    'sphinx.ext.autodoc',
167c2aad20Sopenharmony_ci    'sphinx.ext.doctest',
177c2aad20Sopenharmony_ci    'sphinx.ext.mathjax',
187c2aad20Sopenharmony_ci    'sphinx.ext.viewcode',
197c2aad20Sopenharmony_ci    'sphinx.ext.imgmath',
207c2aad20Sopenharmony_ci    'sphinx.ext.todo',
217c2aad20Sopenharmony_ci    'sphinx_rtd_theme',
227c2aad20Sopenharmony_ci    'breathe',
237c2aad20Sopenharmony_ci]
247c2aad20Sopenharmony_ci
257c2aad20Sopenharmony_ci# List of patterns, relative to source directory, that match files and
267c2aad20Sopenharmony_ci# directories to ignore when looking for source files.
277c2aad20Sopenharmony_ci# This pattern also affects html_static_path and html_extra_path.
287c2aad20Sopenharmony_ciexclude_patterns = []
297c2aad20Sopenharmony_ci
307c2aad20Sopenharmony_ciread_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True'
317c2aad20Sopenharmony_ci
327c2aad20Sopenharmony_ciif read_the_docs_build:
337c2aad20Sopenharmony_ci    subprocess.call('cd sphinx ; make clean', shell=True)
347c2aad20Sopenharmony_ci    subprocess.call('cd sphinx/doxygen ; doxygen', shell=True)
357c2aad20Sopenharmony_ci
367c2aad20Sopenharmony_cihtml_theme = 'sphinx_rtd_theme'
377c2aad20Sopenharmony_ci
387c2aad20Sopenharmony_cibreathe_projects = { "libbpf": "./sphinx/doxygen/build/xml/" }
397c2aad20Sopenharmony_cibreathe_default_project = "libbpf"
407c2aad20Sopenharmony_cibreathe_show_define_initializer = True
417c2aad20Sopenharmony_cibreathe_show_enumvalue_initializer = True
42