From 1ec7feaf9b684f590a7121d33dbf8713f1b435e1 Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Sun, 25 Feb 2024 22:04:36 +0100 Subject: 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 Tested-by: Gavin-John Noonan Reviewed-by: Gavin-John Noonan --- GNUmakefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'GNUmakefile') 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 -- cgit