diff Makefile @ 66:787b5ee0289d draft

Use vendored modules Signed-off-by: Izuru Yakumo <yakumo.izuru@chaotic.ninja>
author yakumo.izuru
date Sun, 23 Jul 2023 13:18:53 +0000
parents 315dee06253e
children 4edfa07d5fe0
line wrap: on
line diff
--- a/Makefile	Mon May 08 21:10:36 2023 +0000
+++ b/Makefile	Sun Jul 23 13:18:53 2023 +0000
@@ -1,17 +1,17 @@
-destdir ?= 
-goflags ?= -v -ldflags "-w -X `go list`.Version=$(version) -X `go list`.Commit=$(commit)" -tags "static_build"
-prefix ?= /usr/local
-version ?= `git describe --abbrev=0 --tags || echo "$version"`
-commit ?= `git rev-parse --short HEAD || echo "$commit"`
+DESTDIR ?= 
+GOFLAGS ?= -v -ldflags "-w -X `go list`.Version=$(VERSION) -X `go list`.Commit=$(COMMIT)" -tags "static_build" -mod=vendor
+PREFIX ?= /usr/local
+VERSION ?= `git describe --abbrev=0 --tags || echo "$VERSION"`
+COMMIT ?= `git rev-parse --short HEAD || echo "$COMMIT"`
 
 
 build:
-	go build ${goflags} ./cmd/aya
+	go build ${GOFLAGS} ./cmd/aya
 clean:
 	rm -f aya
 install:
-	install -Dm0755 aya ${destdir}${prefix}/bin/aya
-	install -Dm0644 aya.1 ${destdir}${prefix}/share/man/man1/aya.1
+	install -Dm0755 aya ${DESTDIR}${PREFIX}/bin/aya
+	install -Dm0644 aya.1 ${DESTDIR}${PREFIX}/share/man/man1/aya.1
 uninstall:
-	rm -f ${prefix}/bin/aya
-	rm -f ${prefix}/share/man/man1/aya.1
+	rm -f ${PREFIX}/bin/aya
+	rm -f ${PREFIX}/share/man/man1/aya.1