From f2546384c86490631461b6b5f0dc8d0636c49e2f Mon Sep 17 00:00:00 2001 From: "David B. Kinder" Date: Thu, 5 Nov 2020 15:35:19 -0800 Subject: [PATCH] doc: fix breathe config for C vs CPP Breathe and doxygen work best for C++, but we're using C. This shows up as API documentaiton having a C++ flavor (modules and classes) instead of the expected C flavor. We really need to upgrade the versions of doxygen and breathe to newer versions, and this configuration tweak prepares for this. (It will need CI coordination to update these tools, but the changes in this PR are compatible with the current older tools.) Signed-off-by: David B. Kinder --- doc/.known-issues/doc/dupdecl.conf | 2 ++ doc/conf.py | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/doc/.known-issues/doc/dupdecl.conf b/doc/.known-issues/doc/dupdecl.conf index c71875da3..33873b5be 100644 --- a/doc/.known-issues/doc/dupdecl.conf +++ b/doc/.known-issues/doc/dupdecl.conf @@ -6,5 +6,7 @@ # Sphinx 2.0 ^(?P[-._/\w]+/hld/[-._/\w]+.rst):(?P[0-9]+): WARNING: Duplicate declaration, .* # +^(?P[-._/\w]+/hld/[-._/\w]+.rst):(?P[0-9]+): WARNING: duplicate C object description.* +# ^(?P[-._/\w]+/hld/[-._/\w]+.rst):(?P[0-9]+): WARNING: Duplicate C\+\+ declaration, .* ^Declaration is .* diff --git a/doc/conf.py b/doc/conf.py index e00ec5c92..140a83347 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -318,7 +318,21 @@ breathe_projects = { "Project ACRN" : "doxygen/xml", } breathe_default_project = "Project ACRN" -breathe_default_members = ('members', 'undoc-members', 'content-only') +# breathe_default_members = ('members', 'undoc-members', 'content-only') +breathe_domain_by_extension = { + "h": "c", + "c": "c", +} + +cpp_id_attributes = [ + '__syscall', '__deprecated', '__may_alias', + '__used', '__unused', '__weak', + '__DEPRECATED_MACRO', 'FUNC_NORETURN', + '__subsystem', +] +c_id_attributes = cpp_id_attributes + + # Custom added feature to allow redirecting old URLs (caused by