From 01968742e38d8d2c6c3cf242c520b4e59c5cafbf Mon Sep 17 00:00:00 2001 From: Doug Stephen Date: Mon, 23 Dec 2024 22:35:45 -0600 Subject: [PATCH] Adjust Makefile to work with macOS --- Makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 2d1e836..99c8627 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,11 @@ # This Source Code Form is licensed MPL-2.0: http://mozilla.org/MPL/2.0 -SHELL ::= /bin/bash -o pipefail +SHELL := /bin/bash -o pipefail prefix ?= /usr/local bindir ?= ${prefix}/bin -INSTALL ::= install -c -RM ::= rm -f -Q ::= $(if $(findstring 1, $(V)),, @) +INSTALL := install -c +RM := rm -f +Q := $(if $(findstring 1, $(V)),, @) all: check @@ -13,7 +13,11 @@ check-deps: jj-fzf $Q ./jj-fzf --version $Q ./jj-fzf --help >/dev/null # check-deps install: check-deps +ifeq ($(shell uname -s),Darwin) + $(INSTALL) jj-fzf "$(bindir)" +else $(INSTALL) -t "$(bindir)" jj-fzf +endif uninstall: $(RM) "$(bindir)/jj-fzf"