DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Marat Khalili <marat.khalili@huawei.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: <dev@dpdk.org>, <thomas@monjalon.net>
Subject: [PATCH v2 1/7] doc: detect ignored public headers
Date: Mon, 6 Jul 2026 11:52:49 +0100	[thread overview]
Message-ID: <20260706105256.79904-2-marat.khalili@huawei.com> (raw)
In-Reply-To: <20260706105256.79904-1-marat.khalili@huawei.com>

Some public headers were omitted from doc/api/doxy-api-index.md and/or
doc/api/doxy-api.conf.in. Add checks to meson configuration detecting
and warning about these.

Suggested-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Marat Khalili <marat.khalili@huawei.com>
---
 drivers/meson.build | 17 +++++++++++++++++
 lib/meson.build     | 23 +++++++++++++++++++++++
 meson.build         | 19 +++++++++++++++++++
 3 files changed, 59 insertions(+)

diff --git a/drivers/meson.build b/drivers/meson.build
index 102a8262e588..09c063660291 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -287,6 +287,23 @@ foreach subpath:subdirs
         dpdk_headers += headers
         dpdk_drivers_headers += driver_sdk_headers
 
+        if check_docs and headers.length() > 0
+            foreach h:headers
+                hname = fs.name(h)
+                if not hname.startswith('rte_')
+                    warning('public header @0@ name does not start with "rte_"'.format(h))
+                endif
+                if hname not in doc_indexed_headers
+                    warning('public header @0@ is not listed in @1@'.format(h, doc_index_path))
+                endif
+            endforeach
+            doc_dir = 'drivers/' + drv_path
+            if doc_dir not in doc_built_dirs
+                warning('public header directory @0@ is not listed in @1@'.format(doc_dir,
+                    doc_build_path))
+            endif
+        endif
+
         if headers.length() > 0
             dpdk_includes += include_directories(drv_path)
         endif
diff --git a/lib/meson.build b/lib/meson.build
index af5c160cb800..ff5c474d2cc3 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -209,6 +209,29 @@ foreach l:libraries
     dpdk_indirect_headers += indirect_headers
     dpdk_drivers_headers += driver_sdk_headers
 
+    if check_docs and headers.length() > 0
+        foreach h:headers
+            hname = fs.name(h)
+            if not (hname.startswith('rte_') or hname.startswith('cmdline'))
+                warning('public header @0@ name does not start with "rte_" or "cmdline"'.format(h))
+            endif
+            if hname not in doc_indexed_headers
+                warning('public header @0@ is not listed in @1@'.format(h, doc_index_path))
+            endif
+        endforeach
+        if l == 'eal'
+            doc_dirs = ['lib/eal/include', 'lib/eal/include/generic']
+        else
+            doc_dirs = ['lib/' + l]
+        endif
+        foreach d:doc_dirs
+            if d not in doc_built_dirs
+                warning('public header directory @0@ is not listed in @1@'.format(doc_dir,
+                    doc_build_path))
+            endif
+        endforeach
+    endif
+
     libname = 'rte_' + name
     includes += include_directories(l)
     dpdk_includes += include_directories(l)
diff --git a/meson.build b/meson.build
index b01010ffa076..2488c54f1b17 100644
--- a/meson.build
+++ b/meson.build
@@ -88,6 +88,25 @@ if is_linux
     global_inc += include_directories('kernel/linux')
 endif
 
+# on linux, try to check that documentation sources are correctly built and indexed
+check_docs = is_linux and meson.version().version_compare('>= 0.60.0')
+
+if check_docs
+    doc_build_path = 'doc/api/doxy-api.conf.in'
+    doc_build_file = dpdk_source_root / doc_build_path
+    doc_built_dirs = run_command('sed', '--regexp-extended', '--quiet',
+        # Extract and print the file path immediately following @TOPDIR@/ .
+        's#^(INPUT *=)? *@TOPDIR@/([^ ]*)( .*|\\\\|)$#\\2#p',
+        doc_build_file, check: true).stdout().strip('\n').split('\n')
+
+    doc_index_path = 'doc/api/doxy-api-index.md'
+    doc_index_file = dpdk_source_root / doc_index_path
+    doc_indexed_headers = run_command('sed', '--regexp-extended', '--quiet',
+        # Extract and print the (@ref ...) contents.
+        's#^.*\\(@ref ([^)]*)\\).*$#\\1#p',
+        doc_index_file, check: true).stdout().strip('\n').split('\n')
+endif
+
 # build libs and drivers
 subdir('lib')
 subdir('drivers')
-- 
2.43.0


  reply	other threads:[~2026-07-06 10:54 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-30  9:03 [RFC] doc: updating doxy-api-index.md and doxy-api.conf.in Marat Khalili
2026-06-30 16:10 ` Thomas Monjalon
2026-06-30 16:45   ` Bruce Richardson
2026-07-02 20:00 ` [PATCH 0/7] doc: build for all public headers Marat Khalili
2026-07-02 20:00   ` [PATCH 1/7] doc: detect ignored " Marat Khalili
2026-07-02 20:00   ` [PATCH 2/7] doc: document rte_os.h Marat Khalili
2026-07-02 20:00   ` [PATCH 3/7] doc: fix typos in rte_bus_pci.h Marat Khalili
2026-07-02 20:00   ` [PATCH 4/7] doc: fix typos in rte_bus_vmbus.h Marat Khalili
2026-07-02 20:00   ` [PATCH 5/7] doc: add missing globs to doxy-api.conf.in Marat Khalili
2026-07-02 20:00   ` [PATCH 6/7] doc: add missing drivers " Marat Khalili
2026-07-02 20:00   ` [PATCH 7/7] doc: add missing headers to doxy-api-index.md Marat Khalili
2026-07-06 10:52   ` [PATCH v2 0/7] doc: build for all public headers Marat Khalili
2026-07-06 10:52     ` Marat Khalili [this message]
2026-07-06 10:52     ` [PATCH v2 2/7] doc: document rte_os.h Marat Khalili
2026-07-06 10:52     ` [PATCH v2 3/7] doc: fix typos in rte_bus_pci.h Marat Khalili
2026-07-06 10:52     ` [PATCH v2 4/7] doc: fix typos in rte_bus_vmbus.h Marat Khalili
2026-07-06 10:52     ` [PATCH v2 5/7] doc: add missing globs to doxy-api.conf.in Marat Khalili
2026-07-06 10:52     ` [PATCH v2 6/7] doc: add missing drivers " Marat Khalili
2026-07-06 10:52     ` [PATCH v2 7/7] doc: add missing headers to doxy-api-index.md Marat Khalili
2026-07-06 13:14     ` [PATCH v2 0/7] doc: build for all public headers Marat Khalili
2026-07-07  8:50     ` [PATCH v3 0/8] " Marat Khalili
2026-07-07  8:50       ` [PATCH v3 1/8] doc: detect ignored " Marat Khalili
2026-07-07  8:50       ` [PATCH v3 2/8] doc: document rte_os.h Marat Khalili
2026-07-07  8:50       ` [PATCH v3 3/8] doc: fix typos in rte_avp_common.h Marat Khalili
2026-07-07  8:50       ` [PATCH v3 4/8] doc: fix typos in rte_bus_pci.h Marat Khalili
2026-07-07  8:50       ` [PATCH v3 5/8] doc: fix typos in rte_bus_vmbus.h Marat Khalili
2026-07-07  8:50       ` [PATCH v3 6/8] doc: add missing globs to doxy-api.conf.in Marat Khalili
2026-07-07  8:50       ` [PATCH v3 7/8] doc: add missing drivers " Marat Khalili
2026-07-07  8:50       ` [PATCH v3 8/8] doc: add missing headers to doxy-api-index.md Marat Khalili

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260706105256.79904-2-marat.khalili@huawei.com \
    --to=marat.khalili@huawei.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox