DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] build: add configuration summary at end of config
@ 2018-08-29 16:19 Bruce Richardson
  2018-09-17 11:55 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Bruce Richardson @ 2018-08-29 16:19 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

After running meson to configure a DPDK build, it can be useful to know
what was automatically enabled or disabled. Therefore, print out by way of
summary a categorised list of libraries and drivers to be built.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/meson.build |  5 +++++
 lib/meson.build     |  3 +++
 meson.build         | 31 +++++++++++++++++++++++++++++++
 3 files changed, 39 insertions(+)

diff --git a/drivers/meson.build b/drivers/meson.build
index f94e2fe67..b6ce974de 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -24,6 +24,7 @@ foreach class:driver_classes
 	                     # version file for linking
 
 	subdir(class)
+	class_drivers = []
 
 	foreach drv:drivers
 		drv_path = join_paths(class, drv)
@@ -51,6 +52,8 @@ foreach class:driver_classes
 		subdir(drv_path)
 
 		if build
+			class_drivers += name
+
 			dpdk_conf.set(config_flag_fmt.format(name.to_upper()),1)
 			lib_name = driver_name_fmt.format(name)
 
@@ -141,4 +144,6 @@ foreach class:driver_classes
 			set_variable('static_@0@'.format(lib_name), static_dep)
 		endif # build
 	endforeach
+
+	set_variable(class + '_drivers', class_drivers)
 endforeach
diff --git a/lib/meson.build b/lib/meson.build
index 71f35d162..3acc67e6e 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -30,6 +30,8 @@ default_cflags = machine_args
 if cc.has_argument('-Wno-format-truncation')
 	default_cflags += '-Wno-format-truncation'
 endif
+
+enabled_libs = [] # used to print summary at the end
 foreach l:libraries
 	build = true
 	name = l
@@ -55,6 +57,7 @@ foreach l:libraries
 	subdir(dir_name)
 
 	if build
+		enabled_libs += name
 		dpdk_conf.set('RTE_LIBRTE_' + name.to_upper(), 1)
 		install_headers(headers)
 
diff --git a/meson.build b/meson.build
index 84af32ece..7332e75b5 100644
--- a/meson.build
+++ b/meson.build
@@ -73,3 +73,34 @@ pkg.generate(name: meson.project_name(),
 	subdirs: [get_option('include_subdir_arch'), '.'],
 	extra_cflags: ['-include', 'rte_config.h'] + machine_args
 )
+
+# final output, list all the libs and drivers to be built
+# this does not affect any part of the build, for information only.
+output_message = '\n=================\nLibraries Enabled\n=================\n'
+output_message += '\nlibs:\n\t'
+output_count = 0
+foreach lib:enabled_libs
+	output_message += lib + ', '
+	output_count += 1
+	if output_count == 8
+		output_message += '\n\t'
+		output_count = 0
+	endif
+endforeach
+message(output_message + '\n')
+
+output_message = '\n===============\nDrivers Enabled\n===============\n'
+foreach class:driver_classes
+	class_drivers = get_variable(class + '_drivers')
+	output_message += '\n' + class + ':\n\t'
+	output_count = 0
+	foreach drv:class_drivers
+		output_message += drv + ', '
+		output_count += 1
+		if output_count == 8
+			output_message += '\n\t'
+			output_count = 0
+		endif
+	endforeach
+endforeach
+message(output_message + '\n')
-- 
2.11.0

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] build: add configuration summary at end of config
  2018-08-29 16:19 [dpdk-dev] [PATCH] build: add configuration summary at end of config Bruce Richardson
@ 2018-09-17 11:55 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2018-09-17 11:55 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

29/08/2018 18:19, Bruce Richardson:
> After running meson to configure a DPDK build, it can be useful to know
> what was automatically enabled or disabled. Therefore, print out by way of
> summary a categorised list of libraries and drivers to be built.
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-09-17 11:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-29 16:19 [dpdk-dev] [PATCH] build: add configuration summary at end of config Bruce Richardson
2018-09-17 11:55 ` Thomas Monjalon

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).