Devicetree Compiler
 help / color / mirror / Atom feed
* [PATCH 1/2] README: Explain how to build with meson
@ 2026-10-28 11:20 Simon Glass
  2026-10-28 11:20 ` [PATCH 2/2] README: Use meson in the Python section Simon Glass
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Simon Glass @ 2026-10-28 11:20 UTC (permalink / raw)
  To: Devicetree Compiler; +Cc: David Gibson, Simon Glass

Building with make is deprecated in favour of meson, but README.md only
gives instructions for make, in its Python section, and CONTRIBUTING.md
says to use 'make check'. The meson commands only appear in the warning
which the Makefile prints.

Add a short Building section to README.md with the meson commands for
building, testing and installing, pointing to the Meson quick guide and
to scripts/install-deps.sh. Use meson for running the tests in
CONTRIBUTING.md too.

Closes: https://github.com/dgibson/dtc/issues/83
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Simon Glass <sjg@chromium.org>
---

 CONTRIBUTING.md |  4 ++--
 README.md       | 19 +++++++++++++++++++
 2 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 9742dc3..caf0210 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -17,8 +17,8 @@ works with pylibfdt. If it cannot be supported, put the declaration in
 
 ## Tests
 
-Test files are kept in the `tests/` directory. Use `make check` to build and run
-all tests.
+Test files are kept in the `tests/` directory. Use `meson test -C build` to
+build and run all tests (see [README.md](README.md#building)).
 
 If you want to adjust a test file, be aware that `tree_tree1.dts` is compiled
 and checked against a binary tree from assembler macros in `trees.S`. So
diff --git a/README.md b/README.md
index 8f1a5d2..ed9039d 100644
--- a/README.md
+++ b/README.md
@@ -8,6 +8,25 @@ dtc and libfdt are maintained by:
 
 * [David Gibson `<david@gibson.dropbear.id.au>`](mailto:david@gibson.dropbear.id.au)
 
+## Building
+
+dtc and libfdt are built with [Meson](https://mesonbuild.com/):
+
+```
+$ meson setup build
+$ meson compile -C build
+$ meson test -C build
+$ meson install -C build
+```
+
+`meson configure build` lists the build options, e.g. `-Dpython=disabled`
+to skip the Python library. See the
+[Meson quick guide](https://mesonbuild.com/Quick-guide.html) for more,
+such as installing with `--destdir`. `scripts/install-deps.sh` installs
+the packages needed on common systems.
+
+Building with `make` still works but is deprecated.
+
 ## Python library
 
 A Python library wrapping libfdt is also available. To build this you
---
base-commit: 1d50f3f8fa8bf9429eebb0769dafa5df37381ae1
branch: readme-meson

-- 
2.43.0


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

end of thread, other threads:[~2026-10-29  1:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-28 11:20 [PATCH 1/2] README: Explain how to build with meson Simon Glass
2026-10-28 11:20 ` [PATCH 2/2] README: Use meson in the Python section Simon Glass
2026-10-28 20:05   ` Herve Codina
2026-10-29  1:17   ` David Gibson
2026-10-28 19:52 ` [PATCH 1/2] README: Explain how to build with meson Herve Codina
2026-10-29  1:17 ` David Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox