From 53556108509c75827521240c227848a736348088 Mon Sep 17 00:00:00 2001 From: Aaron Madlon-Kay Date: Tue, 11 Oct 2022 11:42:23 +0900 Subject: [PATCH] Makefile: abstract out the `install` binary used The -D option to `install` is not portable. Abstract out the `install` binary used so that other platforms can use e.g. ginstall to circumvent this problem. Signed-off-by: Aaron Madlon-Kay --- Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index a443450d..470bfde1 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ # A bunch of installation-related paths people can override on the command line DESTDIR = / +INSTALL = install prefix = $(HOME) bindir = $(prefix)/libexec/git-core localedir = $(prefix)/share/locale @@ -35,11 +36,11 @@ Documentation/html/git-filter-repo.html: git show origin/docs:html/git-filter-repo.html >Documentation/html/git-filter-repo.html install: snag_docs #fixup_locale - install -Dm0755 git-filter-repo "$(DESTDIR)/$(bindir)/git-filter-repo" - install -dm0755 "$(DESTDIR)/$(pythondir)" + $(INSTALL) -Dm0755 git-filter-repo "$(DESTDIR)/$(bindir)/git-filter-repo" + $(INSTALL) -dm0755 "$(DESTDIR)/$(pythondir)" ln -sf "$(bindir)/git-filter-repo" "$(DESTDIR)/$(pythondir)/git_filter_repo.py" - install -Dm0644 Documentation/man1/git-filter-repo.1 "$(DESTDIR)/$(mandir)/man1/git-filter-repo.1" - install -Dm0644 Documentation/html/git-filter-repo.html "$(DESTDIR)/$(htmldir)/git-filter-repo.html" + $(INSTALL) -Dm0644 Documentation/man1/git-filter-repo.1 "$(DESTDIR)/$(mandir)/man1/git-filter-repo.1" + $(INSTALL) -Dm0644 Documentation/html/git-filter-repo.html "$(DESTDIR)/$(htmldir)/git-filter-repo.html" if which mandb > /dev/null; then mandb; fi