DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: dev <dev@dpdk.org>, "Yigit, Ferruh" <ferruh.yigit@intel.com>,
	 Thomas Monjalon <thomas@monjalon.net>,
	David Hunt <david.hunt@intel.com>,
	 Maxime Coquelin <maxime.coquelin@redhat.com>,
	Chenbo Xia <chenbo.xia@intel.com>
Subject: Re: [dpdk-dev] [PATCH] examples: skip example when missing dependencies
Date: Sat, 6 Nov 2021 09:49:45 +0100	[thread overview]
Message-ID: <CAJFAV8y+jHHgQzd82WqbQc2iFi21WubLjPqrFxSTb+LLu0igGg@mail.gmail.com> (raw)
In-Reply-To: <YYU0AeIpzObqmZvt@bricha3-MOBL.ger.corp.intel.com>

On Fri, Nov 5, 2021 at 2:39 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
> > @@ -104,6 +104,22 @@ foreach example: examples
> >      deps = ['eal', 'mempool', 'net', 'mbuf', 'ethdev', 'cmdline']
> >      subdir(example)
> >
> > +    if build
> > +        dep_objs = ext_deps
> > +        foreach d:deps
> > +            if not build
> > +                break
> > +            endif
>
> I believe this check can be removed by just putting "break" after the
> "message()" call below.

I took the inspiration from drivers/meson.build (where I suppose, the
if not build in the loop is to catch a build = false set by the subdir
meson.build).
It's more readable with a break where expected.
v2 incoming.

>
> > +            var_name = get_option('default_library') + '_rte_' + d
> > +            if not is_variable(var_name)
> > +                build = false
> > +                message('Missing dependency "@0@" for example "@1@"'.format(d, name))
> > +            else
> > +                dep_objs += [get_variable(var_name)]
> > +            endif
> > +        endforeach
> > +    endif
> > +
>

Thanks.

-- 
David Marchand


  reply	other threads:[~2021-11-06  8:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-05 13:30 David Marchand
2021-11-05 13:39 ` Bruce Richardson
2021-11-06  8:49   ` David Marchand [this message]
2021-11-06  8:53 ` [dpdk-dev] [PATCH v2] " David Marchand
2021-11-10 10:57   ` 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=CAJFAV8y+jHHgQzd82WqbQc2iFi21WubLjPqrFxSTb+LLu0igGg@mail.gmail.com \
    --to=david.marchand@redhat.com \
    --cc=bruce.richardson@intel.com \
    --cc=chenbo.xia@intel.com \
    --cc=david.hunt@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=maxime.coquelin@redhat.com \
    --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).