build: print list of disabled components
When configuring with meson we print out a list of enabled components, but it is also useful to list out the disabled components and the reasons why. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Luca Boccassi <bluca@debian.org>
This commit is contained in:
parent
291d090364
commit
8baad6f884
|
@ -852,12 +852,15 @@ allow_experimental_apis
|
|||
build
|
||||
**Default Value = true**
|
||||
Used to optionally compile a library, based on its dependencies or
|
||||
environment. A simple example of use would be:
|
||||
environment. When set to "false" the ``reason`` value, explained below, should
|
||||
also be set to explain to the user why the component is not being built.
|
||||
A simple example of use would be:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
if not is_linux
|
||||
build = false
|
||||
reason = 'only supported on Linux'
|
||||
endif
|
||||
|
||||
|
||||
|
@ -938,6 +941,13 @@ objs
|
|||
objects that were compiled up as part of another target given in the
|
||||
included library ``meson.build`` file.
|
||||
|
||||
reason
|
||||
**Default Value = '<unknown reason>'**.
|
||||
This variable should be used when a library is not to be built i.e. when
|
||||
``build`` is set to "false", to specify the reason why a library will not be
|
||||
built. For missing dependencies this should be of the form
|
||||
``'missing dependency, "libname"'``.
|
||||
|
||||
version
|
||||
**Default Value = 1**.
|
||||
Specifies the ABI version of the library, and is used as the major
|
||||
|
@ -991,6 +1001,9 @@ pkgconfig_extra_libs
|
|||
using static libraries. Anything added here will be appended to the end
|
||||
of the ``pkgconfig --libs`` output.
|
||||
|
||||
reason
|
||||
As above.
|
||||
|
||||
sources [mandatory]
|
||||
As above
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ foreach class:dpdk_driver_classes
|
|||
|
||||
# set up empty variables used for build
|
||||
build = true # set to false to disable, e.g. missing deps
|
||||
reason = '<unknown reason>' # set if build == false to explain
|
||||
name = drv
|
||||
version = 1
|
||||
allow_experimental_apis = false
|
||||
|
@ -58,7 +59,16 @@ foreach class:dpdk_driver_classes
|
|||
# pull in driver directory which should assign to each of the above
|
||||
subdir(drv_path)
|
||||
|
||||
if build
|
||||
if not build
|
||||
# some driver directories are placeholders which
|
||||
# are never built, so we allow suppression of the
|
||||
# component disable printout in those cases
|
||||
if reason != ''
|
||||
dpdk_drvs_disabled += drv_path
|
||||
set_variable(drv_path.underscorify() +
|
||||
'_disable_reason', reason)
|
||||
endif
|
||||
else
|
||||
class_drivers += name
|
||||
|
||||
dpdk_conf.set(config_flag_fmt.format(name.to_upper()),1)
|
||||
|
|
|
@ -43,6 +43,7 @@ enabled_libs = [] # used to print summary at the end
|
|||
|
||||
foreach l:libraries
|
||||
build = true
|
||||
reason = '<unknown reason>' # set if build == false to explain why
|
||||
name = l
|
||||
version = 1
|
||||
allow_experimental_apis = false
|
||||
|
@ -65,7 +66,10 @@ foreach l:libraries
|
|||
dir_name = 'librte_' + l
|
||||
subdir(dir_name)
|
||||
|
||||
if build
|
||||
if not build
|
||||
dpdk_libs_disabled += name
|
||||
set_variable(name.underscorify() + '_disable_reason', reason)
|
||||
else
|
||||
enabled_libs += name
|
||||
dpdk_conf.set('RTE_LIBRTE_' + name.to_upper(), 1)
|
||||
install_headers(headers)
|
||||
|
|
15
meson.build
15
meson.build
|
@ -20,6 +20,8 @@ dpdk_driver_classes = []
|
|||
dpdk_drivers = []
|
||||
dpdk_extra_ldflags = []
|
||||
dpdk_app_link_libraries = []
|
||||
dpdk_libs_disabled = []
|
||||
dpdk_drvs_disabled = []
|
||||
|
||||
# configure the build, and make sure configs here and in config folder are
|
||||
# able to be included in any file. We also store a global array of include dirs
|
||||
|
@ -112,3 +114,16 @@ foreach class:dpdk_driver_classes
|
|||
endforeach
|
||||
endforeach
|
||||
message(output_message + '\n')
|
||||
|
||||
output_message = '\n=================\nContent Skipped\n=================\n'
|
||||
output_message += '\nlibs:\n\t'
|
||||
foreach lib:dpdk_libs_disabled
|
||||
reason = get_variable(lib.underscorify() + '_disable_reason')
|
||||
output_message += lib + ':\t' + reason + '\n\t'
|
||||
endforeach
|
||||
output_message += '\ndrivers:\n\t'
|
||||
foreach drv:dpdk_drvs_disabled
|
||||
reason = get_variable(drv.underscorify() + '_disable_reason')
|
||||
output_message += drv + ':\t' + reason + '\n\t'
|
||||
endforeach
|
||||
message(output_message + '\n')
|
||||
|
|
Loading…
Reference in a new issue