From 1543199b50099918200c86c778ed7626e8658187 Mon Sep 17 00:00:00 2001 From: Alexander Altman Date: Sun, 7 Aug 2016 18:46:43 -0700 Subject: [PATCH] Allow choice of `install` program This permits the use of, *e.g.*, `ginstall` or `uu-install`. --- Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index d25342594..53a28b046 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ # Config options PROFILE ?= debug MULTICALL ?= n +INSTALL ?= install ifneq (,$(filter install, $(MAKECMDGOALS))) override PROFILE:=release endif @@ -242,7 +243,7 @@ endif all: build -do_install = install ${1} +do_install = $(INSTALL) ${1} use_default := 1 $(foreach util,$(EXES),$(eval $(call BUILD_EXE,$(util)))) @@ -290,14 +291,14 @@ distclean: clean install: build mkdir -p $(INSTALLDIR_BIN) ifeq (${MULTICALL}, y) - install $(BUILDDIR)/uutils $(INSTALLDIR_BIN)/$(PROG_PREFIX)uutils + $(INSTALL) $(BUILDDIR)/uutils $(INSTALLDIR_BIN)/$(PROG_PREFIX)uutils $(foreach prog, $(INSTALLEES), cd $(INSTALLDIR_BIN) && ln -fs $(PROG_PREFIX)uutils $(PROG_PREFIX)$(prog);) else $(foreach prog, $(INSTALLEES), \ - install $(PKG_BUILDDIR)/$(prog) $(INSTALLDIR_BIN)/$(PROG_PREFIX)$(prog);) + $(INSTALL) $(PKG_BUILDDIR)/$(prog) $(INSTALLDIR_BIN)/$(PROG_PREFIX)$(prog);) endif mkdir -p $(INSTALLDIR_LIB) - $(foreach lib, $(LIBS), install $(BUILDDIR)/$$lib $(INSTALLDIR_LIB)/$(lib);) + $(foreach lib, $(LIBS), $(INSTALL) $(BUILDDIR)/$$lib $(INSTALLDIR_LIB)/$(lib);) uninstall: ifeq (${MULTICALL}, y)