Update Makefiles with suggestions

This commit is contained in:
Adam Ryman 2016-10-06 19:59:15 -07:00
Родитель 383049f383
Коммит 5996e6f7c3
2 изменённых файлов: 28 добавлений и 20 удалений

Просмотреть файл

@ -1,13 +1,32 @@
# Makefile for Truss.
#
# Build native Truss by default.
default:
$(MAKE) -C truss
default: truss
# Generate go files containing the all template files in []byte form
gobindata:
go generate github.com/TuneLab/go-truss/gengokit/template
go generate github.com/TuneLab/go-truss/truss/template
# Install truss and protoc-gen-truss-protocast
truss: gobindata
go install github.com/TuneLab/go-truss/protoc-gen-truss-protocast
go install github.com/TuneLab/go-truss/truss
# Run the go tests and the truss integration tests
test:
go test -v ./...
$(MAKE) -C truss test
test: test-go test-integration
test-go:
go test -v ./...
test-integration:
$(MAKE) -C truss test-integration
# Run the go non-vendored unit tests
test-nv:
go test -v ./deftree/... ./gendoc/... ./gengokit/... \
./protoc-gen-truss-protocast/... ./truss/...
# Removes generated code from tests
testclean:
$(MAKE) -C truss testclean

Просмотреть файл

@ -1,20 +1,9 @@
all: truss
default:
$(MAKE) -C ..
# Generate go files containing the all template files in []byte form
gobindata:
go generate github.com/TuneLab/go-truss/...
# Install truss and all dependencies
truss: gobindata
go install github.com/TuneLab/go-truss/...
# Remove the truss binaries
clean:
rm -f $(GOPATH)/bin/truss
rm -f $(GOPATH)/bin/protoc-gen-truss-protocast
test: testclean
test-integration: testclean
$(MAKE) -C _integration-tests
# Removes generated code from tests
testclean:
$(MAKE) -C _integration-tests clean