34 lines
435 B
Text
34 lines
435 B
Text
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
GO = go
|
|
SCDOC = scdoc
|
|
PROG = awl
|
|
LDFLAGS = '-s -w'
|
|
GOFLAGS = -ldflags=$LDFLAGS
|
|
CGO_ENABLED = 0
|
|
|
|
$PROG:
|
|
$GO build $GOFLAGS -o $PROG .
|
|
|
|
doc: doc/$PROG.1.md
|
|
$SCDOC < doc/$PROG.1.md > doc/$PROG.1
|
|
|
|
install:
|
|
$GO install $GOFLAGS .
|
|
|
|
install_doc: doc
|
|
install doc/$PROG.1 /sys/man/1
|
|
|
|
test:
|
|
$GO test -v ./... -cover
|
|
|
|
fmt:
|
|
gofmt -w -s .
|
|
|
|
vet:
|
|
$GO vet ./...
|
|
|
|
lint: fmt vet
|
|
|
|
clean:
|
|
$GO clean
|