Standardize Go-package structure (#746)

This commit is contained in:
John Kerl 2021-11-11 14:15:13 -05:00 committed by GitHub
parent 0d4fc143ad
commit e2b6ec2391
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20166 changed files with 6121 additions and 6828 deletions

View file

@ -1,14 +1,28 @@
# Please edit Makefile.in rather than Makefile, which is overwritten by ../configure.
PREFIX=/usr/local
INSTALLDIR=$(PREFIX)/bin
build:
make -C go build
@echo "Miller executable is: ./mlr, or go\mlr.exe on Windows"
go build
check:
make -C go check
# Unit tests (small number)
go test -v mlr/internal/pkg/...
# Regression tests (large number)
#
# See ./regression_test.go for information on how to get more details
# for debugging. TL;DR is for CI jobs, we have 'go test -v'; for
# interactive use, instead of 'go test -v' simply use 'mlr regtest
# -vvv' or 'mlr regtest -s 20'. See also src/auxents/regtest.
go test -v
install:
make -C go install
install: build
cp mlr $(INSTALLDIR)
make -C man install
fmt:
go fmt ./...
# For developers before pushing to GitHub.
#
# These steps are done in a particular order:
@ -22,9 +36,9 @@ install:
# * note the man/manpage.txt becomes some of the HTML content
# * turns *.md into docs/site HTML and CSS files
dev:
make -C go fmt
make -C go build
make -C go check
-make fmt
make build
make check
make -C man build
make -C docs
@echo DONE
@ -38,4 +52,4 @@ release_tarball: build check
./create-release-tarball
# Go does its own dependency management, outside of make.
.PHONY: build check install precommit
.PHONY: build check fmt dev