build: list selected applications
With the addition of enable/disable_apps meson options, it is a bit harder to figure out which application is built, and why. Display the list of applications in the same way we do for drivers and libraries. Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Markus Theil <markus.theil@secunet.com>
This commit is contained in:
parent
e9cc7c7abc
commit
ecf7518017
@ -1,8 +1,14 @@
|
|||||||
# SPDX-License-Identifier: BSD-3-Clause
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
# Copyright(c) 2017-2019 Intel Corporation
|
# Copyright(c) 2017-2019 Intel Corporation
|
||||||
|
|
||||||
enabled_apps = get_option('enable_apps')
|
disable_apps = ',' + get_option('disable_apps')
|
||||||
disabled_apps = get_option('disable_apps')
|
disable_apps = run_command(list_dir_globs, disable_apps, check: true).stdout().split()
|
||||||
|
|
||||||
|
enable_apps = ',' + get_option('enable_apps')
|
||||||
|
enable_apps = run_command(list_dir_globs, enable_apps, check: true).stdout().split()
|
||||||
|
if enable_apps.length() == 0
|
||||||
|
enable_apps = run_command(list_dir_globs, '*', check: true).stdout().split()
|
||||||
|
endif
|
||||||
|
|
||||||
apps = [
|
apps = [
|
||||||
'dumpcap',
|
'dumpcap',
|
||||||
@ -29,13 +35,12 @@ if get_option('default_library') == 'static' and not is_windows
|
|||||||
default_ldflags += ['-Wl,--export-dynamic']
|
default_ldflags += ['-Wl,--export-dynamic']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
enabled_apps = [] # used to print summary at the end
|
||||||
|
|
||||||
foreach app:apps
|
foreach app:apps
|
||||||
build = enabled_apps == '' or enabled_apps.contains(app)
|
|
||||||
# let disabled_apps override enabled_apps
|
|
||||||
if disabled_apps != ''
|
|
||||||
build = build and not disabled_apps.contains(app)
|
|
||||||
endif
|
|
||||||
name = app
|
name = app
|
||||||
|
build = true
|
||||||
|
reason = '<unknown reason>' # set if build == false to explain
|
||||||
sources = []
|
sources = []
|
||||||
includes = []
|
includes = []
|
||||||
cflags = default_cflags
|
cflags = default_cflags
|
||||||
@ -48,11 +53,17 @@ foreach app:apps
|
|||||||
ext_deps = []
|
ext_deps = []
|
||||||
deps = []
|
deps = []
|
||||||
|
|
||||||
if not build
|
if not enable_apps.contains(app)
|
||||||
continue
|
build = false
|
||||||
|
reason = 'not in enabled apps build config'
|
||||||
|
elif disable_apps.contains(app)
|
||||||
|
build = false
|
||||||
|
reason = 'explicitly disabled via build config'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if build
|
||||||
subdir(name)
|
subdir(name)
|
||||||
|
endif
|
||||||
|
|
||||||
if build
|
if build
|
||||||
dep_objs = []
|
dep_objs = []
|
||||||
@ -60,6 +71,7 @@ foreach app:apps
|
|||||||
var_name = get_option('default_library') + '_rte_' + d
|
var_name = get_option('default_library') + '_rte_' + d
|
||||||
if not is_variable(var_name)
|
if not is_variable(var_name)
|
||||||
build = false
|
build = false
|
||||||
|
reason = 'missing internal dependency, "@0@"'.format(d)
|
||||||
message('Missing dependency "@0@" for app "@1@"'.format(d, name))
|
message('Missing dependency "@0@" for app "@1@"'.format(d, name))
|
||||||
break
|
break
|
||||||
endif
|
endif
|
||||||
@ -68,9 +80,14 @@ foreach app:apps
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if not build
|
if not build
|
||||||
|
if reason != ''
|
||||||
|
dpdk_apps_disabled += app
|
||||||
|
set_variable(app.underscorify() + '_disable_reason', reason)
|
||||||
|
endif
|
||||||
continue
|
continue
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
enabled_apps += app
|
||||||
link_libs = []
|
link_libs = []
|
||||||
if get_option('default_library') == 'static'
|
if get_option('default_library') == 'static'
|
||||||
link_libs = dpdk_static_libraries + dpdk_drivers
|
link_libs = dpdk_static_libraries + dpdk_drivers
|
||||||
|
23
meson.build
23
meson.build
@ -42,6 +42,7 @@ dpdk_driver_classes = []
|
|||||||
dpdk_drivers = []
|
dpdk_drivers = []
|
||||||
dpdk_extra_ldflags = []
|
dpdk_extra_ldflags = []
|
||||||
dpdk_libs_deprecated = []
|
dpdk_libs_deprecated = []
|
||||||
|
dpdk_apps_disabled = []
|
||||||
dpdk_libs_disabled = []
|
dpdk_libs_disabled = []
|
||||||
dpdk_drvs_disabled = []
|
dpdk_drvs_disabled = []
|
||||||
testpmd_drivers_sources = []
|
testpmd_drivers_sources = []
|
||||||
@ -115,8 +116,21 @@ if meson.is_subproject()
|
|||||||
subdir('buildtools/subproject')
|
subdir('buildtools/subproject')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# final output, list all the libs and drivers to be built
|
# Final output, list all the parts to be built.
|
||||||
# this does not affect any part of the build, for information only.
|
# This does not affect any part of the build, for information only.
|
||||||
|
output_message = '\n=================\nApplications Enabled\n=================\n'
|
||||||
|
output_message += '\napps:\n\t'
|
||||||
|
output_count = 0
|
||||||
|
foreach app:enabled_apps
|
||||||
|
output_message += app + ', '
|
||||||
|
output_count += 1
|
||||||
|
if output_count == 8
|
||||||
|
output_message += '\n\t'
|
||||||
|
output_count = 0
|
||||||
|
endif
|
||||||
|
endforeach
|
||||||
|
message(output_message + '\n')
|
||||||
|
|
||||||
output_message = '\n=================\nLibraries Enabled\n=================\n'
|
output_message = '\n=================\nLibraries Enabled\n=================\n'
|
||||||
output_message += '\nlibs:\n\t'
|
output_message += '\nlibs:\n\t'
|
||||||
output_count = 0
|
output_count = 0
|
||||||
@ -147,6 +161,11 @@ endforeach
|
|||||||
message(output_message + '\n')
|
message(output_message + '\n')
|
||||||
|
|
||||||
output_message = '\n=================\nContent Skipped\n=================\n'
|
output_message = '\n=================\nContent Skipped\n=================\n'
|
||||||
|
output_message += '\napps:\n\t'
|
||||||
|
foreach app:dpdk_apps_disabled
|
||||||
|
reason = get_variable(app.underscorify() + '_disable_reason')
|
||||||
|
output_message += app + ':\t' + reason + '\n\t'
|
||||||
|
endforeach
|
||||||
output_message += '\nlibs:\n\t'
|
output_message += '\nlibs:\n\t'
|
||||||
foreach lib:dpdk_libs_disabled
|
foreach lib:dpdk_libs_disabled
|
||||||
reason = get_variable(lib.underscorify() + '_disable_reason')
|
reason = get_variable(lib.underscorify() + '_disable_reason')
|
||||||
|
Loading…
Reference in New Issue
Block a user