devicetree-compiler.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] meson: use override_find_program/override_dependency
@ 2025-06-12  5:38 Paolo Bonzini
  2025-06-12  6:34 ` David Gibson
  0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2025-06-12  5:38 UTC (permalink / raw)
  To: devicetree-compiler; +Cc: david

Allow projects that use dtc as a subproject to find the tools and
library via find_program() and dependency().  This way, for those
projects there is no different between system dtc and subproject dtc.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 libfdt/meson.build | 1 +
 meson.build        | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/libfdt/meson.build b/libfdt/meson.build
index 9c6ef54..68d4c1d 100644
--- a/libfdt/meson.build
+++ b/libfdt/meson.build
@@ -40,6 +40,7 @@ libfdt_dep = declare_dependency(
   include_directories: libfdt_inc,
   link_with: libfdt,
 )
+meson.override_dependency('libfdt', libfdt_dep)
 
 if not wheel_only
   install_headers(
diff --git a/meson.build b/meson.build
index ed4a39d..66b44e8 100644
--- a/meson.build
+++ b/meson.build
@@ -118,6 +118,10 @@ if get_option('tools') and not wheel_only
   )
 endif
 
+foreach e: dtc_tools
+  meson.override_find_program(e.name(), e)
+endforeach
+
 if pylibfdt_enabled
   subdir('pylibfdt')
 endif
-- 
2.49.0


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

* Re: [PATCH] meson: use override_find_program/override_dependency
  2025-06-12  5:38 [PATCH] meson: use override_find_program/override_dependency Paolo Bonzini
@ 2025-06-12  6:34 ` David Gibson
  0 siblings, 0 replies; 2+ messages in thread
From: David Gibson @ 2025-06-12  6:34 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: devicetree-compiler

[-- Attachment #1: Type: text/plain, Size: 1390 bytes --]

On Thu, Jun 12, 2025 at 07:38:29AM +0200, Paolo Bonzini wrote:
> Allow projects that use dtc as a subproject to find the tools and
> library via find_program() and dependency().  This way, for those
> projects there is no different between system dtc and subproject dtc.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Applied, thanks.

> ---
>  libfdt/meson.build | 1 +
>  meson.build        | 4 ++++
>  2 files changed, 5 insertions(+)
> 
> diff --git a/libfdt/meson.build b/libfdt/meson.build
> index 9c6ef54..68d4c1d 100644
> --- a/libfdt/meson.build
> +++ b/libfdt/meson.build
> @@ -40,6 +40,7 @@ libfdt_dep = declare_dependency(
>    include_directories: libfdt_inc,
>    link_with: libfdt,
>  )
> +meson.override_dependency('libfdt', libfdt_dep)
>  
>  if not wheel_only
>    install_headers(
> diff --git a/meson.build b/meson.build
> index ed4a39d..66b44e8 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -118,6 +118,10 @@ if get_option('tools') and not wheel_only
>    )
>  endif
>  
> +foreach e: dtc_tools
> +  meson.override_find_program(e.name(), e)
> +endforeach
> +
>  if pylibfdt_enabled
>    subdir('pylibfdt')
>  endif

-- 
David Gibson (he or they)	| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you, not the other way
				| around.
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2025-06-12 10:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-12  5:38 [PATCH] meson: use override_find_program/override_dependency Paolo Bonzini
2025-06-12  6:34 ` David Gibson

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