From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: bluca@debian.org, thomas@monjalon.net, mb@smartsharesystems.com,
techboard@dpdk.org, Bruce Richardson <bruce.richardson@intel.com>
Subject: [dpdk-dev] [PATCH 2/3] build: process dependencies before main build check
Date: Wed, 25 Sep 2019 15:55:30 +0100 [thread overview]
Message-ID: <20190925145531.52705-3-bruce.richardson@intel.com> (raw)
In-Reply-To: <20190925145531.52705-1-bruce.richardson@intel.com>
If we want to add support for turning off components because of missing
dependencies, then we need to check for those dependencies before we
make a determination as to whether a component should be built or not,
assuming that the component says it should be built.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/meson.build | 27 ++++++++++++++-------------
lib/meson.build | 23 +++++++++++++----------
2 files changed, 27 insertions(+), 23 deletions(-)
diff --git a/drivers/meson.build b/drivers/meson.build
index b54601697..ee5db4157 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -59,6 +59,20 @@ foreach class:dpdk_driver_classes
# pull in driver directory which should assign to each of the above
subdir(drv_path)
+ if build
+ # get dependency objs from strings
+ shared_deps = ext_deps
+ static_deps = ext_deps
+ foreach d:deps
+ if not is_variable('shared_rte_' + d)
+ error('Missing internal dependency "@0@" for @1@ [@2@]'
+ .format(d, name, 'drivers/' + drv_path))
+ endif
+ shared_deps += [get_variable('shared_rte_' + d)]
+ static_deps += [get_variable('static_rte_' + d)]
+ endforeach
+ endif
+
if not build
# some driver directories are placeholders which
# are never built, so we allow suppression of the
@@ -78,19 +92,6 @@ foreach class:dpdk_driver_classes
cflags += '-DALLOW_EXPERIMENTAL_API'
endif
- # get dependency objs from strings
- shared_deps = []
- static_deps = []
- foreach d:deps
- if not is_variable('shared_rte_' + d)
- error('Missing dependency ' + d +
- ' for driver ' + lib_name)
- endif
- shared_deps += [get_variable('shared_rte_' + d)]
- static_deps += [get_variable('static_rte_' + d)]
- endforeach
- shared_deps += ext_deps
- static_deps += ext_deps
dpdk_extra_ldflags += pkgconfig_extra_libs
# generate pmdinfo sources by building a temporary
diff --git a/lib/meson.build b/lib/meson.build
index e5ff83893..fde2f5a02 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -66,6 +66,19 @@ foreach l:libraries
dir_name = 'librte_' + l
subdir(dir_name)
+ if build
+ shared_deps = ext_deps
+ static_deps = ext_deps
+ foreach d:deps
+ if not is_variable('shared_rte_' + d)
+ error('Missing internal dependency "@0@" for @1@ [@2@]'
+ .format(d, name, 'lib/' + dir_name))
+ endif
+ shared_deps += [get_variable('shared_rte_' + d)]
+ static_deps += [get_variable('static_rte_' + d)]
+ endforeach
+ endif
+
if not build
dpdk_libs_disabled += name
set_variable(name.underscorify() + '_disable_reason', reason)
@@ -82,16 +95,6 @@ foreach l:libraries
shared_dep = declare_dependency(include_directories: includes)
static_dep = shared_dep
else
- shared_deps = ext_deps
- static_deps = ext_deps
- foreach d:deps
- if not is_variable('shared_rte_' + d)
- error('Missing dependency ' + d +
- ' for library ' + libname)
- endif
- shared_deps += [get_variable('shared_rte_' + d)]
- static_deps += [get_variable('static_rte_' + d)]
- endforeach
if allow_experimental_apis
cflags += '-DALLOW_EXPERIMENTAL_API'
--
2.21.0
next prev parent reply other threads:[~2019-09-25 14:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-25 14:55 [dpdk-dev] [PATCH 0/3] RFC: Support disabling DPDK drivers in meson builds Bruce Richardson
2019-09-25 14:55 ` [dpdk-dev] [PATCH 1/3] build: align variable names between drivers and libs Bruce Richardson
2019-09-25 14:55 ` Bruce Richardson [this message]
2019-09-25 14:55 ` [dpdk-dev] [PATCH 3/3] build: support disabling drivers with meson Bruce Richardson
2022-01-06 8:23 ` Morten Brørup
2022-01-06 9:48 ` Thomas Monjalon
2022-01-06 10:10 ` Morten Brørup
2022-01-07 13:42 ` Bruce Richardson
2019-09-25 18:01 ` [dpdk-dev] [PATCH 0/3] RFC: Support disabling DPDK drivers in meson builds Luca Boccassi
2019-09-26 8:33 ` Bruce Richardson
2019-09-26 15:28 ` Morten Brørup
2019-10-23 21:24 ` Thomas Monjalon
2019-09-27 7:14 ` [dpdk-dev] [dpdk-techboard] " Maxime Coquelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190925145531.52705-3-bruce.richardson@intel.com \
--to=bruce.richardson@intel.com \
--cc=bluca@debian.org \
--cc=dev@dpdk.org \
--cc=mb@smartsharesystems.com \
--cc=techboard@dpdk.org \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).