From: Bruce Richardson Date: Fri, 20 Jul 2018 13:28:25 +0000 (+0100) Subject: build: improve error message for missing dependency X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=203b61dc5e18;p=dpdk.git build: improve error message for missing dependency When building a driver or library and a required internal dependency is missing, the error message printed was: Tried to get unknown variable "shared_rte_". However, a better way to handle this is to catch the missing variable earlier and convert it into a proper message, informing the user that the required dependency is missing, and most importantly, what library or driver wanted that dependency. Signed-off-by: Bruce Richardson --- diff --git a/drivers/meson.build b/drivers/meson.build index 1737d86b88..27d66cf76e 100644 --- a/drivers/meson.build +++ b/drivers/meson.build @@ -61,6 +61,10 @@ foreach class:driver_classes shared_objs = [] static_objs = [] foreach d:deps + if not is_variable('shared_rte_' + d) + error('Missing dependency ' + d + + ' for driver ' + lib_name) + endif shared_objs += [get_variable('shared_rte_' + d)] static_objs += [get_variable('static_rte_' + d)] endforeach diff --git a/lib/meson.build b/lib/meson.build index d88b0211e9..eeac10e2b1 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -71,6 +71,10 @@ foreach l:libraries shared_deps = ext_deps static_deps = ext_deps foreach d:deps + if not is_variable('shared_rte_' + d) + error('Missing dependency ' + d + + ' for library ' + lib_name) + endif shared_deps += [get_variable('shared_rte_' + d)] static_deps += [get_variable('static_rte_' + d)] endforeach