mirror of
https://github.com/vbatts/go-mtree.git
synced 2024-12-22 13:56:30 +00:00
Vincent Batts
f49f66f61e
This cleans up the Makefile target, and drops the dependency to point to the $root path of the repo. Fixes https://github.com/vbatts/go-mtree/issues/98 Reported-by: Aleksa Sarai <asarai@suse.de> Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
43 lines
697 B
Makefile
43 lines
697 B
Makefile
|
|
BUILD := gomtree
|
|
CWD := $(shell pwd)
|
|
SOURCE_FILES := $(shell find . -type f -name "*.go")
|
|
|
|
default: build validation
|
|
|
|
.PHONY: validation
|
|
validation: .test .lint .vet .cli.test
|
|
|
|
.PHONY: test
|
|
test: .test
|
|
|
|
.test: $(SOURCE_FILES)
|
|
go test -v ./... && touch $@
|
|
|
|
.PHONY: lint
|
|
lint: .lint
|
|
|
|
.lint: $(SOURCE_FILES)
|
|
golint -set_exit_status ./... && touch $@
|
|
|
|
.PHONY: vet
|
|
vet: .vet
|
|
|
|
.vet: $(SOURCE_FILES)
|
|
go vet ./... && touch $@
|
|
|
|
.PHONY: cli.test
|
|
cli.test: .cli.test
|
|
|
|
.cli.test: $(BUILD) $(wildcard ./test/cli/*.sh)
|
|
@go run ./test/cli.go ./test/cli/*.sh && touch $@
|
|
|
|
.PHONY: build
|
|
build: $(BUILD)
|
|
|
|
$(BUILD): $(SOURCE_FILES)
|
|
go build ./cmd/$(BUILD)
|
|
|
|
clean:
|
|
rm -rf $(BUILD) .test .vet .lint .cli.test
|
|
|