Depend on the contents of vendor (including dep)

This commit is contained in:
Stephen McQuay 2018-05-11 09:10:33 -07:00
parent 6da2bfbfe0
commit 64cd6388b2
Signed by: sm
GPG Key ID: C383C74875475AC8

View File

@ -6,27 +6,30 @@ V_DIRTY := $(shell git describe --exact-match HEAD 2> /dev/null > /dev/null || e
GIT := $(shell git rev-parse --short HEAD)
DIRTY := $(shell git diff-index --quiet HEAD 2> /dev/null > /dev/null || echo "-dirty")
bin/hw: $(shell ls *.go) cmd/hw/main.go bin
bin/hw: vendor $(shell ls *.go) cmd/hw/main.go bin
@echo hw
@GOOS=linux go build -ldflags \
-X$(GIT)$(DIRTY)" \
-v -o bin/hw ./cmd/hw
bin/hwc: $(shell ls *.go ) cmd/hwc/main.go bin
bin/hwc: vendor $(shell ls *.go ) cmd/hwc/main.go bin
@echo hwc
@GOOS=linux go build -ldflags \
-X$(GIT)$(DIRTY)" \
-v -o bin/hwc ./cmd/hwc
bin/hwl: $(shell ls *.go) cmd/hwl/main.go bin
bin/hwl: vendor $(shell ls *.go) cmd/hwl/main.go bin
@echo hwl
@GOOS=linux go build -ldflags \
-X$(GIT)$(DIRTY)" \
-v -o bin/hwl ./cmd/hwl
vendor: $(shell find vendor -type f | grep go$$ ) Gopkg.toml Gopkg.lock
dep ensure
mkdir bin