Skip to content
This repository was archived by the owner on Mar 22, 2018. It is now read-only.

Commit ec517d3

Browse files
committed
separate targets for binaries
1 parent 9a0e71e commit ec517d3

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export GOPATH ?= $(GOPATH_DEFAULT)
1414
PKG := $(shell awk '/^package: / { print $$2 }' glide.yaml)
1515
DEST := $(GOPATH)/src/$(GIT_HOST)/openstack/$(BASE_DIR)
1616
DEST := $(GOPATH)/src/$(PKG)
17+
SOURCES := $(shell find $(DEST) -name '*.go')
1718

1819
GOOS ?= $(shell go env GOOS)
1920
VERSION ?= $(shell git describe --exact-match 2> /dev/null || \
@@ -28,19 +29,27 @@ depend: work
2829
depend-update: work
2930
cd $(DEST) && glide update
3031

31-
build: depend
32+
build: depend openstack-cloud-controller-manager cinder-provisioner cinder-flex-volume-driver k8s-keystone-auth
33+
34+
openstack-cloud-controller-manager: $(SOURCES)
3235
cd $(DEST) && CGO_ENABLED=0 GOOS=$(GOOS) go build \
3336
-ldflags "-X 'main.version=${VERSION}'" \
3437
-o openstack-cloud-controller-manager \
3538
cmd/openstack-cloud-controller-manager/main.go
39+
40+
cinder-provisioner: $(SOURCES)
3641
cd $(DEST) && CGO_ENABLED=0 GOOS=$(GOOS) go build \
3742
-ldflags "-X 'main.version=${VERSION}'" \
3843
-o cinder-provisioner \
3944
cmd/cinder-provisioner/main.go
45+
46+
cinder-flex-volume-driver: $(SOURCES)
4047
cd $(DEST) && CGO_ENABLED=0 GOOS=$(GOOS) go build \
4148
-ldflags "-X 'main.version=${VERSION}'" \
4249
-o cinder-flex-volume-driver \
4350
cmd/cinder-flex-volume-driver/main.go
51+
52+
k8s-keystone-auth: $(SOURCES)
4453
cd $(DEST) && CGO_ENABLED=0 GOOS=$(GOOS) go build \
4554
-ldflags "-X 'main.version=${VERSION}'" \
4655
-o k8s-keystone-auth \

0 commit comments

Comments
 (0)