DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Subject: [PATCH] build: raise error if requested application is unbuildable
Date: Tue, 18 Jun 2024 14:51:12 +0200	[thread overview]
Message-ID: <20240618125113.1591405-1-david.marchand@redhat.com> (raw)

Similarly to libraries, when setting a list of desired applications,
report if some application cannot be built because of a missing
dependency.

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 app/meson.build | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/app/meson.build b/app/meson.build
index 21b6da29b3..5b2c80c7a1 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -10,7 +10,9 @@ disable_apps = run_command(list_dir_globs, disable_apps, check: true).stdout().s
 
 enable_apps = ',' + get_option('enable_apps')
 enable_apps = run_command(list_dir_globs, enable_apps, check: true).stdout().split()
+require_apps = true
 if enable_apps.length() == 0
+    require_apps = false
     enable_apps = run_command(list_dir_globs, '*', check: true).stdout().split()
 endif
 
@@ -74,6 +76,10 @@ foreach app:apps
 
     if build
         subdir(name)
+        if not build and require_apps
+            error('Cannot build explicitly requested app "@0@".\n'.format(name)
+                  + '\tReason: ' + reason)
+        endif
     endif
 
     if build
@@ -84,6 +90,10 @@ foreach app:apps
                 build = false
                 reason = 'missing internal dependency, "@0@"'.format(d)
                 message('Missing dependency "@0@" for app "@1@"'.format(d, name))
+                if require_apps
+                    error('Cannot build explicitly requested app "@0@".\n'.format(name)
+                          + '\tPlease add missing dependency "@0@" to "enable_libs" option'.format(d))
+                endif
                 break
             endif
             dep_objs += [get_variable(var_name)]
-- 
2.45.1


             reply	other threads:[~2024-06-18 12:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-18 12:51 David Marchand [this message]
2024-06-18 12:56 ` Bruce Richardson
2024-06-25 12:36   ` David Marchand
2024-06-19  0:13 ` Tyler Retzlaff

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=20240618125113.1591405-1-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=dev@dpdk.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
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).