2024-01-22 10:36:06 +00:00
|
|
|
PREFIX ?= /usr/local
|
|
|
|
GIT_VERSION = $(shell git describe --tags )
|
|
|
|
|
2024-05-05 10:32:08 +00:00
|
|
|
alr:
|
2024-05-07 13:17:54 +00:00
|
|
|
CGO_ENABLED=0 go build -ldflags="-X 'plemya-x.ru/alr/internal/config.Version=$(GIT_VERSION)'"
|
2024-01-22 10:36:06 +00:00
|
|
|
|
|
|
|
clean:
|
2024-05-05 10:32:08 +00:00
|
|
|
rm -f alr
|
2024-01-22 10:36:06 +00:00
|
|
|
|
2024-05-05 10:32:08 +00:00
|
|
|
install: alr installmisc
|
|
|
|
install -Dm755 alr $(DESTDIR)$(PREFIX)/bin/alr
|
2024-01-22 10:36:06 +00:00
|
|
|
|
|
|
|
installmisc:
|
2024-05-05 10:32:08 +00:00
|
|
|
install -Dm755 scripts/completion/bash $(DESTDIR)$(PREFIX)/share/bash-completion/completions/alr
|
|
|
|
install -Dm755 scripts/completion/zsh $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_alr
|
2024-01-22 10:36:06 +00:00
|
|
|
|
|
|
|
uninstall:
|
2024-05-05 10:32:08 +00:00
|
|
|
rm -f /usr/local/bin/alr
|
2024-01-22 10:36:06 +00:00
|
|
|
|
2024-05-05 10:32:08 +00:00
|
|
|
.PHONY: install clean uninstall installmisc alr
|