fix(make): Real actual macOS support
All checks were successful
continuous-integration/drone/push Build is passing

this time without breaking everything else :)

Signed-off-by: Sam Therapy <sam@samtherapy.net>
This commit is contained in:
Sam Therapy 2022-10-20 23:14:43 +02:00
parent 967363f34b
commit 39038ced2e
Signed by: sam
GPG key ID: 4D8B07C18F31ACBD
2 changed files with 12 additions and 7 deletions

View file

@ -7,6 +7,11 @@ ifeq ($(OS),Windows_NT)
EXE := $(PROG).exe
else
EXE := $(PROG)
ifeq ($(shell uname), Darwin)
INSTALLFLAGS :=
else
INSTALLFLAGS := D
endif
endif
## install: installs awl
@ -16,11 +21,11 @@ install:
$(GO) install $(GOFLAGS) .
else
install: all
install -Dm755 $(PROG) $(DESTDIR)$(PREFIX)/$(BIN)/$(PROG)
install -Dm644 doc/$(PROG).1 $(DESTDIR)$(MAN)/man1/$(PROG).1
gzip -9 $(DESTDIR)$(MAN)/man1/$(PROG).1
install -$(INSTALLFLAGS)m755 $(PROG) $(DESTDIR)$(PREFIX)/$(BIN)/$(PROG)
install -$(INSTALLFLAGS)m644 doc/$(PROG).1 $(DESTDIR)$(MAN)/man1/$(PROG).1
gzip -9f $(DESTDIR)$(MAN)/man1/$(PROG).1
# completions need to go in one specific place :)
install -Dm644 completions/bash.bash $(DESTDIR)$(PREFIX)/$(SHARE)/bash-completion/completions/$(PROG)
install -Dm644 completions/fish.fish $(DESTDIR)$(PREFIX)/$(SHARE)/fish/vendor_completions.d/$(PROG).fish
install -Dm644 completions/zsh.zsh $(DESTDIR)$(PREFIX)/$(SHARE)/zsh/site-functions/_$(PROG)
install -$(INSTALLFLAGS)m644 completions/bash.bash $(DESTDIR)$(PREFIX)/$(SHARE)/bash-completion/completions/$(PROG)
install -$(INSTALLFLAGS)m644 completions/fish.fish $(DESTDIR)$(PREFIX)/$(SHARE)/fish/vendor_completions.d/$(PROG).fish
install -$(INSTALLFLAGS)m644 completions/zsh.zsh $(DESTDIR)$(PREFIX)/$(SHARE)/zsh/site-functions/_$(PROG)
endif

View file

@ -10,7 +10,7 @@ EXE := $(PROG)
install: all
install -Dm755 $(PROG) $(DESTDIR)$(PREFIX)/$(BIN)/$(PROG)
install -Dm644 doc/$(PROG).1 $(DESTDIR)$(MAN)/man1/$(PROG).1
gzip -9 $(DESTDIR)$(MAN)/man1/$(PROG).1
gzip -9f $(DESTDIR)$(MAN)/man1/$(PROG).1
# completions need to go in one specific place :)
install -Dm644 completions/bash.bash $(DESTDIR)$(PREFIX)$(SHARE)/bash-completion/completions/$(PROG)
install -Dm644 completions/fish.fish $(DESTDIR)$(PREFIX)$(SHARE)/fish/vendor_completions.d/$(PROG).fish