[v2,5/6] build: install indirect headers to a dedicated directory
Checks
Commit Message
The headers check currently skips "indirect" headers as instructed 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(-)
@@ -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 += [get_option('include_subdir_arch')]
+ 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)
@@ -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
@@ -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