1
0
Fork 0
mirror of https://github.com/vbatts/go-mtree.git synced 2024-11-22 00:15:39 +00:00
go-mtree/Makefile
Vincent Batts 08b1000418
vis: adding a pure golang Vis()
The current Vis() and Unvis() are using the C implementation from
MTREE(8).

But that means that cgo is used, which is not always desired.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2016-12-07 16:12:28 -05:00

55 lines
886 B
Makefile

BUILD := gomtree
CWD := $(shell pwd)
SOURCE_FILES := $(shell find . -type f -name "*.go")
CLEAN_FILES := *~
default: build validation
.PHONY: validation
validation: test .lint .vet .cli.test
.PHONY: test
test: .test .test.tags
CLEAN_FILES += .test .test.tags
.test: $(SOURCE_FILES)
go test -v ./... && touch $@
.test.tags: $(SOURCE_FILES)
go test -tags govis -v ./... && touch $@
.PHONY: lint
lint: .lint
CLEAN_FILES += .lint
.lint: $(SOURCE_FILES)
golint -set_exit_status ./... && touch $@
.PHONY: vet
vet: .vet
CLEAN_FILES += .vet
.vet: $(SOURCE_FILES)
go vet ./... && touch $@
.PHONY: cli.test
cli.test: .cli.test
CLEAN_FILES += .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) $(CLEAN_FILES)