Module: Mesa Branch: main Commit: bbd6ef4d34f0387087378b91b5056760f36b91b2 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bbd6ef4d34f0387087378b91b5056760f36b91b2
Author: Erik Faye-Lund <[email protected]> Date: Wed Oct 25 00:20:45 2023 +0300 docs: remove breathe/doxygen stuff Reviewed-by: Jani Nikula <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24507> --- docs/conf.py | 9 ----- docs/doxygen-wrapper.py | 97 ------------------------------------------------- docs/gitlab-ci.yml | 8 ++-- 3 files changed, 4 insertions(+), 110 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index b33feba8c41..8fc85170061 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -40,7 +40,6 @@ sys.path.append(os.path.abspath('_exts')) # ones. extensions = [ 'bootstrap', - 'breathe', 'formatting', 'hawkmoth', 'nir', @@ -239,11 +238,3 @@ rst_prolog = ''' .. |out| replace:: **[out]** .. |inout| replace:: **[inout]** ''' - -# -- Options for breathe -------------------------------------------------- -breathe_projects = { - 'mesa' : 'doxygen_xml', -} -breathe_default_project = 'mesa' -breathe_show_define_initializer = True -breathe_show_enumvalue_initializer = True diff --git a/docs/doxygen-wrapper.py b/docs/doxygen-wrapper.py deleted file mode 100755 index 879bd67d89d..00000000000 --- a/docs/doxygen-wrapper.py +++ /dev/null @@ -1,97 +0,0 @@ -#!/usr/bin/env python3 -# -# Copyright © 2021 Intel Corporation -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sub license, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice (including the -# next paragraph) shall be included in all copies or substantial portions -# of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -# IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR -# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -import argparse -from mako.template import Template -import os -import subprocess -import tempfile - -# You must update the paths in docs/gitlab-ci.yml's pages job when changing this. -INPUT_PATHS = [ - 'src/compiler/nir/nir.h', - 'src/intel/isl', - 'src/vulkan/runtime', -] - -TEMPLATE_DOXYFILE = Template(""" -# Doxyfile 1.9.1 -DOXYFILE_ENCODING = UTF-8 -PROJECT_NAME = "Mesa" - -INPUT = ${' '.join(input_files)} -XML_OUTPUT = ${output_xml} - -# Only generate XML -GENERATE_HTML = NO -GENERATE_LATEX = NO -GENERATE_XML = YES - -# Add aliases for easily writing reStructuredText in comments -ALIASES = "rst=\\verbatim embed:rst:leading-asterisk" -ALIASES += "endrst=\endverbatim" - -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = YES -EXPAND_ONLY_PREDEF = YES - -# Defines required to keep doxygen from tripping on our attribute macros -PREDEFINED = PACKED= -PREDEFINED += ENUM_PACKED= -PREDEFINED += ATTRIBUTE_CONST= -PREDEFINED += MUST_CHECK= -""") - -def run_doxygen(output_path, input_paths=[]): - doxyfile = tempfile.NamedTemporaryFile(mode='w', delete=False) - try: - doxyfile.write(TEMPLATE_DOXYFILE.render( - input_files=[ os.path.abspath(i) for i in input_paths ], - output_xml=os.path.abspath(output_path), - )) - doxyfile.close() - - subprocess.run(['doxygen', doxyfile.name]) - - finally: - doxyfile.close() - os.unlink(doxyfile.name) - -if __name__ == '__main__': - parser = argparse.ArgumentParser() - parser.add_argument('--out-dir', - help='Output XML directory.', - required=True) - args = parser.parse_args() - - this_dir = os.path.dirname(os.path.abspath(__file__)) - mesa_dir = os.path.join(this_dir, '..') - def fixpath(p): - if os.path.isabs(p): - return p - return os.path.join(mesa_dir, p) - - input_paths = [ fixpath(p) for p in INPUT_PATHS ] - - run_doxygen(args.out_dir, input_paths) diff --git a/docs/gitlab-ci.yml b/docs/gitlab-ci.yml index ce044cdc080..158db983129 100644 --- a/docs/gitlab-ci.yml +++ b/docs/gitlab-ci.yml @@ -8,9 +8,8 @@ paths: - public/ script: - - apk --no-cache add graphviz doxygen py3-clang clang-dev musl-dev linux-headers - - pip3 install sphinx===5.1.1 breathe===4.34.0 mako===1.2.3 hawkmoth===0.16.0 - - docs/doxygen-wrapper.py --out-dir=docs/doxygen_xml + - apk --no-cache add graphviz py3-clang clang-dev musl-dev linux-headers + - pip3 install sphinx===5.1.1 mako===1.2.3 hawkmoth===0.16.0 - sphinx-build -W -b $BUILDER docs public pages: @@ -23,7 +22,8 @@ pages: changes: &docs-or-ci - docs/**/* - .gitlab-ci.yml - # Paths from doxygen-wrapper.py + # All the source files documentation is extracted from + # git grep -h ":file: src/" -- docs | sort | uniq - src/compiler/nir/nir.h - src/intel/isl/**/* - src/vulkan/runtime/**/*
