From: Bruce Richardson <bruce.richardson@intel.com> To: dev@dpdk.org Cc: david.marchand@redhat.com, Bruce Richardson <bruce.richardson@intel.com>, Stephen Hemminger <stephen@networkplumber.org>, Morten Brørup <mb@smartsharesystems.com> Subject: [PATCH v2 1/6] lib: allow recursive disabling of libs in build Date: Wed, 19 Jan 2022 18:09:57 +0000 Message-ID: <20220119181002.471195-2-bruce.richardson@intel.com> (raw) In-Reply-To: <20220119181002.471195-1-bruce.richardson@intel.com> Align the code in lib/meson.build with that in drivers/meson.build to enable recursive disabling of libraries, i.e. if library b depends on library a, disable library b if a is disabled (either explicitly or implicitly). This allows libraries to be optional even if other DPDK libs depend on them, something that was not previously possible. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Morten Brørup <mb@smartsharesystems.com> --- lib/meson.build | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/lib/meson.build b/lib/meson.build index fbaa6ef7c2..af4662e942 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -134,23 +134,29 @@ foreach l:libraries warning('Library name, "@0@", and directory name, "@1@", do not match'.format(name, l)) endif - if not build - dpdk_libs_disabled += name - set_variable(name.underscorify() + '_disable_reason', reason) - continue - endif - shared_deps = ext_deps static_deps = ext_deps foreach d:deps + if not build + break + endif if not is_variable('shared_rte_' + d) - error('Missing internal dependency "@0@" for @1@ [@2@]' + build = false + reason = 'missing internal dependency, "@0@"'.format(d) + message('Disabling @1@ [@2@]: missing internal dependency "@0@"' .format(d, name, 'lib/' + l)) + else + shared_deps += [get_variable('shared_rte_' + d)] + static_deps += [get_variable('static_rte_' + d)] endif - shared_deps += [get_variable('shared_rte_' + d)] - static_deps += [get_variable('static_rte_' + d)] endforeach + if not build + dpdk_libs_disabled += name + set_variable(name.underscorify() + '_disable_reason', reason) + continue + endif + enabled_libs += name dpdk_conf.set('RTE_LIB_' + name.to_upper(), 1) install_headers(headers) -- 2.32.0
next prev parent reply other threads:[~2022-01-19 18:33 UTC|newest] Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-01-13 17:39 [PATCH 0/6] allow more DPDK libraries to be disabled on build Bruce Richardson 2022-01-13 17:39 ` [PATCH 1/6] lib: allow recursive disabling of libs in build Bruce Richardson 2022-01-13 17:39 ` [PATCH 2/6] app/test: link unit test binary against all available libs Bruce Richardson 2022-01-19 16:51 ` David Marchand 2022-01-19 17:25 ` Bruce Richardson 2022-01-13 17:39 ` [PATCH 3/6] build: add node library to optional list Bruce Richardson 2022-01-13 17:39 ` [PATCH 4/6] build: add flow classification " Bruce Richardson 2022-01-13 17:39 ` [PATCH 5/6] build: add "packet framework" libs " Bruce Richardson 2022-01-13 17:39 ` [PATCH 6/6] build: add cfgfile library " Bruce Richardson 2022-01-13 18:26 ` [PATCH 0/6] allow more DPDK libraries to be disabled on build Stephen Hemminger 2022-01-14 8:07 ` Morten Brørup 2022-01-19 16:52 ` David Marchand 2022-01-19 18:09 ` [PATCH v2 0/6] allow more DPDK libs " Bruce Richardson 2022-01-19 18:09 ` Bruce Richardson [this message] 2022-01-19 18:09 ` [PATCH v2 2/6] app/test: link unit test binary against all available libs Bruce Richardson 2022-01-19 18:09 ` [PATCH v2 3/6] build: add node library to optional list Bruce Richardson 2022-01-19 18:10 ` [PATCH v2 4/6] build: add flow classification " Bruce Richardson 2022-01-19 18:10 ` [PATCH v2 5/6] build: add "packet framework" libs " Bruce Richardson 2022-01-19 18:10 ` [PATCH v2 6/6] build: add cfgfile library " Bruce Richardson 2022-01-20 10:53 ` [PATCH v2 0/6] allow more DPDK libs to be disabled on build David Marchand 2022-01-21 13:04 ` David Marchand
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=20220119181002.471195-2-bruce.richardson@intel.com \ --to=bruce.richardson@intel.com \ --cc=david.marchand@redhat.com \ --cc=dev@dpdk.org \ --cc=mb@smartsharesystems.com \ --cc=stephen@networkplumber.org \ /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
DPDK patches and discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \ dev@dpdk.org public-inbox-index dev Example config snippet for mirrors. Newsgroup available over NNTP: nntp://inbox.dpdk.org/inbox.dpdk.dev AGPL code for this site: git clone https://public-inbox.org/public-inbox.git