aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2022-09-18 00:41:34 +0700
committerShulhan <ms@kilabit.info>2022-09-18 00:41:34 +0700
commit30f1269bc73dcda364def5e61d5dfd4a2c3ec6fc (patch)
treecc477dd0712802b93ca73ce81811587be0ada5e8
parentdc0ff281441c70edb0270b5a94b7fce28126dcfd (diff)
downloadgotp-30f1269bc73dcda364def5e61d5dfd4a2c3ec6fc.tar.xz
make: change the build and install directory
The build task now create binary under _sys/usr/bin/, while the install task install the binary based on $DESTDIR environment variable, not $GOBIN.
-rw-r--r--.gitignore2
-rw-r--r--Makefile6
2 files changed, 4 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index b1aee54..5ead6cb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2021 M. Shulhan <ms@kilabit.info>
// SPDX-License-Identifier: GPL-3.0-or-later
*.html
-_bin/
+_sys/usr/bin/
cover.out
testdata/add.conf
testdata/save.conf
diff --git a/Makefile b/Makefile
index c90fee7..cab823e 100644
--- a/Makefile
+++ b/Makefile
@@ -13,11 +13,11 @@ test:
go tool cover -html=cover.out -o cover.out
build:
- mkdir -p _bin/
- go build $(LDFLAGS) -o _bin/ ./cmd/...
+ mkdir -p _sys/usr/bin/
+ go build $(LDFLAGS) -o _sys/usr/bin/ ./cmd/...
install: build
- install -m755 _bin/gotp $(GOBIN)/
+ install _sys/usr/bin/gotp $(DESTDIR)/usr/bin/
serve-doc:
ciigo serve _doc