dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net, bruce.richardson@intel.com,
	Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
Subject: [RFC 5/6] build: install indirect headers to a dedicated directory
Date: Wed, 27 Nov 2024 12:26:15 +0100	[thread overview]
Message-ID: <20241127112617.1331125-6-david.marchand@redhat.com> (raw)
In-Reply-To: <20241127112617.1331125-1-david.marchand@redhat.com>

The headers check currently skips "indirect" headers as instrusted via
the indirect_headers meson variable.

This headers check has some limitation that will be addressed in a next
change by inspected all exported headers.
However, exported headers lack the information about "indirect" quality.

Separate "indirect" headers by exporting them in a internal/ sub directory.
This also makes it more obvious which headers are not to be directly used
by an application.

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 buildtools/pkg-config/meson.build | 8 +++++++-
 lib/eal/x86/include/meson.build   | 3 ++-
 lib/meson.build                   | 2 +-
 3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/buildtools/pkg-config/meson.build b/buildtools/pkg-config/meson.build
index b36add17e3..809706fe3e 100644
--- a/buildtools/pkg-config/meson.build
+++ b/buildtools/pkg-config/meson.build
@@ -27,12 +27,18 @@ endif
 # are skipped in the case of static linkage thanks to the flag --as-needed.
 
 
+subdirs = [ '.', 'internal' ]
+if get_option('include_subdir_arch') != ''
+    subdirs = [ subdirs, get_option('include_subdir_arch') ]
+    subdirs = [ subdirs, join_paths(get_option('include_subdir_arch'), 'internal')]
+endif
+
 pkg.generate(name: 'dpdk-libs',
         filebase: 'libdpdk-libs',
         description: '''Internal-only DPDK pkgconfig file. Not for direct use.
 Use libdpdk.pc instead of this file to query DPDK compile/link arguments''',
         version: meson.project_version(),
-        subdirs: [get_option('include_subdir_arch'), '.'],
+        subdirs: subdirs,
         extra_cflags: pkg_extra_cflags,
         libraries: ['-Wl,--as-needed'] + dpdk_libraries,
         libraries_private: dpdk_extra_ldflags)
diff --git a/lib/eal/x86/include/meson.build b/lib/eal/x86/include/meson.build
index 52d2f8e969..a100330208 100644
--- a/lib/eal/x86/include/meson.build
+++ b/lib/eal/x86/include/meson.build
@@ -22,5 +22,6 @@ arch_indirect_headers = files(
         'rte_byteorder_32.h',
         'rte_byteorder_64.h',
 )
-install_headers(arch_headers + arch_indirect_headers, subdir: get_option('include_subdir_arch'))
+install_headers(arch_headers, subdir: get_option('include_subdir_arch'))
+install_headers(arch_indirect_headers, subdir: join_paths(get_option('include_subdir_arch'), 'internal'))
 dpdk_chkinc_headers += arch_headers
diff --git a/lib/meson.build b/lib/meson.build
index ce92cb5537..78ada7782e 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -202,7 +202,7 @@ foreach l:libraries
     dpdk_libs_enabled += name
     dpdk_conf.set('RTE_LIB_' + name.to_upper(), 1)
     install_headers(headers)
-    install_headers(indirect_headers)
+    install_headers(indirect_headers, subdir: 'internal')
     if get_option('enable_driver_sdk')
         install_headers(driver_sdk_headers)
     endif
-- 
2.47.0


  parent reply	other threads:[~2024-11-27 11:27 UTC|newest]

Thread overview: 101+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-27 11:26 [RFC 0/6] Add a stricter headers check David Marchand
2024-11-27 11:26 ` [RFC 1/6] baseband/acc: fix exported header David Marchand
2024-11-27 11:26 ` [RFC 2/6] drivers: drop export of driver headers David Marchand
2024-11-27 11:26 ` [RFC 3/6] eventdev: do not include driver header in DMA adapter David Marchand
2024-11-27 13:49   ` [EXTERNAL] " Amit Prakash Shukla
2024-11-27 11:26 ` [RFC 4/6] drivers: fix exported headers David Marchand
2024-11-27 11:26 ` David Marchand [this message]
2024-11-27 11:42   ` [RFC 5/6] build: install indirect headers to a dedicated directory Bruce Richardson
2024-12-10 13:36     ` David Marchand
2024-11-27 11:26 ` [RFC 6/6] buildtools: externally check exported headers David Marchand
2024-12-13 10:50 ` [PATCH v2 0/6] Add a stricter headers check David Marchand
2024-12-13 10:50   ` [PATCH v2 1/6] baseband/acc: fix exported header David Marchand
2024-12-13 11:01     ` Bruce Richardson
2024-12-13 10:50   ` [PATCH v2 2/6] drivers: drop export of driver headers David Marchand
2024-12-13 11:03     ` Bruce Richardson
2024-12-16  9:13       ` Andrew Rybchenko
2024-12-13 10:50   ` [PATCH v2 3/6] eventdev: do not include driver header in DMA adapter David Marchand
2024-12-13 11:04     ` Bruce Richardson
2024-12-13 10:50   ` [PATCH v2 4/6] drivers: fix exported headers David Marchand
2024-12-13 11:14     ` Bruce Richardson
2024-12-13 13:46       ` David Marchand
2024-12-16  8:15         ` David Marchand
2024-12-13 17:10     ` Stephen Hemminger
2024-12-13 10:50   ` [PATCH v2 5/6] build: install indirect headers to a dedicated directory David Marchand
2024-12-13 10:50   ` [PATCH v2 6/6] buildtools: externally check exported headers David Marchand
2024-12-13 11:27   ` [PATCH v2 0/6] Add a stricter headers check Bruce Richardson
2024-12-13 13:38     ` David Marchand
2025-09-24 17:25 ` [PATCH v3 0/7] " David Marchand
2025-09-24 17:25   ` [PATCH v3 1/7] baseband/acc: fix exported header David Marchand
2025-09-24 17:25   ` [PATCH v3 2/7] drivers: drop export of driver headers David Marchand
2025-09-24 17:25   ` [PATCH v3 3/7] eventdev: do not include driver header in DMA adapter David Marchand
2025-09-24 17:25   ` [PATCH v3 4/7] gpudev: fix driver header for Windows David Marchand
2025-09-25  7:53     ` Bruce Richardson
2025-09-25  8:43       ` David Marchand
2025-09-24 17:25   ` [PATCH v3 5/7] drivers: fix some exported headers David Marchand
2025-09-24 17:25   ` [PATCH v3 6/7] buildtools/chkincs: use a staging directory for headers David Marchand
2025-09-25  8:00     ` Bruce Richardson
2025-09-25  8:42       ` David Marchand
2025-09-25  9:22         ` Bruce Richardson
2025-09-25 10:29           ` David Marchand
2025-09-25 10:31             ` Bruce Richardson
2025-09-25  9:31         ` Bruce Richardson
2025-09-25 10:17           ` Morten Brørup
2025-09-25 10:22             ` Bruce Richardson
2025-09-25 10:22           ` David Marchand
2025-09-25 10:31             ` Bruce Richardson
2025-09-24 17:25   ` [PATCH v3 7/7] power: separate public and driver headers David Marchand
2025-09-25 12:31 ` [PATCH v4 0/7] Add a stricter headers check David Marchand
2025-09-25 12:31   ` [PATCH v4 1/7] baseband/acc: fix exported header David Marchand
2025-09-25 12:31   ` [PATCH v4 2/7] drivers: drop export of driver headers David Marchand
2025-09-25 12:34     ` [EXTERNAL] " Akhil Goyal
2025-09-25 12:31   ` [PATCH v4 3/7] eventdev: do not include driver header in DMA adapter David Marchand
2025-09-25 12:31   ` [PATCH v4 4/7] gpudev: fix driver header for Windows David Marchand
2025-09-25 12:43     ` Bruce Richardson
2025-09-25 12:31   ` [PATCH v4 5/7] drivers: fix some exported headers David Marchand
2025-09-25 12:44     ` Bruce Richardson
2025-09-25 12:31   ` [PATCH v4 6/7] buildtools/chkincs: use a staging directory for headers David Marchand
2025-09-25 14:46     ` Bruce Richardson
2025-09-26  8:14       ` David Marchand
2025-09-26  9:06         ` Bruce Richardson
2025-09-26  9:18           ` David Marchand
2025-09-25 12:31   ` [PATCH v4 7/7] power: separate public and driver headers David Marchand
2025-09-26 12:40 ` [PATCH v5 0/9] Add a stricter headers check David Marchand
2025-09-26 12:40   ` [PATCH v5 1/9] baseband/acc: fix exported header David Marchand
2025-09-26 12:40   ` [PATCH v5 2/9] drivers: drop export of driver headers David Marchand
2025-09-26 12:40   ` [PATCH v5 3/9] eventdev: do not include driver header in DMA adapter David Marchand
2025-09-26 12:40   ` [PATCH v5 4/9] gpudev: fix driver header for Windows David Marchand
2025-09-26 12:40   ` [PATCH v5 5/9] drivers: fix some exported headers David Marchand
2025-09-26 12:40   ` [PATCH v5 6/9] eal/arm: fix C++ build for 32-bit memcpy David Marchand
2025-09-26 13:01     ` Bruce Richardson
2025-09-26 19:55     ` Morten Brørup
2025-09-27  6:33     ` Mattias Rönnblom
2025-09-26 12:41   ` [PATCH v5 7/9] build: factorize headers installation David Marchand
2025-09-26 13:08     ` Bruce Richardson
2025-09-26 12:41   ` [PATCH v5 8/9] buildtools/chkincs: use a staging directory for headers David Marchand
2025-09-29  8:16     ` Bruce Richardson
2025-09-29  9:06       ` David Marchand
2025-09-29  9:43         ` Bruce Richardson
2025-09-26 12:41   ` [PATCH v5 9/9] power: separate public and driver headers David Marchand
2025-09-29  8:17     ` Bruce Richardson
2025-09-30  6:57 ` [PATCH v6 0/9] Add a stricter headers check David Marchand
2025-09-30  6:57   ` [PATCH v6 1/9] baseband/acc: fix exported header David Marchand
2025-09-30  6:57   ` [PATCH v6 2/9] drivers: drop export of driver headers David Marchand
2025-09-30  6:57   ` [PATCH v6 3/9] eventdev: do not include driver header in DMA adapter David Marchand
2025-09-30  6:57   ` [PATCH v6 4/9] gpudev: fix driver header for Windows David Marchand
2025-09-30  6:57   ` [PATCH v6 5/9] drivers: fix some exported headers David Marchand
2025-09-30  6:57   ` [PATCH v6 6/9] eal/arm: fix C++ build for 32-bit memcpy David Marchand
2025-09-30  6:57   ` [PATCH v6 7/9] build: factorize headers installation David Marchand
2025-09-30  6:57   ` [PATCH v6 8/9] buildtools/chkincs: use a staging directory for headers David Marchand
2025-09-30  6:57   ` [PATCH v6 9/9] power: separate public and driver headers David Marchand
2025-10-01  6:45 ` [PATCH v7 0/9] Add a stricter headers check David Marchand
2025-10-01  6:45   ` [PATCH v7 1/9] baseband/acc: fix exported header David Marchand
2025-10-01  6:45   ` [PATCH v7 2/9] drivers: drop export of driver headers David Marchand
2025-10-01  6:45   ` [PATCH v7 3/9] eventdev: do not include driver header in DMA adapter David Marchand
2025-10-01  6:45   ` [PATCH v7 4/9] gpudev: fix driver header for Windows David Marchand
2025-10-01  6:45   ` [PATCH v7 5/9] drivers: fix some exported headers David Marchand
2025-10-01  6:45   ` [PATCH v7 6/9] eal/arm: fix C++ build for 32-bit memcpy David Marchand
2025-10-01  6:45   ` [PATCH v7 7/9] build: factorize headers installation David Marchand
2025-10-01  6:45   ` [PATCH v7 8/9] buildtools/chkincs: use a staging directory for headers David Marchand
2025-10-01  6:45   ` [PATCH v7 9/9] power: separate public and driver headers David Marchand
2025-10-02 13:21   ` [PATCH v7 0/9] Add a stricter headers check David Marchand

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=20241127112617.1331125-6-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.v.ananyev@yandex.ru \
    --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;
as well as URLs for NNTP newsgroup(s).