aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2024-02-25 22:04:36 +0100
committerRobin Jarry <robin@jarry.cc>2024-03-10 17:31:08 +0100
commit1ec7feaf9b684f590a7121d33dbf8713f1b435e1 (patch)
treed9be59d519552ab9583b8b53ca9e3cff2fef6dbb
parent46ab2976848d4cce77522d796f68493da5859ed3 (diff)
downloadaerc-1ec7feaf9b684f590a7121d33dbf8713f1b435e1.tar.gz
mk: allow overriding install binary
This can be used by downstream packaging to force specific options. E.g.: make install INSTALL="/usr/bin/install -p" Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Gavin-John Noonan <mail@gjnoonan.co.uk> Reviewed-by: Gavin-John Noonan <mail@gjnoonan.co.uk>
-rw-r--r--GNUmakefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 02e7b612..6c666fdd 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -8,6 +8,7 @@ SHAREDIR ?= $(PREFIX)/share/aerc
LIBEXECDIR ?= $(PREFIX)/libexec/aerc
MANDIR ?= $(PREFIX)/share/man
GO ?= go
+INSTALL ?= install
GOFLAGS ?= $(shell contrib/goflags.sh)
BUILD_OPTS ?= -trimpath
GO_LDFLAGS :=
@@ -146,7 +147,7 @@ dirs += $$($1_install_dir)
installed += $$($1_install_dir)/$1
$$($1_install_dir)/$1: $1 | $$($1_install_dir)
- install -m644 $$< $$@
+ $$(INSTALL) -m644 $$< $$@
all: $1
install: $$($1_install_dir)/$1
@@ -169,7 +170,7 @@ dirs += $$($1_install_dir)
installed += $$($1_install_dir)/$$(notdir $1)
$$($1_install_dir)/$$(notdir $1): $1 | $$($1_install_dir)
- install -m755 $$< $$@
+ $$(INSTALL) -m755 $$< $$@
install: $$($1_install_dir)/$$(notdir $1)
endef
@@ -185,7 +186,7 @@ dirs += $3
installed += $3/$$(notdir $1)
$3/$$(notdir $1): $1 | $3
- install -m$2 $$< $$@
+ $$(INSTALL) -m$2 $$< $$@
install: $3/$$(notdir $1)
endef