Re: [PATCH v2 1/2] Makefile: deprecate in favor of Meson

David Gibson <[email protected]>
Newsgroups org.kernel.vger.devicetree-compiler
Message-ID <aBI6EOjA6OYOz8oA@zatzit>
On Mon, Apr 28, 2025 at 09:41:42PM -0400, Eli Schwartz wrote:
> Building the python bindings is complicated and not very practical to do
> in a Makefile. The setuptools invocations previously used are confusing
> and don't work very well compared to Meson. Having two build systems
> that do different things is also confusing though.
> 
> Since Meson can do everything that Make can do, but the reverse is not
> true, we deprecate the latter and warn when you use it.
> 
> GNU Make can emit a $(warning) on every Makefile run, which is a bit
> noisly but means we don't need to have every target depend on a PHONY
> target (preventing built targets from being seen as up to date).

s/noisly/noisy/

I'm pretty ok with it being noisy.  Some minor nits in wording noted below.

> Signed-off-by: Eli Schwartz <[email protected]>
> ---
>  Makefile | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/Makefile b/Makefile
> index a00123d..000dd85 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -3,6 +3,12 @@
>  # Device Tree Compiler
>  #
>  
> +$(warning WARNING: Building dtc using the Makefile is deprecated, in favor of using the Meson build system instead.)
> +$(warning )
> +$(warning https://mesonbuild.com)

For succinctness, I suggest:

WARNING: Building dtc using make is deprecated in favour of using Meson (https://mesonbuild.com)

Note that British/Australian spelling is preferred for this project, hence "favour".

> +$(warning )
> +$(warning Use `meson setup builddir/ && ninja -C builddir/` to build, or `meson configure` to see build options.)

I'd prefer to suggest "meson compile -C builddir" here, rather than
directly invoking ninja, and I'd also like to list "meson test -C
builddir" as the replacement for "make check".

> +
>  #
>  # Version information will be constructed in this order:
>  # DTC_VERSION release version as MAJOR.MINOR.PATCH

-- 
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
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmgSOgAACgkQzQJF27ox
2GdeYA/8DmzwP5g12snQh0rIEv1UAC2jbm3PjMZUWpbf7FVZwNHMPqX0rvpRXQDa
f4KfYa7RejpOP8CDPCrUv+PT1OpC1lSymtdXlA6cbPWlMZbMWGyP81tiDmx9cknE
zggoml4idBRDfjIAnyu/sFcKZRRF5m77kjfvtgwUECjUvQpWofp6gwB+EpZpyzNq
kAPeiZMKBsxjPuLWjYMa/vXnznKJ7pLhxiKLFFhgLt/Vzox94pzkuo9wrLMW74iq
wiP/YdNvxNBZb81nrUp5mYwF3p5gQQwARkVgYJsg8o63QmTBG+RG+iU0lEoBTA1h
CKQEwzO0Xl9AYO2ad70s0+iiTOSHJ0R8r3yOHlxzFLjxZ3r2SWVWrdhdtp+Rac9j
2AQkW7DX9Weee1M0G4PcSKpYlyvMuKa4lz4yGZ27UC/lT/g+OWTcIalLN66vwNos
nvFSQ0jgj0iY0o+6khoueOA3MCcdy2uGk+70BlSN7zUj/JVO5aC1kH6DCfozKo1d
GONYIZbFL7tAz+FtWFpjOuIaLQNiLuCOhYcQPSMqO+3LwqBOjclib/BzR3W3IRdU
ElmO95qOc3+3tsEt7lDfTXmHHh2hoANvrUq+xvyi201GgAoMrTRbw7gZPjO5KOLK
pxUUedi5T8ux7b2Ttp3Px4BuiBk7lr0vn01CYjJcJCwMeS9/hHs=
=OD5c
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.