aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2025-02-01 09:48:18 +0700
committerShulhan <ms@kilabit.info>2025-02-01 09:48:18 +0700
commit4a4ff7a416cba297ef1172bcdf44ed69b9178033 (patch)
treef1283570c495f6bb9efd7186b6edb8bf27dc9f39 /Makefile
parent3453ab4a27367677de29e98d190da7f752aed5ed (diff)
downloadciigo-4a4ff7a416cba297ef1172bcdf44ed69b9178033.tar.xz
make: derive GOBIN using "go env GOBIN"
The environment variable GOBIN may not set by user explicitly.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 14976ed..bc043b3 100644
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,7 @@
## SPDX-License-Identifier: GPL-3.0-or-later
VERSION:=$(shell git describe --tags)
+ENV_GOBIN:=$(shell go env GOBIN)
LDFLAGS:=-ldflags "-s -w -X 'git.sr.ht/~shulhan/ciigo.Version=$(VERSION)'"
DIR_BUILD:=_bin
@@ -21,7 +22,7 @@ test:
.PHONY: install
install: build
- mv _bin/ciigo $(GOBIN)
+ mv _bin/ciigo $(ENV_GOBIN)
.PHONY: run-example
run-example: