summaryrefslogtreecommitdiff
path: root/Makefile
blob: 22bd64dee0f86eba0101a3f5d3cbf9d9ad5284d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
VERSION = $(shell git describe --tags)

all: plugin
	ldd ../nocui.so

plugin:
	GO111MODULE=off go build -buildmode=plugin -o nocui.so

install:
	rm -f nocui.so
	go build -buildmode=plugin -o ~/go/lib/nocui-${VERSION}.so

check-git-clean:
	@git diff-index --quiet HEAD -- || (echo "Git repository is dirty, please commit your changes first"; exit 1)

# Test the README.md & doc.go file
# this runs pkgsite, the binary that does dev.go.dev
# go install golang.org/x/pkgsite/cmd/pkgsite@latest
pkgsite:
	pkgsite

goimports:
	goimports -w *.go

redomod:
	rm -f go.*
	GO111MODULE= go mod init
	GO111MODULE= go mod tidy