diff options
author | Samuel Tardieu <sam@rfc1149.net> | 2024-02-08 20:14:05 +0100 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2024-02-14 19:19:50 +1100 |
commit | a669223f7a60cff6843995b9dd4afa472c2512c6 (patch) | |
tree | b8e07340a5727940665fefb5ce6afaf5b667579a | |
parent | 3fbfdd08afd2a7a25b27433f6f5678c0fe694721 (diff) | |
download | dtc-a669223f7a60cff6843995b9dd4afa472c2512c6.tar.gz |
Makefile: do not hardcode the `install` program path
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>
Message-ID: <20240208191405.1597654-1-sam@rfc1149.net>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-rw-r--r-- | Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |