devicetree-compiler.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: devicetree-compiler@vger.kernel.org
Cc: david@gibson.dropbear.id.au
Subject: [PATCH] meson: use override_find_program/override_dependency
Date: Thu, 12 Jun 2025 07:38:29 +0200	[thread overview]
Message-ID: <20250612053829.1037412-1-pbonzini@redhat.com> (raw)

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


             reply	other threads:[~2025-06-12  5:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-12  5:38 Paolo Bonzini [this message]
2025-06-12  6:34 ` [PATCH] meson: use override_find_program/override_dependency David Gibson

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=20250612053829.1037412-1-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=devicetree-compiler@vger.kernel.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).