From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 41EBEA0C4B; Sat, 6 Nov 2021 09:50:01 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 282914067C; Sat, 6 Nov 2021 09:50:01 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id A79AE40151 for ; Sat, 6 Nov 2021 09:49:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1636188599; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Fpr1cAdWEg/GPT2SrjydRPNmFdfgXkNjHgJrkIsrwXA=; b=cIuQek1RoqyvvkRUvLGd6MQnr23qaZSDA1JvsrDuLPqnlEHqLYbtni9sz8H2UZUnAaUu8A nhWZdssVZvR5GeqvUnMwWV7465FzMvSlnWk/xKJdAg/TKhXwn84zxRmSJAYtj/hTo+Mbz0 OGMCqZS/v1J1EhbLwbJs9mYdG/Dpuuk= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-149-ymRzLt-zN2yCFiBeTNz_Cg-1; Sat, 06 Nov 2021 04:49:57 -0400 X-MC-Unique: ymRzLt-zN2yCFiBeTNz_Cg-1 Received: by mail-lf1-f70.google.com with SMTP id f20-20020a0565123b1400b004035ad15d6eso1799799lfv.13 for ; Sat, 06 Nov 2021 01:49:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Fpr1cAdWEg/GPT2SrjydRPNmFdfgXkNjHgJrkIsrwXA=; b=teKhDEwSieoEpyQHyi6YEsVEwo/eyZqH3DDqud5Q1liiaKfy7Jp5/1wOQHqcBhuQdd Da7CI3MDCen5Qvxx9awIb67pU+FTpPfTrAxUD8fiEvtNa0vUQFw/IzJA0F2lP7s4cjCc Hl+5JuyZQQ0QxQfnIXTD2nMyE+JQj+WPDvSkBNZRWSQicoqZDF28+fqEBwYHyykBtxST jD/ubo0dXrfRXlYgO62hmj8n6xHjx04b2WPx/KiylE3gEDi0M6BwMxDqk71eRJ1MNA37 OR4/IMA/wkquHDOW+XxqylW9NFH4pi1tXzlV7QgxKLK5IxjeXqWv6BSSilrMr7EbpIZ9 Om9w== X-Gm-Message-State: AOAM532VGADr2H4PJyemXZpYZTQji6lL6oaFz59pKXZpD03Spm7OVTUw 7HePhZA8wBkQ+tV1Q8UWbwzicYZb5peEN2kbx25sKNON93NVDzFMDpuwpzXAiQb+5nKtQI/11CW gNN6bJc/2GEWHU9Ms7Uc= X-Received: by 2002:a05:6512:3e11:: with SMTP id i17mr57017375lfv.560.1636188596369; Sat, 06 Nov 2021 01:49:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0xmRkH3O3UU2+ua5SmzngNaaXGiMo6spDZFobqQ4mfhckJi9jMHf3CvDXZxXdBHCjxJzfEtB1NJ/vbEAkiyU= X-Received: by 2002:a05:6512:3e11:: with SMTP id i17mr57017350lfv.560.1636188596121; Sat, 06 Nov 2021 01:49:56 -0700 (PDT) MIME-Version: 1.0 References: <20211105133055.13824-1-david.marchand@redhat.com> In-Reply-To: From: David Marchand Date: Sat, 6 Nov 2021 09:49:45 +0100 Message-ID: To: Bruce Richardson Cc: dev , "Yigit, Ferruh" , Thomas Monjalon , David Hunt , Maxime Coquelin , Chenbo Xia Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] examples: skip example when missing dependencies X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, Nov 5, 2021 at 2:39 PM Bruce Richardson 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