-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
38 lines (28 loc) · 843 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
export GO15VENDOREXPERIMENT=1
GLIDE := $(GOPATH)/bin/glide
GLIDE_LOCK := glide.lock
SWAGGER_PKG := github.com/go-swagger/go-swagger
SWAGGER_CMD := $(SWAGGER_PKG)/cmd/swagger/swagger.go
VENDORED_SWAGGER_CMD := vendor/$(SWAGGER_CMD)
SPEC_FILE := swagger-spec/redfish.yml
NAME := redfish
CLIENT := client
MODELS := models
CLIENT_BINDINGS := $(CLIENT)/redfish_client.go
all: install
$(GLIDE):
go get -u github.com/Masterminds/glide
swagger_deps: $(GLIDE_LOCK) | $(GLIDE)
$(GLIDE) --home $(HOME) install
$(CLIENT_BINDINGS): swagger_deps $(SPEC_FILE)
go run $(VENDORED_SWAGGER_CMD) generate client -f $(SPEC_FILE) -A $(NAME)
install: $(CLIENT_BINDINGS)
go install -v $$($(GLIDE) nv)
test: $(COVER_OUT)
go test -v
clean:
rm -fr $(CLIENT) $(MODELS)
clobber: clean
rm -fr vendor
.PHONY: all swagger_deps install test \
clean clobber