39 lines
No EOL
561 B
Makefile
39 lines
No EOL
561 B
Makefile
# This should only be used for dev environments
|
|
GO := go
|
|
GOFLAGS := -ldflags '-s -w'
|
|
PREFIX := /usr/local
|
|
BINPATH = $(PREFIX)/bin
|
|
|
|
.PHONY: clean doc
|
|
|
|
# hehe
|
|
all: awl
|
|
|
|
awl: .
|
|
$(GO) build -o awl $(GOFLAGS) .
|
|
|
|
doc:
|
|
scdoc < doc/awl.1.md > doc/awl.1
|
|
|
|
test:
|
|
$(GO) test -v ./... -cover
|
|
|
|
fmt:
|
|
gofmt -w -s .
|
|
|
|
vet:
|
|
$(GO) vet ./...
|
|
|
|
lint: fmt vet
|
|
|
|
install: awl
|
|
install awl $(BINPATH)
|
|
|
|
install_doc: doc
|
|
install doc/awl.1 $(PREFIX)/share/man/man1
|
|
@echo ""
|
|
@echo "Make sure to update your manual database"
|
|
@echo "'sudo mandb' on Debian/Ubuntu"
|
|
|
|
clean:
|
|
$(GO) clean
|