converter/Makefile

34 lines
874 B
Makefile
Raw Normal View History

2023-02-28 07:46:21 +00:00
pkgname := converter
build: ${pkgname}
${pkgname}: $(shell find . -name '*.go')
go build -o ${pkgname} .
completions:
mkdir -p completions
./${pkgname} completion zsh > completions/_${pkgname}
./${pkgname} completion bash > completions/${pkgname}
./${pkgname} completion fish > completions/${pkgname}.fish
run:
go run main.go
tidy:
go mod tidy
clean:
rm -f ${pkgname}
rm -rf completions
uninstall:
rm -f /usr/bin/${pkgname}
rm -f /usr/share/zsh/site-functions/_${pkgname}
rm -f /usr/share/bash-completion/completions/${pkgname}
rm -f /usr/share/fish/vendor_completions.d/${pkgname}.fish
install:
cp ${pkgname} /usr/bin
${pkgname} completion zsh > /usr/share/zsh/site-functions/_${pkgname}
${pkgname} completion bash > /usr/share/bash-completion/completions/${pkgname}
${pkgname} completion fish > /usr/share/fish/vendor_completions.d/${pkgname}.fish