From: David Gibson <david@gibson.dropbear.id.au>
To: Samuel Tardieu <sam@rfc1149.net>
Cc: devicetree-compiler@vger.kernel.org
Subject: Re: [PATCH] Makefile: do not hardcode the `install` program path
Date: Wed, 14 Feb 2024 19:25:13 +1100 [thread overview]
Message-ID: <Zcx46Sui5AU-ULl7@zatzit> (raw)
In-Reply-To: <20240208191405.1597654-1-sam@rfc1149.net>
[-- Attachment #1: Type: text/plain, Size: 1502 bytes --]
On Thu, Feb 08, 2024 at 08:14:05PM +0100, Samuel Tardieu wrote:
> On systems that do not use the FHS, such as NixOS, the `install` program is not
> located in `/usr/bin/` as its location is dynamic.
>
> `dtc` can be easily installed on such systems by using the `install` program
> available in the `$PATH` with:
>
> make PREFIX=… INSTALL=install
>
> However, this becomes more difficult when `dtc` is being compiled as part of a
> larger toolchain, as the toolchain build scripts will not spontaneously pass
> such an argument on the command line. This happens for example when `dtc` is
> build as a part of the RTEMS build system.
>
> By not hardcoding a predefined path for `install`, as is done for other
> executables, `dtc` will allow the one in the `$PATH` to be used.
>
> Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Applied, thanks.
> ---
> Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 10a56d4..f1f0ab3 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -29,7 +29,7 @@ SWIG = swig
> PKG_CONFIG ?= pkg-config
> PYTHON ?= python3
>
> -INSTALL = /usr/bin/install
> +INSTALL = install
> INSTALL_PROGRAM = $(INSTALL)
> INSTALL_LIB = $(INSTALL)
> INSTALL_DATA = $(INSTALL) -m 644
--
David Gibson | 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 --]
prev parent reply other threads:[~2024-02-14 8:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-08 19:14 [PATCH] Makefile: do not hardcode the `install` program path Samuel Tardieu
2024-02-14 8:25 ` David Gibson [this message]
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=Zcx46Sui5AU-ULl7@zatzit \
--to=david@gibson.dropbear.id.au \
--cc=devicetree-compiler@vger.kernel.org \
--cc=sam@rfc1149.net \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).