Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Optimize make dependecy obtention #2207

Merged
merged 1 commit into from
Jun 28, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ GOBIN?=$(shell echo `go env GOPATH`/bin)
# if you're testing out the Makefile with `-W` (pretend a file is
# new); use the full path to the pretend-new file, e.g.,
# `make -W $PWD/registry/registry.go`
godeps=$(shell go list -f '{{join .Deps "\n"}}' $1 | grep -v /vendor/ | xargs go list -f '{{if not .Standard}}{{ $$dep := . }}{{range .GoFiles}}{{$$dep.Dir}}/{{.}} {{end}}{{end}}')
godeps=$(shell go list -deps -f '{{if not .Standard}}{{ $$dep := . }}{{range .GoFiles}}{{$$dep.Dir}}/{{.}} {{end}}{{end}}' $(1))

FLUXD_DEPS:=$(call godeps,./cmd/fluxd)
FLUXCTL_DEPS:=$(call godeps,./cmd/fluxctl)
HELM_OPERATOR_DEPS:=$(call godeps,./cmd/helm-operator)
FLUXD_DEPS:=$(call godeps,./cmd/fluxd/...)
FLUXCTL_DEPS:=$(call godeps,./cmd/fluxctl/...)
HELM_OPERATOR_DEPS:=$(call godeps,./cmd/helm-operator/...)

IMAGE_TAG:=$(shell ./docker/image-tag)
VCS_REF:=$(shell git rev-parse HEAD)
Expand Down Expand Up @@ -113,15 +113,12 @@ cache/%/helm-$(HELM_VERSION): docker/helm.version
mv cache/$*/helm $@

$(GOBIN)/fluxctl: $(FLUXCTL_DEPS)
$(GOBIN)/fluxctl: ./cmd/fluxctl/*.go
go install ./cmd/fluxctl

$(GOBIN)/fluxd: $(FLUXD_DEPS)
$(GOBIN)/fluxd: cmd/fluxd/*.go
go install ./cmd/fluxd

$(GOBIN)/helm-operator: $(HELM_OPERATOR_DEPS)
$(GOBIN)/help-operator: cmd/helm-operator/*.go
go install ./cmd/helm-operator

integration-test: all
Expand Down