1
0
Fork 0
mirror of https://github.com/vbatts/go-mtree.git synced 2025-07-30 10:00:28 +00:00

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>
This commit is contained in:
Vincent Batts 2016-08-25 14:17:08 -04:00
parent e42c679e89
commit 08b1000418
Signed by: vbatts
GPG key ID: 10937E57733F1362
19 changed files with 580 additions and 61 deletions

View file

@ -2,33 +2,45 @@
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
validation: test .lint .vet .cli.test
.PHONY: test
test: .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 $@
@ -39,5 +51,5 @@ $(BUILD): $(SOURCE_FILES)
go build ./cmd/$(BUILD)
clean:
rm -rf $(BUILD) .test .vet .lint .cli.test
rm -rf $(BUILD) $(CLEAN_FILES)