Merge pull request #8915 from oss-qm/submit/bindir

Makefile: allow overriding the binary executable target dir
This commit is contained in:
Maksym Pavlenko 2023-08-21 11:38:20 -07:00 committed by GitHub
commit 90b8e6b711
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,6 +24,7 @@ ROOTDIR=$(dir $(abspath $(lastword $(MAKEFILE_LIST))))
# The files will be installed under `$(DESTDIR)/$(PREFIX)`.
# The convention of `DESTDIR` was changed in containerd v1.6.
PREFIX ?= /usr/local
BINDIR ?= $(PREFIX)/bin
DATADIR ?= $(PREFIX)/share
DOCDIR ?= $(DATADIR)/doc
MANDIR ?= $(DATADIR)/man
@ -413,12 +414,12 @@ clean-test: ## clean up debris from previously failed tests
install: ## install binaries
@echo "$(WHALE) $@ $(BINARIES)"
@$(INSTALL) -d $(DESTDIR)$(PREFIX)/bin
@$(INSTALL) $(BINARIES) $(DESTDIR)$(PREFIX)/bin
@$(INSTALL) -d $(DESTDIR)$(BINDIR)
@$(INSTALL) $(BINARIES) $(DESTDIR)$(BINDIR)
uninstall:
@echo "$(WHALE) $@"
@rm -f $(addprefix $(DESTDIR)$(PREFIX)/bin/,$(notdir $(BINARIES)))
@rm -f $(addprefix $(DESTDIR)$(BINDIR)/,$(notdir $(BINARIES)))
ifeq ($(GOOS),windows)
install-deps: