DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] build: raise error if requested application is unbuildable
@ 2024-06-18 12:51 David Marchand
  2024-06-18 12:56 ` Bruce Richardson
  2024-06-19  0:13 ` Tyler Retzlaff
  0 siblings, 2 replies; 4+ messages in thread
From: David Marchand @ 2024-06-18 12:51 UTC (permalink / raw)
  To: dev

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-06-25 12:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-18 12:51 [PATCH] build: raise error if requested application is unbuildable David Marchand
2024-06-18 12:56 ` Bruce Richardson
2024-06-25 12:36   ` David Marchand
2024-06-19  0:13 ` Tyler Retzlaff

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).