Add dist binary target to Makefile

Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
Stephen J Day 2015-02-16 14:25:17 -08:00
parent fd2179d52b
commit 8865a1ba3c

View file

@ -16,34 +16,48 @@ version/version.go:
./version/version.sh > $@ ./version/version.sh > $@
${PREFIX}/bin/registry: version/version.go $(shell find . -type f -name '*.go') ${PREFIX}/bin/registry: version/version.go $(shell find . -type f -name '*.go')
go build -o $@ ${GO_LDFLAGS} ./cmd/registry @echo "+ $@"
@go build -o $@ ${GO_LDFLAGS} ./cmd/registry
${PREFIX}/bin/registry-api-descriptor-template: version/version.go $(shell find . -type f -name '*.go') ${PREFIX}/bin/registry-api-descriptor-template: version/version.go $(shell find . -type f -name '*.go')
go build -o $@ ${GO_LDFLAGS} ./cmd/registry-api-descriptor-template @echo "+ $@"
@go build -o $@ ${GO_LDFLAGS} ./cmd/registry-api-descriptor-template
${PREFIX}/bin/dist: version/version.go $(shell find . -type f -name '*.go')
@echo "+ $@"
@go build -o $@ ${GO_LDFLAGS} ./cmd/dist
doc/spec/api.md: doc/spec/api.md.tmpl ${PREFIX}/bin/registry-api-descriptor-template doc/spec/api.md: doc/spec/api.md.tmpl ${PREFIX}/bin/registry-api-descriptor-template
./bin/registry-api-descriptor-template $< > $@ ./bin/registry-api-descriptor-template $< > $@
vet: vet:
go vet ./... @echo "+ $@"
@go vet ./...
fmt: fmt:
test -z "$$(gofmt -s -l . | grep -v Godeps/_workspace/src/ | tee /dev/stderr)" || \ @echo "+ $@"
@test -z "$$(gofmt -s -l . | grep -v Godeps/_workspace/src/ | tee /dev/stderr)" || \
echo "+ please format Go code with 'gofmt -s'" echo "+ please format Go code with 'gofmt -s'"
lint: lint:
test -z "$$(golint ./... | grep -v Godeps/_workspace/src/ | tee /dev/stderr)" @echo "+ $@"
@test -z "$$(golint ./... | grep -v Godeps/_workspace/src/ | tee /dev/stderr)"
build: build:
go build ${GO_LDFLAGS} ./... @echo "+ $@"
@go build -v ${GO_LDFLAGS} ./...
test: test:
go test -test.short ./... @echo "+ $@"
@go test -test.short ./...
test-full: test-full:
go test ./... @echo "+ $@"
@go test ./...
binaries: ${PREFIX}/bin/registry ${PREFIX}/bin/registry-api-descriptor-template binaries: ${PREFIX}/bin/registry ${PREFIX}/bin/registry-api-descriptor-template ${PREFIX}/bin/dist
@echo "+ $@"
clean: clean:
rm -rf "${PREFIX}/bin/registry" @echo "+ $@"
@rm -rf "${PREFIX}/bin/registry" "${PREFIX}/bin/registry-api-descriptor-template"