forked from apps/featurer
Add vendor to improve building speed.
This also adds ability to be built in network-constrained environment.
This commit is contained in:
51
vendor/github.com/leodido/go-urn/makefile
generated
vendored
Normal file
51
vendor/github.com/leodido/go-urn/makefile
generated
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
SHELL := /bin/bash
|
||||
RAGEL := ragel
|
||||
GOFMT := go fmt
|
||||
|
||||
export GO_TEST=env GOTRACEBACK=all go test $(GO_ARGS)
|
||||
|
||||
.PHONY: build
|
||||
build: machine.go
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
@rm -rf docs
|
||||
@rm -f machine.go
|
||||
|
||||
.PHONY: images
|
||||
images: docs/urn.png
|
||||
|
||||
.PHONY: snake2camel
|
||||
snake2camel:
|
||||
@cd ./tools/snake2camel; go build -o ../../snake2camel .
|
||||
|
||||
.PHONY: removecomments
|
||||
removecomments:
|
||||
@cd ./tools/removecomments; go build -o ../../removecomments .
|
||||
|
||||
machine.go: machine.go.rl
|
||||
|
||||
machine.go: snake2camel
|
||||
|
||||
machine.go: removecomments
|
||||
|
||||
machine.go:
|
||||
$(RAGEL) -Z -G1 -e -o $@ $<
|
||||
@./removecomments $@
|
||||
@./snake2camel $@
|
||||
$(GOFMT) $@
|
||||
|
||||
docs/urn.dot: machine.go.rl
|
||||
@mkdir -p docs
|
||||
$(RAGEL) -Z -e -Vp $< -o $@
|
||||
|
||||
docs/urn.png: docs/urn.dot
|
||||
dot $< -Tpng -o $@
|
||||
|
||||
.PHONY: bench
|
||||
bench: *_test.go machine.go
|
||||
go test -bench=. -benchmem -benchtime=5s ./...
|
||||
|
||||
.PHONY: tests
|
||||
tests: *_test.go
|
||||
$(GO_TEST) ./...
|
||||
Reference in New Issue
Block a user